Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
59592176e2 | ||
![]() |
e47b57f760 | ||
![]() |
4e3bbd9209 | ||
![]() |
9f9e7ca81c | ||
![]() |
493ad80d1c | ||
![]() |
a71144b735 | ||
![]() |
ebf22c8012 | ||
![]() |
69dc2de281 | ||
![]() |
520e4e4c58 | ||
![]() |
faa779555c | ||
![]() |
a62f2a5eca | ||
![]() |
65cf443cb4 | ||
![]() |
9f2b89d0be | ||
![]() |
b362a25028 | ||
![]() |
3c909bdb97 | ||
![]() |
d79917ecca | ||
![]() |
b5de5e5125 | ||
![]() |
8cf9dfa2bc | ||
![]() |
fa41f55a23 | ||
![]() |
c6487e78bb | ||
![]() |
de76dc8f56 | ||
![]() |
1e67efafe7 | ||
![]() |
f31dcae058 | ||
![]() |
aa74f2ed36 | ||
![]() |
e4cbd9cc35 | ||
![]() |
775b8abc93 | ||
![]() |
e1fb48d900 | ||
![]() |
93aded746e | ||
![]() |
af1d94c1f2 | ||
![]() |
89c27b28e7 | ||
![]() |
f34a7b9430 | ||
![]() |
fbd4fdcbd1 | ||
![]() |
7ea73622cd |
@@ -17,5 +17,6 @@ module.exports = {
|
||||
'no-unused-vars': 'off',
|
||||
'no-useless-escape': 'off',
|
||||
'no-control-regex': 'off',
|
||||
'no-extra-semi': 'off',
|
||||
}
|
||||
}
|
||||
|
84
package-lock.json
generated
84
package-lock.json
generated
@@ -14,6 +14,7 @@
|
||||
"bootstrap": "^3.3.5",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.3.14",
|
||||
"file-saver": "^2.0.5",
|
||||
"font-awesome": "^4.6.3",
|
||||
"ionicons": "^2.0.1",
|
||||
"jquery": "^2.2.0",
|
||||
@@ -26,6 +27,7 @@
|
||||
"sass": "^1.67.0",
|
||||
"sass-loader": "^13.3.2",
|
||||
"unplugin-element-plus": "^0.8.0",
|
||||
"vue-clipboard2": "^0.3.3",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuex": "^4.0.0",
|
||||
"xlsx": "^0.18.5"
|
||||
@@ -40,6 +42,7 @@
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"script-loader": "^0.7.2",
|
||||
"unplugin-auto-import": "^0.16.7",
|
||||
"unplugin-vue-components": "^0.25.2",
|
||||
"vue": "^3.2.13",
|
||||
@@ -4435,9 +4438,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001546",
|
||||
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001546.tgz",
|
||||
"integrity": "sha512-zvtSJwuQFpewSyRrI3AsftF6rM0X80mZkChIt1spBGEvRglCrjTniXvinc8JKRoqTwXAgvqTImaN9igfSMtUBw=="
|
||||
"version": "1.0.30001651",
|
||||
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz",
|
||||
"integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/case-sensitive-paths-webpack-plugin": {
|
||||
"version": "2.4.0",
|
||||
@@ -4652,6 +4669,16 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/clipboard": {
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
|
||||
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
|
||||
"dependencies": {
|
||||
"good-listener": "^1.2.2",
|
||||
"select": "^1.1.2",
|
||||
"tiny-emitter": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/clipboardy": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/clipboardy/-/clipboardy-2.3.0.tgz",
|
||||
@@ -5547,6 +5574,11 @@
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/delegate": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
|
||||
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
||||
},
|
||||
"node_modules/delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
|
||||
@@ -6685,6 +6717,11 @@
|
||||
"node": "^10.12.0 || >=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/file-saver": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
|
||||
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
|
||||
@@ -7082,6 +7119,14 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/good-listener": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
|
||||
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
|
||||
"dependencies": {
|
||||
"delegate": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz",
|
||||
@@ -10790,6 +10835,12 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-loader": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/raw-loader/-/raw-loader-0.5.1.tgz",
|
||||
"integrity": "sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/read-pkg": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz",
|
||||
@@ -11238,6 +11289,15 @@
|
||||
"node": ">= 8.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/script-loader": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmmirror.com/script-loader/-/script-loader-0.7.2.tgz",
|
||||
"integrity": "sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"raw-loader": "~0.5.1"
|
||||
}
|
||||
},
|
||||
"node_modules/scss-tokenizer": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmmirror.com/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz",
|
||||
@@ -11261,6 +11321,11 @@
|
||||
"integrity": "sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/select": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
|
||||
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
|
||||
},
|
||||
"node_modules/select-hose": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/select-hose/-/select-hose-2.0.0.tgz",
|
||||
@@ -12142,6 +12207,11 @@
|
||||
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tiny-emitter": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
||||
},
|
||||
"node_modules/to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
@@ -12638,6 +12708,14 @@
|
||||
"@vue/shared": "3.2.13"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-clipboard2": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
|
||||
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
|
||||
"dependencies": {
|
||||
"clipboard": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-eslint-parser": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
|
||||
|
@@ -14,6 +14,7 @@
|
||||
"bootstrap": "^3.3.5",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.3.14",
|
||||
"file-saver": "^2.0.5",
|
||||
"font-awesome": "^4.6.3",
|
||||
"ionicons": "^2.0.1",
|
||||
"jquery": "^2.2.0",
|
||||
@@ -26,6 +27,7 @@
|
||||
"sass": "^1.67.0",
|
||||
"sass-loader": "^13.3.2",
|
||||
"unplugin-element-plus": "^0.8.0",
|
||||
"vue-clipboard2": "^0.3.3",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuex": "^4.0.0",
|
||||
"xlsx": "^0.18.5"
|
||||
@@ -40,6 +42,7 @@
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"script-loader": "^0.7.2",
|
||||
"unplugin-auto-import": "^0.16.7",
|
||||
"unplugin-vue-components": "^0.25.2",
|
||||
"vue": "^3.2.13",
|
||||
|
19
src/api/GiftPanelManagement/GiftPanelManagement.js
Normal file
19
src/api/GiftPanelManagement/GiftPanelManagement.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
|
||||
// 列表
|
||||
export const list = query => {
|
||||
return request({
|
||||
url: '/giftPanelTab/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 保存
|
||||
export const update = query => {
|
||||
return request({
|
||||
url: '/giftPanelTab/update',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
42
src/api/SsGuild/SsGuild.js
Normal file
42
src/api/SsGuild/SsGuild.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
import qs from 'qs';
|
||||
|
||||
// 周期选项下拉框
|
||||
export const cycleDateList = query => {
|
||||
return request({
|
||||
url: '/admin/ssGuild/cycleDateList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// SS公会列表
|
||||
export const list = query => {
|
||||
return request({
|
||||
url: '/admin/ssGuild/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 发送金币&批量发送
|
||||
export const sendGold = query => {
|
||||
return request({
|
||||
url: '/admin/ssGuild/sendGold',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
// export const ssGuildExport = query => {
|
||||
// return request({
|
||||
// url: `/admin/ssGuild/export`,
|
||||
// method: 'post',
|
||||
// params: query,
|
||||
// responseType: 'blob'
|
||||
// });
|
||||
// };
|
||||
// 导出-公会信息
|
||||
export const ssGuildExport = query => {
|
||||
window.location.href = `/admin/ssGuild/export?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
58
src/api/medal/medal.js
Normal file
58
src/api/medal/medal.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
// 地区接口
|
||||
export const listPartitionInfo = query => {
|
||||
return request({
|
||||
url: '/partition/listPartitionInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 勋章信息-列表
|
||||
export const medalPage = query => {
|
||||
return request({
|
||||
url: '/admin/medal/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 勋章信息-新增&保存
|
||||
export const medalSave = query => {
|
||||
return request({
|
||||
url: '/admin/medal/save',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 勋章信息-发放
|
||||
export const medalSend = query => {
|
||||
return request({
|
||||
url: '/admin/medal/send',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 勋章记录-撤销
|
||||
export const rollback = query => {
|
||||
return request({
|
||||
url: '/admin/medalRecord/rollback',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 勋章记录-列表
|
||||
export const medalRecordPage = query => {
|
||||
return request({
|
||||
url: '/admin/medalRecord/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 勋章记录-勋章列表
|
||||
export const listAll = query => {
|
||||
return request({
|
||||
url: '/admin/medal/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@@ -102,6 +102,14 @@ export const addRecord = query => {
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 保存收款账户
|
||||
export const savePayAccount = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/savePayAccount',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 违规类查询
|
||||
export const listRecord = query => {
|
||||
return request({
|
||||
@@ -120,3 +128,127 @@ export const exportInfo = query => {
|
||||
window.location.href = `/admin/family/manage/exportFamily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
// 工资梯度-列表
|
||||
export const manageList = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工资梯度-新增
|
||||
export const manageAdd = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/add',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工资梯度-删除
|
||||
export const manageDelete = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/delete',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-列表
|
||||
export const statPageFamily = query => {
|
||||
return request({
|
||||
url: '/admin/family/wage/stat/pageFamily',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-单个工会详情
|
||||
export const listFamilyMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/wage/stat/listFamilyMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-单个工会导出
|
||||
export const statExportFamilyMember = query => {
|
||||
window.location.href = `/admin/family/wage/stat/exportFamilyMember?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 工会统计-每日工会详情
|
||||
export const listFamilyMemberDaily = query => {
|
||||
return request({
|
||||
url: '/admin/family/wage/stat/listFamilyMemberDaily',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-单每日会导出
|
||||
export const exportFamilyMemberDaily = query => {
|
||||
window.location.href = `/admin/family/wage/stat/exportFamilyMemberDaily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 工会统计-导出公会工资统计
|
||||
export const statExportFamily = query => {
|
||||
window.location.href = `/admin/family/wage/stat/exportFamily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 工会统计-导出家族流水
|
||||
export const incomeExportFamilys = query => {
|
||||
window.location.href = `/admin/family/income/exportFamily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 金币流水-列表
|
||||
export const incomePageFamily = query => {
|
||||
return request({
|
||||
url: '/admin/family/income/pageFamily',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 金币流水-详情
|
||||
export const incomeListFamilyMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/income/listFamilyMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 金币流水-导出成员流水信息
|
||||
export const incomeExportFamily = query => {
|
||||
window.location.href = `/admin/family/income/exportFamilyMember?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 成员信息-弹窗详情
|
||||
export const manageListFamilyMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/listFamilyMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 成员信息-新增成员
|
||||
export const addMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/addMember',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 成员信息-设置管理员
|
||||
export const setManager = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/setManager',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 成员信息-删除管理员
|
||||
export const removeMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/removeMember',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
94
src/api/noblemanNew/noblemanNew.js
Normal file
94
src/api/noblemanNew/noblemanNew.js
Normal file
@@ -0,0 +1,94 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
|
||||
// 邀请移除记录
|
||||
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
|
||||
});
|
||||
};
|
138
src/api/relAgency/relAgency.js
Normal file
138
src/api/relAgency/relAgency.js
Normal file
@@ -0,0 +1,138 @@
|
||||
|
||||
import request from '@/utils/request';
|
||||
import qs from 'qs';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
// 活动配置 相关接口(一级菜单:活动配置)
|
||||
|
||||
// 获取 周期列表
|
||||
export const getDateCycleList = query => {
|
||||
return request({
|
||||
url: '/anchorSalaryBill/dateCycle/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 获取 公会钻石薪资流水统计 列表
|
||||
export const getAgencyDiamondFlow = query => {
|
||||
return request({
|
||||
url: '/agency/diamond/flow/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 公会钻石薪资流水统计 导出
|
||||
// export const agencyDiamondFlowExport = query => {
|
||||
// return request({
|
||||
// url: `/agency/diamond/flow/export`,
|
||||
// method: 'post',
|
||||
// params: query,
|
||||
// responseType: 'blob'
|
||||
// });
|
||||
// };
|
||||
export const agencyDiamondFlowExport = query => {
|
||||
window.location.href = `/agency/diamond/flow/export?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 主播薪资操作(不用分区)
|
||||
export const getAnchorSalaryBill = query => {
|
||||
return request({
|
||||
url: '/anchorSalaryBill/anchorSummary/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// salaryType 1钻石兑换薪资明细 2 薪资转赠充值代理 明细 3薪资转增公会长明细 4官方提现 6 薪资兑换金币明细
|
||||
export const anchorSalaryBillDetail = query => {
|
||||
return request({
|
||||
url: '/anchorSalaryBill/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 充值代理转增薪资
|
||||
export const chargeAgentList = query => {
|
||||
return request({
|
||||
url: '/anchorSalaryBill/chargeAgent/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 充值代理转增薪资 总值
|
||||
export const chargeAgentSum = query => {
|
||||
return request({
|
||||
url: '/anchorSalaryBill/chargeAgent/sum',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 官方提现记录 列表
|
||||
export const agencyWithdrawList = query => {
|
||||
return request({
|
||||
url: '/agencyWithdrawExamine/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 官方提现记录 导出
|
||||
export const agencyWithdrawExamineExport = query => {
|
||||
return request({
|
||||
url: `/agencyWithdrawExamine/export`,
|
||||
method: 'post',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
// 官方提现记录 结算
|
||||
export const agencyWithdrawSet = query => {
|
||||
return request({
|
||||
url: '/agencyWithdrawExamine/settle',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 官方提现记录 批量结算
|
||||
export const agencyWithdrawBatchSet = query => {
|
||||
return request({
|
||||
url: '/agencyWithdrawExamine/batchSettle',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 公会开业数据统计
|
||||
export const agencyOpenList = query => {
|
||||
return request({
|
||||
url: '/agency/open/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 公会开业数据 详情
|
||||
export const agencyOpenDetail = query => {
|
||||
return request({
|
||||
url: '/agency/open/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 公会优秀主播数据统计
|
||||
export const excellentAnchorList = query => {
|
||||
return request({
|
||||
url: '/agency/open/excellentAnchor/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 公会优秀主播数据统计
|
||||
export const excellentAnchorDetail = query => {
|
||||
return request({
|
||||
url: '/agency/open/excellentAnchor/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
43
src/api/relPrivilegeManage/relPrivilegeManage.js
Normal file
43
src/api/relPrivilegeManage/relPrivilegeManage.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request';
|
||||
import qs from 'qs';
|
||||
// 靓号申请管理 列表
|
||||
export const getPrettyNumberExamineList = query => {
|
||||
return request({
|
||||
url: '/admin/prettyNumber/examine/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 靓号申请管理 通过
|
||||
export const prettyNumberExaminePass = query => {
|
||||
return request({
|
||||
url: '/admin/prettyNumber/examine/pass',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 靓号申请管理 删除
|
||||
export const prettyNumberExamineDelete = query => {
|
||||
return request({
|
||||
url: '/admin/prettyNumber/examine/delete',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 靓号申请管理 拒绝
|
||||
export const prettyNumberExamineReject = query => {
|
||||
return request({
|
||||
url: '/admin/prettyNumber/examine/reject',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 靓号导入
|
||||
export const erbanUpload = query => {
|
||||
return request({
|
||||
url: '/prettyNumberExamine/erban/upload',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
data: query
|
||||
});
|
||||
};
|
104
src/api/relUserBelongings/relUserBelongings.js
Normal file
104
src/api/relUserBelongings/relUserBelongings.js
Normal file
@@ -0,0 +1,104 @@
|
||||
import request from '@/utils/request';
|
||||
import qs from 'qs';
|
||||
|
||||
// 用户财产 相关接口(一级菜单:用户财产管理)
|
||||
|
||||
// 获取 金币转赠历史列表
|
||||
export const getGoldCoinTransferList = query => {
|
||||
return request({
|
||||
url: '/gold/give/history',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 获取 金币转赠历史 金币汇总
|
||||
export const getGoldCoinSumGold = query => {
|
||||
return request({
|
||||
url: '/gold/give/history/sumGold',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 用户资产排行 列表
|
||||
export const getUserAssetsList = query => {
|
||||
return request({
|
||||
url: '/userAssets/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 用户资产排行 导出
|
||||
export const userAssetsExport = query => {
|
||||
return request({
|
||||
url: '/userAssets/export',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
// 金币钻石操作记录 列表
|
||||
export const officalGoldSearch = query => {
|
||||
return request({
|
||||
url: '/offical/gold/search',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 金币钻石操作记录 导出
|
||||
export const officalGoldExport = query => {
|
||||
return request({
|
||||
url: '/offical/gold/export',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
|
||||
// 操作货币增加/减少 列表
|
||||
export const officalGoldGive= query => {
|
||||
return request({
|
||||
url: '/offical/gold/give',
|
||||
method: 'post',
|
||||
params: query
|
||||
// data: qs.stringify(query)
|
||||
});
|
||||
};
|
||||
|
||||
// 操作货币增加/减少 查看用户
|
||||
export const getofficalGoldUserInfo = query => {
|
||||
return request({
|
||||
url: '/offical/gold/userInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 冻结用户资产管理 列表
|
||||
export const getFrozenRecordList = query => {
|
||||
return request({
|
||||
url: '/frozenRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 冻结用户资产管理 冻结
|
||||
export const userRecordFrozen= query => {
|
||||
return request({
|
||||
url: '/frozenRecord/frozen',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 冻结用户资产管理 解冻
|
||||
export const frozenRecordFree= query => {
|
||||
return request({
|
||||
url: '/frozenRecord/free',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
98
src/components/common/TablePagination.vue
Normal file
98
src/components/common/TablePagination.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
:layout="paginationLayout"
|
||||
:current-page="pageParams.pageNo"
|
||||
:page-size="pageParams.pageSize"
|
||||
:page-sizes="pageSizes"
|
||||
:total="pageTotal"
|
||||
:pager-count="pagerCount"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
pageParams: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
pageSizes: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return [5, 10, 20, 30, 40, 50, 100];
|
||||
}
|
||||
},
|
||||
// pagerCount: {
|
||||
// type: Number,
|
||||
// default: 5
|
||||
// },
|
||||
pageTotal: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
ifShowTotal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
ifShowSizes: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
ifShowPrev: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
ifShowPager: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
ifShowNext: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
ifShowJumper: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pagerCount: 5
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.$emit('handleSizeChange', val);
|
||||
},
|
||||
handlePageChange(val) {
|
||||
this.$emit('handlePageChange', val);
|
||||
},
|
||||
handleResize() {
|
||||
if (window.innerWidth > 768) {
|
||||
this.pagerCount = 5;
|
||||
} else {
|
||||
this.pagerCount = 2;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.handleResize(); // 初始化宽度
|
||||
},
|
||||
computed: {
|
||||
paginationLayout() {
|
||||
const layoutStr = ['total', 'sizes', 'prev', 'pager', 'next', 'jumper'];
|
||||
const { ifShowTotal, ifShowSizes, ifShowPrev, ifShowPager, ifShowNext, ifShowJumper } = this;
|
||||
let layoutWantedToBeShowed = [];
|
||||
[ifShowTotal, ifShowSizes, ifShowPrev, ifShowPager, ifShowNext, ifShowJumper].forEach((item, index) => {
|
||||
if (item) layoutWantedToBeShowed.push(index);
|
||||
});
|
||||
return layoutWantedToBeShowed.map((item) => layoutStr[item]).join(',');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
12
src/main.js
12
src/main.js
@@ -49,11 +49,17 @@ import '@/assets/plugins/bootstrap-treeview/js/bootstrap-treeview.min.js'
|
||||
|
||||
// @ts-ignore
|
||||
import components from '@/utils/components.js'
|
||||
|
||||
import Vue from 'vue';
|
||||
// import ElementPlus from 'element-plus'
|
||||
// import 'element-plus/dist/index.css'
|
||||
import '@/css/public.css'
|
||||
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
// import 'vue-clipboard2/dist/vue-clipboard.min.css'
|
||||
import { copy } from './utils/copy.js';
|
||||
const app = createApp(App)
|
||||
app.config.globalProperties.$copy = function (text) {
|
||||
copy(text, this);
|
||||
};
|
||||
|
||||
app.config.warnHandler = () => null;
|
||||
app.use(store).use(router).use(components).mount('#app')
|
||||
app.use(store).use(router).use(components).use(VueClipboard).mount('#app')
|
||||
|
81
src/mixin/mixRegion.js
Normal file
81
src/mixin/mixRegion.js
Normal file
@@ -0,0 +1,81 @@
|
||||
|
||||
// 公共混入 用户区服处理
|
||||
/**
|
||||
* 注意: 使用混入,在选择区服切换的时候会添加搜索的区服,
|
||||
* 所以页面data如果没有searchForm: { region: null }, 需要加上,否则查询searchForm为空
|
||||
*/
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userRegion: JSON.parse(localStorage.getItem('user_region')),
|
||||
regionEnum: [
|
||||
{ value: 1, name: 'A区' },
|
||||
{ value: 2, name: 'B区' },
|
||||
{ value: 3, name: 'C区' },
|
||||
{ value: 4, name: 'D区' },
|
||||
{ value: 5, name: 'E区' },
|
||||
{ value: 6, name: 'F区' }
|
||||
],
|
||||
userAreaRegion: [], //拥有权限的区域列表
|
||||
region: null, //展示的区域
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.handleUserRegion()
|
||||
},
|
||||
methods: {
|
||||
handleUserRegion() {
|
||||
if (this.userRegion.length == 0) {
|
||||
this.$message.error({
|
||||
message: '请先联系管理员设置你的区服权限!',
|
||||
duration: 5000
|
||||
});
|
||||
return
|
||||
}
|
||||
this.userAreaRegion = this.regionEnum.filter(item => this.userRegion.includes(item.value));
|
||||
this.region = this.userAreaRegion[0].value;
|
||||
this.searchForm.region = this.region;
|
||||
console.log('当前查看区服:', this.region);
|
||||
},
|
||||
handSearchRegion() {
|
||||
if (this.$refs['searchForm']) { // 检查 this.$refs['searchForm'] 是否存在
|
||||
this.$refs['searchForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
regionType() {
|
||||
const { regionEnum } = this;
|
||||
return function (value) {
|
||||
for (let item of regionEnum) {
|
||||
if (item.value === value) {
|
||||
return item.name;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
region: {
|
||||
handler(newVal, oldVal) {
|
||||
this.searchForm.region = newVal;
|
||||
// 防止初始化重复调用查询表单接口
|
||||
if (oldVal != null) {
|
||||
this.handSearchRegion()
|
||||
}
|
||||
},
|
||||
// immediate: true, //立即监听
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -51,6 +51,7 @@ export default {
|
||||
},
|
||||
getViewComponent(context, path) {
|
||||
let component = path;
|
||||
console.log(component)
|
||||
if (path && path.endsWith('.html')) {
|
||||
const pathArray = path.split('/');
|
||||
const routeName = toCamelCase(pathArray[pathArray.length - 1].replace('.html', ''));
|
||||
|
11
src/utils/copy.js
Normal file
11
src/utils/copy.js
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
// copy.js
|
||||
export function copy(text, vueInstance) {
|
||||
vueInstance.$copyText(text)
|
||||
.then(() => {
|
||||
vueInstance.$message.success('已复制');
|
||||
})
|
||||
.catch(() => {
|
||||
vueInstance.$message.warning('复制失败');
|
||||
});
|
||||
}
|
684
src/utils/excel/Blob.js
Normal file
684
src/utils/excel/Blob.js
Normal file
@@ -0,0 +1,684 @@
|
||||
// /* Blob.js
|
||||
// * A Blob, File, FileReader & URL implementation.
|
||||
// * 2019-04-19
|
||||
// *
|
||||
// * By Eli Grey, http://eligrey.com
|
||||
// * By Jimmy Wärting, https://github.com/jimmywarting
|
||||
// * License: MIT
|
||||
// * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
|
||||
// */
|
||||
|
||||
// ; (function () {
|
||||
// var global = typeof window === 'object'
|
||||
// ? window : typeof self === 'object'
|
||||
// ? self : this
|
||||
|
||||
// var BlobBuilder = global.BlobBuilder
|
||||
// || global.WebKitBlobBuilder
|
||||
// || global.MSBlobBuilder
|
||||
// || global.MozBlobBuilder
|
||||
|
||||
// global.URL = global.URL || global.webkitURL || function (href, a) {
|
||||
// a = document.createElement('a')
|
||||
// a.href = href
|
||||
// return a
|
||||
// }
|
||||
|
||||
// var origBlob = global.Blob
|
||||
// var createObjectURL = URL.createObjectURL
|
||||
// var revokeObjectURL = URL.revokeObjectURL
|
||||
// var strTag = global.Symbol && global.Symbol.toStringTag
|
||||
// var blobSupported = false
|
||||
// var blobSupportsArrayBufferView = false
|
||||
// var arrayBufferSupported = !!global.ArrayBuffer
|
||||
// var blobBuilderSupported = BlobBuilder
|
||||
// && BlobBuilder.prototype.append
|
||||
// && BlobBuilder.prototype.getBlob
|
||||
|
||||
// try {
|
||||
// // Check if Blob constructor is supported
|
||||
// blobSupported = new Blob(['ä']).size === 2
|
||||
|
||||
// // Check if Blob constructor supports ArrayBufferViews
|
||||
// // Fails in Safari 6, so we need to map to ArrayBuffers there.
|
||||
// blobSupportsArrayBufferView = new Blob([new Uint8Array([1, 2])]).size === 2
|
||||
// } catch (e) { }
|
||||
|
||||
// /**
|
||||
// * Helper function that maps ArrayBufferViews to ArrayBuffers
|
||||
// * Used by BlobBuilder constructor and old browsers that didn't
|
||||
// * support it in the Blob constructor.
|
||||
// */
|
||||
// function mapArrayBufferViews(ary) {
|
||||
// return ary.map(function (chunk) {
|
||||
// if (chunk.buffer instanceof ArrayBuffer) {
|
||||
// var buf = chunk.buffer
|
||||
|
||||
// // if this is a subarray, make a copy so we only
|
||||
// // include the subarray region from the underlying buffer
|
||||
// if (chunk.byteLength !== buf.byteLength) {
|
||||
// var copy = new Uint8Array(chunk.byteLength)
|
||||
// copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength))
|
||||
// buf = copy.buffer
|
||||
// }
|
||||
|
||||
// return buf
|
||||
// }
|
||||
|
||||
// return chunk
|
||||
// })
|
||||
// }
|
||||
|
||||
// function BlobBuilderConstructor(ary, options) {
|
||||
// options = options || {}
|
||||
|
||||
// var bb = new BlobBuilder()
|
||||
// mapArrayBufferViews(ary).forEach(function (part) {
|
||||
// bb.append(part)
|
||||
// })
|
||||
|
||||
// return options.type ? bb.getBlob(options.type) : bb.getBlob()
|
||||
// }
|
||||
|
||||
// function BlobConstructor(ary, options) {
|
||||
// return new origBlob(mapArrayBufferViews(ary), options || {})
|
||||
// }
|
||||
|
||||
// if (global.Blob) {
|
||||
// BlobBuilderConstructor.prototype = Blob.prototype
|
||||
// BlobConstructor.prototype = Blob.prototype
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// /********************************************************/
|
||||
// /* String Encoder fallback */
|
||||
// /********************************************************/
|
||||
// function stringEncode(string) {
|
||||
// var pos = 0
|
||||
// var len = string.length
|
||||
// var Arr = global.Uint8Array || Array // Use byte array when possible
|
||||
|
||||
// var at = 0 // output position
|
||||
// var tlen = Math.max(32, len + (len >> 1) + 7) // 1.5x size
|
||||
// var target = new Arr((tlen >> 3) << 3) // ... but at 8 byte offset
|
||||
|
||||
// while (pos < len) {
|
||||
// var value = string.charCodeAt(pos++)
|
||||
// if (value >= 0xd800 && value <= 0xdbff) {
|
||||
// // high surrogate
|
||||
// if (pos < len) {
|
||||
// var extra = string.charCodeAt(pos)
|
||||
// if ((extra & 0xfc00) === 0xdc00) {
|
||||
// ++pos
|
||||
// value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000
|
||||
// }
|
||||
// }
|
||||
// if (value >= 0xd800 && value <= 0xdbff) {
|
||||
// continue // drop lone surrogate
|
||||
// }
|
||||
// }
|
||||
|
||||
// // expand the buffer if we couldn't write 4 bytes
|
||||
// if (at + 4 > target.length) {
|
||||
// tlen += 8 // minimum extra
|
||||
// tlen *= (1.0 + (pos / string.length) * 2) // take 2x the remaining
|
||||
// tlen = (tlen >> 3) << 3 // 8 byte offset
|
||||
|
||||
// var update = new Uint8Array(tlen)
|
||||
// update.set(target)
|
||||
// target = update
|
||||
// }
|
||||
|
||||
// if ((value & 0xffffff80) === 0) { // 1-byte
|
||||
// target[at++] = value // ASCII
|
||||
// continue
|
||||
// } else if ((value & 0xfffff800) === 0) { // 2-byte
|
||||
// target[at++] = ((value >> 6) & 0x1f) | 0xc0
|
||||
// } else if ((value & 0xffff0000) === 0) { // 3-byte
|
||||
// target[at++] = ((value >> 12) & 0x0f) | 0xe0
|
||||
// target[at++] = ((value >> 6) & 0x3f) | 0x80
|
||||
// } else if ((value & 0xffe00000) === 0) { // 4-byte
|
||||
// target[at++] = ((value >> 18) & 0x07) | 0xf0
|
||||
// target[at++] = ((value >> 12) & 0x3f) | 0x80
|
||||
// target[at++] = ((value >> 6) & 0x3f) | 0x80
|
||||
// } else {
|
||||
// // FIXME: do we care
|
||||
// continue
|
||||
// }
|
||||
|
||||
// target[at++] = (value & 0x3f) | 0x80
|
||||
// }
|
||||
|
||||
// return target.slice(0, at)
|
||||
// }
|
||||
|
||||
// /********************************************************/
|
||||
// /* String Decoder fallback */
|
||||
// /********************************************************/
|
||||
// function stringDecode(buf) {
|
||||
// var end = buf.length
|
||||
// var res = []
|
||||
|
||||
// var i = 0
|
||||
// while (i < end) {
|
||||
// var firstByte = buf[i]
|
||||
// var codePoint = null
|
||||
// var bytesPerSequence = (firstByte > 0xEF) ? 4
|
||||
// : (firstByte > 0xDF) ? 3
|
||||
// : (firstByte > 0xBF) ? 2
|
||||
// : 1
|
||||
|
||||
// if (i + bytesPerSequence <= end) {
|
||||
// var secondByte, thirdByte, fourthByte, tempCodePoint
|
||||
|
||||
// switch (bytesPerSequence) {
|
||||
// case 1:
|
||||
// if (firstByte < 0x80) {
|
||||
// codePoint = firstByte
|
||||
// }
|
||||
// break
|
||||
// case 2:
|
||||
// secondByte = buf[i + 1]
|
||||
// if ((secondByte & 0xC0) === 0x80) {
|
||||
// tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
||||
// if (tempCodePoint > 0x7F) {
|
||||
// codePoint = tempCodePoint
|
||||
// }
|
||||
// }
|
||||
// break
|
||||
// case 3:
|
||||
// secondByte = buf[i + 1]
|
||||
// thirdByte = buf[i + 2]
|
||||
// if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
||||
// tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
||||
// if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
||||
// codePoint = tempCodePoint
|
||||
// }
|
||||
// }
|
||||
// break
|
||||
// case 4:
|
||||
// secondByte = buf[i + 1]
|
||||
// thirdByte = buf[i + 2]
|
||||
// fourthByte = buf[i + 3]
|
||||
// if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
||||
// tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
||||
// if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
||||
// codePoint = tempCodePoint
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (codePoint === null) {
|
||||
// // we did not generate a valid codePoint so insert a
|
||||
// // replacement char (U+FFFD) and advance only 1 byte
|
||||
// codePoint = 0xFFFD
|
||||
// bytesPerSequence = 1
|
||||
// } else if (codePoint > 0xFFFF) {
|
||||
// // encode to utf16 (surrogate pair dance)
|
||||
// codePoint -= 0x10000
|
||||
// res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
||||
// codePoint = 0xDC00 | codePoint & 0x3FF
|
||||
// }
|
||||
|
||||
// res.push(codePoint)
|
||||
// i += bytesPerSequence
|
||||
// }
|
||||
|
||||
// var len = res.length
|
||||
// var str = ''
|
||||
// var i = 0
|
||||
|
||||
// while (i < len) {
|
||||
// str += String.fromCharCode.apply(String, res.slice(i, i += 0x1000))
|
||||
// }
|
||||
|
||||
// return str
|
||||
// }
|
||||
|
||||
// // string -> buffer
|
||||
// var textEncode = typeof TextEncoder === 'function'
|
||||
// ? TextEncoder.prototype.encode.bind(new TextEncoder())
|
||||
// : stringEncode
|
||||
|
||||
// // buffer -> string
|
||||
// var textDecode = typeof TextDecoder === 'function'
|
||||
// ? TextDecoder.prototype.decode.bind(new TextDecoder())
|
||||
// : stringDecode
|
||||
|
||||
// function FakeBlobBuilder() {
|
||||
// function isDataView(obj) {
|
||||
// return obj && DataView.prototype.isPrototypeOf(obj)
|
||||
// }
|
||||
// function bufferClone(buf) {
|
||||
// var view = new Array(buf.byteLength)
|
||||
// var array = new Uint8Array(buf)
|
||||
// var i = view.length
|
||||
// while (i--) {
|
||||
// view[i] = array[i]
|
||||
// }
|
||||
// return view
|
||||
// }
|
||||
// function array2base64(input) {
|
||||
// var byteToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
|
||||
|
||||
// var output = []
|
||||
|
||||
// for (var i = 0; i < input.length; i += 3) {
|
||||
// var byte1 = input[i]
|
||||
// var haveByte2 = i + 1 < input.length
|
||||
// var byte2 = haveByte2 ? input[i + 1] : 0
|
||||
// var haveByte3 = i + 2 < input.length
|
||||
// var byte3 = haveByte3 ? input[i + 2] : 0
|
||||
|
||||
// var outByte1 = byte1 >> 2
|
||||
// var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4)
|
||||
// var outByte3 = ((byte2 & 0x0F) << 2) | (byte3 >> 6)
|
||||
// var outByte4 = byte3 & 0x3F
|
||||
|
||||
// if (!haveByte3) {
|
||||
// outByte4 = 64
|
||||
|
||||
// if (!haveByte2) {
|
||||
// outByte3 = 64
|
||||
// }
|
||||
// }
|
||||
|
||||
// output.push(
|
||||
// byteToCharMap[outByte1], byteToCharMap[outByte2],
|
||||
// byteToCharMap[outByte3], byteToCharMap[outByte4]
|
||||
// )
|
||||
// }
|
||||
|
||||
// return output.join('')
|
||||
// }
|
||||
|
||||
// var create = Object.create || function (a) {
|
||||
// function c() { }
|
||||
// c.prototype = a
|
||||
// return new c()
|
||||
// }
|
||||
|
||||
// if (arrayBufferSupported) {
|
||||
// var viewClasses = [
|
||||
// '[object Int8Array]',
|
||||
// '[object Uint8Array]',
|
||||
// '[object Uint8ClampedArray]',
|
||||
// '[object Int16Array]',
|
||||
// '[object Uint16Array]',
|
||||
// '[object Int32Array]',
|
||||
// '[object Uint32Array]',
|
||||
// '[object Float32Array]',
|
||||
// '[object Float64Array]'
|
||||
// ]
|
||||
|
||||
// var isArrayBufferView = ArrayBuffer.isView || function (obj) {
|
||||
// return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
||||
// }
|
||||
// }
|
||||
|
||||
// function concatTypedarrays(chunks) {
|
||||
// var size = 0
|
||||
// var i = chunks.length
|
||||
// while (i--) { size += chunks[i].length }
|
||||
// var b = new Uint8Array(size)
|
||||
// var offset = 0
|
||||
// for (i = 0, l = chunks.length; i < l; i++) {
|
||||
// var chunk = chunks[i]
|
||||
// b.set(chunk, offset)
|
||||
// offset += chunk.byteLength || chunk.length
|
||||
// }
|
||||
|
||||
// return b
|
||||
// }
|
||||
|
||||
// /********************************************************/
|
||||
// /* Blob constructor */
|
||||
// /********************************************************/
|
||||
// function Blob(chunks, opts) {
|
||||
// chunks = chunks || []
|
||||
// opts = opts == null ? {} : opts
|
||||
// for (var i = 0, len = chunks.length; i < len; i++) {
|
||||
// var chunk = chunks[i]
|
||||
// if (chunk instanceof Blob) {
|
||||
// chunks[i] = chunk._buffer
|
||||
// } else if (typeof chunk === 'string') {
|
||||
// chunks[i] = textEncode(chunk)
|
||||
// } else if (arrayBufferSupported && (ArrayBuffer.prototype.isPrototypeOf(chunk) || isArrayBufferView(chunk))) {
|
||||
// chunks[i] = bufferClone(chunk)
|
||||
// } else if (arrayBufferSupported && isDataView(chunk)) {
|
||||
// chunks[i] = bufferClone(chunk.buffer)
|
||||
// } else {
|
||||
// chunks[i] = textEncode(String(chunk))
|
||||
// }
|
||||
// }
|
||||
|
||||
// this._buffer = global.Uint8Array
|
||||
// ? concatTypedarrays(chunks)
|
||||
// : [].concat.apply([], chunks)
|
||||
// this.size = this._buffer.length
|
||||
|
||||
// this.type = opts.type || ''
|
||||
// if (/[^\u0020-\u007E]/.test(this.type)) {
|
||||
// this.type = ''
|
||||
// } else {
|
||||
// this.type = this.type.toLowerCase()
|
||||
// }
|
||||
// }
|
||||
|
||||
// Blob.prototype.arrayBuffer = function () {
|
||||
// return Promise.resolve(this._buffer)
|
||||
// }
|
||||
|
||||
// Blob.prototype.text = function () {
|
||||
// return Promise.resolve(textDecode(this._buffer))
|
||||
// }
|
||||
|
||||
// Blob.prototype.slice = function (start, end, type) {
|
||||
// var slice = this._buffer.slice(start || 0, end || this._buffer.length)
|
||||
// return new Blob([slice], { type: type })
|
||||
// }
|
||||
|
||||
// Blob.prototype.toString = function () {
|
||||
// return '[object Blob]'
|
||||
// }
|
||||
|
||||
// /********************************************************/
|
||||
// /* File constructor */
|
||||
// /********************************************************/
|
||||
// function File(chunks, name, opts) {
|
||||
// opts = opts || {}
|
||||
// var a = Blob.call(this, chunks, opts) || this
|
||||
// a.name = name.replace(/\//g, ':')
|
||||
// a.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date()
|
||||
// a.lastModified = +a.lastModifiedDate
|
||||
|
||||
// return a
|
||||
// }
|
||||
|
||||
// File.prototype = create(Blob.prototype)
|
||||
// File.prototype.constructor = File
|
||||
|
||||
// if (Object.setPrototypeOf) {
|
||||
// Object.setPrototypeOf(File, Blob)
|
||||
// } else {
|
||||
// try { File.__proto__ = Blob } catch (e) { }
|
||||
// }
|
||||
|
||||
// File.prototype.toString = function () {
|
||||
// return '[object File]'
|
||||
// }
|
||||
|
||||
// /********************************************************/
|
||||
// /* FileReader constructor */
|
||||
// /********************************************************/
|
||||
// function FileReader() {
|
||||
// if (!(this instanceof FileReader)) {
|
||||
// throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.")
|
||||
// }
|
||||
|
||||
// var delegate = document.createDocumentFragment()
|
||||
// this.addEventListener = delegate.addEventListener
|
||||
// this.dispatchEvent = function (evt) {
|
||||
// var local = this['on' + evt.type]
|
||||
// if (typeof local === 'function') local(evt)
|
||||
// delegate.dispatchEvent(evt)
|
||||
// }
|
||||
// this.removeEventListener = delegate.removeEventListener
|
||||
// }
|
||||
|
||||
// function _read(fr, blob, kind) {
|
||||
// if (!(blob instanceof Blob)) {
|
||||
// throw new TypeError("Failed to execute '" + kind + "' on 'FileReader': parameter 1 is not of type 'Blob'.")
|
||||
// }
|
||||
|
||||
// fr.result = ''
|
||||
|
||||
// setTimeout(function () {
|
||||
// this.readyState = FileReader.LOADING
|
||||
// fr.dispatchEvent(new Event('load'))
|
||||
// fr.dispatchEvent(new Event('loadend'))
|
||||
// })
|
||||
// }
|
||||
|
||||
// FileReader.EMPTY = 0
|
||||
// FileReader.LOADING = 1
|
||||
// FileReader.DONE = 2
|
||||
// FileReader.prototype.error = null
|
||||
// FileReader.prototype.onabort = null
|
||||
// FileReader.prototype.onerror = null
|
||||
// FileReader.prototype.onload = null
|
||||
// FileReader.prototype.onloadend = null
|
||||
// FileReader.prototype.onloadstart = null
|
||||
// FileReader.prototype.onprogress = null
|
||||
|
||||
// FileReader.prototype.readAsDataURL = function (blob) {
|
||||
// _read(this, blob, 'readAsDataURL')
|
||||
// this.result = 'data:' + blob.type + ';base64,' + array2base64(blob._buffer)
|
||||
// }
|
||||
|
||||
// FileReader.prototype.readAsText = function (blob) {
|
||||
// _read(this, blob, 'readAsText')
|
||||
// this.result = textDecode(blob._buffer)
|
||||
// }
|
||||
|
||||
// FileReader.prototype.readAsArrayBuffer = function (blob) {
|
||||
// _read(this, blob, 'readAsText')
|
||||
// // return ArrayBuffer when possible
|
||||
// this.result = (blob._buffer.buffer || blob._buffer).slice()
|
||||
// }
|
||||
|
||||
// FileReader.prototype.abort = function () { }
|
||||
|
||||
// /********************************************************/
|
||||
// /* URL */
|
||||
// /********************************************************/
|
||||
// URL.createObjectURL = function (blob) {
|
||||
// return blob instanceof Blob
|
||||
// ? 'data:' + blob.type + ';base64,' + array2base64(blob._buffer)
|
||||
// : createObjectURL.call(URL, blob)
|
||||
// }
|
||||
|
||||
// URL.revokeObjectURL = function (url) {
|
||||
// revokeObjectURL && revokeObjectURL.call(URL, url)
|
||||
// }
|
||||
|
||||
// /********************************************************/
|
||||
// /* XHR */
|
||||
// /********************************************************/
|
||||
// var _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
|
||||
// if (_send) {
|
||||
// XMLHttpRequest.prototype.send = function (data) {
|
||||
// if (data instanceof Blob) {
|
||||
// this.setRequestHeader('Content-Type', data.type)
|
||||
// _send.call(this, textDecode(data._buffer))
|
||||
// } else {
|
||||
// _send.call(this, data)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// global.FileReader = FileReader
|
||||
// global.File = File
|
||||
// global.Blob = Blob
|
||||
// }
|
||||
|
||||
// function fixFileAndXHR() {
|
||||
// var isIE = !!global.ActiveXObject || (
|
||||
// '-ms-scroll-limit' in document.documentElement.style &&
|
||||
// '-ms-ime-align' in document.documentElement.style
|
||||
// )
|
||||
|
||||
// // Monkey patched
|
||||
// // IE don't set Content-Type header on XHR whose body is a typed Blob
|
||||
// // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6047383
|
||||
// var _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
|
||||
// if (isIE && _send) {
|
||||
// XMLHttpRequest.prototype.send = function (data) {
|
||||
// if (data instanceof Blob) {
|
||||
// this.setRequestHeader('Content-Type', data.type)
|
||||
// _send.call(this, data)
|
||||
// } else {
|
||||
// _send.call(this, data)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// try {
|
||||
// new File([], '')
|
||||
// } catch (e) {
|
||||
// try {
|
||||
// var klass = new Function('class File extends Blob {' +
|
||||
// 'constructor(chunks, name, opts) {' +
|
||||
// 'opts = opts || {};' +
|
||||
// 'super(chunks, opts || {});' +
|
||||
// 'this.name = name.replace(/\//g, ":");' +
|
||||
// 'this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date();' +
|
||||
// 'this.lastModified = +this.lastModifiedDate;' +
|
||||
// '}};' +
|
||||
// 'return new File([], ""), File'
|
||||
// )()
|
||||
// global.File = klass
|
||||
// } catch (e) {
|
||||
// var klass = function (b, d, c) {
|
||||
// var blob = new Blob(b, c)
|
||||
// var t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date()
|
||||
|
||||
// blob.name = d.replace(/\//g, ':')
|
||||
// blob.lastModifiedDate = t
|
||||
// blob.lastModified = +t
|
||||
// blob.toString = function () {
|
||||
// return '[object File]'
|
||||
// }
|
||||
|
||||
// if (strTag) {
|
||||
// blob[strTag] = 'File'
|
||||
// }
|
||||
|
||||
// return blob
|
||||
// }
|
||||
// global.File = klass
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (blobSupported) {
|
||||
// fixFileAndXHR()
|
||||
// global.Blob = blobSupportsArrayBufferView ? global.Blob : BlobConstructor
|
||||
// } else if (blobBuilderSupported) {
|
||||
// fixFileAndXHR()
|
||||
// global.Blob = BlobBuilderConstructor
|
||||
// } else {
|
||||
// FakeBlobBuilder()
|
||||
// }
|
||||
|
||||
// if (strTag) {
|
||||
// File.prototype[strTag] = 'File'
|
||||
// Blob.prototype[strTag] = 'Blob'
|
||||
// FileReader.prototype[strTag] = 'FileReader'
|
||||
// }
|
||||
|
||||
// var blob = global.Blob.prototype
|
||||
// var stream
|
||||
|
||||
// function promisify(obj) {
|
||||
// return new Promise(function (resolve, reject) {
|
||||
// obj.onload =
|
||||
// obj.onerror = function (evt) {
|
||||
// obj.onload =
|
||||
// obj.onerror = null
|
||||
|
||||
// evt.type === 'load'
|
||||
// ? resolve(obj.result || obj)
|
||||
// : reject(new Error('Failed to read the blob/file'))
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
// try {
|
||||
// new ReadableStream({ type: 'bytes' })
|
||||
// stream = function stream() {
|
||||
// var position = 0
|
||||
// var blob = this
|
||||
|
||||
// return new ReadableStream({
|
||||
// type: 'bytes',
|
||||
// autoAllocateChunkSize: 524288,
|
||||
|
||||
// pull: function (controller) {
|
||||
// var v = controller.byobRequest.view
|
||||
// var chunk = blob.slice(position, position + v.byteLength)
|
||||
// return chunk.arrayBuffer()
|
||||
// .then(function (buffer) {
|
||||
// var uint8array = new Uint8Array(buffer)
|
||||
// var bytesRead = uint8array.byteLength
|
||||
|
||||
// position += bytesRead
|
||||
// v.set(uint8array)
|
||||
// controller.byobRequest.respond(bytesRead)
|
||||
|
||||
// if (position >= blob.size)
|
||||
// controller.close()
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// } catch (e) {
|
||||
// try {
|
||||
// new ReadableStream({})
|
||||
// stream = function stream(blob) {
|
||||
// var position = 0
|
||||
// var blob = this
|
||||
|
||||
// return new ReadableStream({
|
||||
// pull: function (controller) {
|
||||
// var chunk = blob.slice(position, position + 524288)
|
||||
|
||||
// return chunk.arrayBuffer().then(function (buffer) {
|
||||
// position += buffer.byteLength
|
||||
// var uint8array = new Uint8Array(buffer)
|
||||
// controller.enqueue(uint8array)
|
||||
|
||||
// if (position == blob.size)
|
||||
// controller.close()
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// } catch (e) {
|
||||
// try {
|
||||
// new Response('').body.getReader().read()
|
||||
// stream = function stream() {
|
||||
// return (new Response(this)).body
|
||||
// }
|
||||
// } catch (e) {
|
||||
// stream = function stream() {
|
||||
// throw new Error('Include https://github.com/MattiasBuelens/web-streams-polyfill')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// if (!blob.arrayBuffer) {
|
||||
// blob.arrayBuffer = function arrayBuffer() {
|
||||
// var fr = new FileReader()
|
||||
// fr.readAsArrayBuffer(this)
|
||||
// return promisify(fr)
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (!blob.text) {
|
||||
// blob.text = function text() {
|
||||
// var fr = new FileReader()
|
||||
// fr.readAsText(this)
|
||||
// return promisify(fr)
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (!blob.stream) {
|
||||
// blob.stream = stream
|
||||
// }
|
||||
// })()
|
141
src/utils/excel/Export2Excel.js
Normal file
141
src/utils/excel/Export2Excel.js
Normal file
@@ -0,0 +1,141 @@
|
||||
/* eslint-disable */
|
||||
require('script-loader!file-saver');
|
||||
// require('script-loader!./Blob.js');
|
||||
require('script-loader!xlsx/dist/xlsx.core.min');
|
||||
function generateArray(table) {
|
||||
var out = [];
|
||||
var rows = table.querySelectorAll('tr');
|
||||
var ranges = [];
|
||||
for (var R = 0; R < rows.length; ++R) {
|
||||
var outRow = [];
|
||||
var row = rows[R];
|
||||
var columns = row.querySelectorAll('td');
|
||||
for (var C = 0; C < columns.length; ++C) {
|
||||
var cell = columns[C];
|
||||
var colspan = cell.getAttribute('colspan');
|
||||
var rowspan = cell.getAttribute('rowspan');
|
||||
var cellValue = cell.innerText;
|
||||
if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
|
||||
|
||||
//Skip ranges
|
||||
ranges.forEach(function (range) {
|
||||
if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
|
||||
for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
//Handle Row Span
|
||||
if (rowspan || colspan) {
|
||||
rowspan = rowspan || 1;
|
||||
colspan = colspan || 1;
|
||||
ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}});
|
||||
}
|
||||
;
|
||||
|
||||
//Handle Value
|
||||
outRow.push(cellValue !== "" ? cellValue : null);
|
||||
|
||||
//Handle Colspan
|
||||
if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
|
||||
}
|
||||
out.push(outRow);
|
||||
}
|
||||
return [out, ranges];
|
||||
};
|
||||
|
||||
function datenum(v, date1904) {
|
||||
if (date1904) v += 1462;
|
||||
var epoch = Date.parse(v);
|
||||
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
|
||||
}
|
||||
|
||||
function sheet_from_array_of_arrays(data, opts) {
|
||||
var ws = {};
|
||||
var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
|
||||
for (var R = 0; R != data.length; ++R) {
|
||||
for (var C = 0; C != data[R].length; ++C) {
|
||||
if (range.s.r > R) range.s.r = R;
|
||||
if (range.s.c > C) range.s.c = C;
|
||||
if (range.e.r < R) range.e.r = R;
|
||||
if (range.e.c < C) range.e.c = C;
|
||||
var cell = {v: data[R][C]};
|
||||
if (cell.v == null) continue;
|
||||
var cell_ref = XLSX.utils.encode_cell({c: C, r: R});
|
||||
|
||||
if (typeof cell.v === 'number') cell.t = 'n';
|
||||
else if (typeof cell.v === 'boolean') cell.t = 'b';
|
||||
else if (cell.v instanceof Date) {
|
||||
cell.t = 'n';
|
||||
cell.z = XLSX.SSF._table[14];
|
||||
cell.v = datenum(cell.v);
|
||||
}
|
||||
else cell.t = 's';
|
||||
|
||||
ws[cell_ref] = cell;
|
||||
}
|
||||
}
|
||||
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
|
||||
return ws;
|
||||
}
|
||||
|
||||
function Workbook() {
|
||||
if (!(this instanceof Workbook)) return new Workbook();
|
||||
this.SheetNames = [];
|
||||
this.Sheets = {};
|
||||
}
|
||||
|
||||
function s2ab(s) {
|
||||
var buf = new ArrayBuffer(s.length);
|
||||
var view = new Uint8Array(buf);
|
||||
for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
|
||||
return buf;
|
||||
}
|
||||
|
||||
export function export_table_to_excel(id) {
|
||||
var theTable = document.getElementById(id);
|
||||
console.log('a')
|
||||
var oo = generateArray(theTable);
|
||||
var ranges = oo[1];
|
||||
|
||||
/* original data */
|
||||
var data = oo[0];
|
||||
var ws_name = "SheetJS";
|
||||
console.log(data);
|
||||
|
||||
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
|
||||
|
||||
/* add ranges to worksheet */
|
||||
// ws['!cols'] = ['apple', 'banan'];
|
||||
ws['!merges'] = ranges;
|
||||
|
||||
/* add worksheet to workbook */
|
||||
wb.SheetNames.push(ws_name);
|
||||
wb.Sheets[ws_name] = ws;
|
||||
|
||||
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
|
||||
|
||||
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
|
||||
}
|
||||
|
||||
function formatJson(jsonData) {
|
||||
console.log(jsonData)
|
||||
}
|
||||
export function export_json_to_excel(th, jsonData, defaultTitle) {
|
||||
|
||||
/* original data */
|
||||
|
||||
var data = jsonData;
|
||||
data.unshift(th);
|
||||
var ws_name = "SheetJS";
|
||||
|
||||
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
|
||||
|
||||
|
||||
/* add worksheet to workbook */
|
||||
wb.SheetNames.push(ws_name);
|
||||
wb.Sheets[ws_name] = ws;
|
||||
|
||||
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
|
||||
var title = defaultTitle || '列表'
|
||||
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
|
||||
}
|
11
src/utils/exportExcel.js
Normal file
11
src/utils/exportExcel.js
Normal file
@@ -0,0 +1,11 @@
|
||||
function formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => v[j]));
|
||||
}
|
||||
|
||||
export const exportExcel = (tHeader, filterVal, data, excelName) => {
|
||||
require.ensure([], () => {
|
||||
const { export_json_to_excel } = require('./excel/Export2Excel.js');
|
||||
const combineData = formatJson(filterVal, data);
|
||||
export_json_to_excel(tHeader, combineData, excelName);
|
||||
});
|
||||
}
|
107
src/utils/relDate.js
Normal file
107
src/utils/relDate.js
Normal file
@@ -0,0 +1,107 @@
|
||||
export const formatDate = (value) => {
|
||||
let timezone = 3; //目标时区时间,东3区(东时区正数 西时区负数)
|
||||
let offset_GMT = new Date(value).getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
|
||||
let nowDate = new Date(value).getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
|
||||
let date = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
|
||||
|
||||
// 提取年、月、日、小时、分钟和秒
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
return `${y}-${MM}-${d} ${h}:${m}:${s}`;
|
||||
}
|
||||
|
||||
export const formatDate2 = (value) => {
|
||||
let timezone = 3; //目标时区时间,东3区(东时区正数 西时区负数)
|
||||
let offset_GMT = new Date(value).getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
|
||||
let nowDate = new Date(value).getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
|
||||
let date = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
|
||||
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
return `${y}/${MM}/${d} ${h}:${m}:${s}`;
|
||||
}
|
||||
|
||||
export const formatDateYMD = (value) => {
|
||||
let timezone = 3; //目标时区时间,东3区(东时区正数 西时区负数)
|
||||
let offset_GMT = new Date(value).getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
|
||||
let nowDate = new Date(value).getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
|
||||
let date = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
|
||||
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
return `${y}/${MM}/${d}`;
|
||||
}
|
||||
|
||||
export const formatDateYYYYMMDD = (value) => {
|
||||
let date = new Date(value);
|
||||
// 将时区设置为GMT+3
|
||||
let gmtOffset = 3; // GMT+3时区偏移量为3小时
|
||||
let localOffset = date.getTimezoneOffset() / 60; // 获取本地时区偏移量(以小时为单位)
|
||||
let targetOffset = gmtOffset - localOffset; // 计算目标时区偏移量
|
||||
date.setHours(date.getHours() + targetOffset); // 根据偏移量调整小时
|
||||
|
||||
const y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
|
||||
return `${y}-${MM}-${d}`;
|
||||
}
|
||||
|
||||
|
||||
export const formatDateYYYYMM = (value) => {
|
||||
let date = new Date(value);
|
||||
// 将时区设置为GMT+3
|
||||
let gmtOffset = 3; // GMT+3时区偏移量为3小时
|
||||
let localOffset = date.getTimezoneOffset() / 60; // 获取本地时区偏移量(以小时为单位)
|
||||
let targetOffset = gmtOffset - localOffset; // 计算目标时区偏移量
|
||||
date.setHours(date.getHours() + targetOffset); // 根据偏移量调整小时
|
||||
|
||||
let y = date.getFullYear();
|
||||
let MM = date.getMonth() + 1;
|
||||
MM = MM < 10 ? ('0' + MM) : MM;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
let h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let m = date.getMinutes();
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let s = date.getSeconds();
|
||||
s = s < 10 ? ('0' + s) : s;
|
||||
console.log(y, MM, d, h, s);
|
||||
return `${y}-${MM}`;
|
||||
}
|
238
src/views/GiftPanelManagement/GiftPanelManagement.vue
Normal file
238
src/views/GiftPanelManagement/GiftPanelManagement.vue
Normal file
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 选择分区 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">选择分区</span>
|
||||
<el-select
|
||||
v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="seq" align="center" label="排序" />
|
||||
<el-table-column prop="name" align="center" label="礼物面板类型" />
|
||||
<el-table-column prop="enable" align="center" label="是否生效">
|
||||
<template v-slot="scope">{{ scope.row.enable ? "是" : "否" }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="ediClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="eidDialog" :title="eidDialogTitle" width="30%" center>
|
||||
<!-- 礼物面板类型 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼物面板类型</span
|
||||
>
|
||||
<el-input
|
||||
v-model="eidObj.type"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 面板排序 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>面板排序-{{ eidText }}</span
|
||||
>
|
||||
<el-input
|
||||
v-model="eidObj.seq"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 是否生效 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>是否生效</span
|
||||
>
|
||||
<el-select
|
||||
v-model="eidObj.value"
|
||||
style="width: 60%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eidObj.option"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="eidDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="eidDialogClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { list, update } from "@/api/GiftPanelManagement/GiftPanelManagement";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GiftPanelManagement",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
partitionId: 4,
|
||||
inquireonInfos: [
|
||||
{ desc: "英语区", id: 1 },
|
||||
{ desc: "阿拉伯区", id: 2 },
|
||||
{ desc: "华语区", id: 4 },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 编辑
|
||||
eidDialog: false,
|
||||
eidDialogTitle: "",
|
||||
eidText: "",
|
||||
eidObjNew: {},
|
||||
eidObj: {
|
||||
type: "",
|
||||
clientName: "",
|
||||
seq: "",
|
||||
value: "",
|
||||
option: [
|
||||
{
|
||||
desc: "是",
|
||||
id: true,
|
||||
},
|
||||
{
|
||||
desc: "否",
|
||||
id: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||
this.eidText = `华语区`;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
list({
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
ediClick(val) {
|
||||
this.eidDialog = true;
|
||||
this.eidObj.type = val.name;
|
||||
this.eidObj.seq = val.seq;
|
||||
this.eidObj.value = val.enable;
|
||||
this.eidObjNew = val;
|
||||
},
|
||||
eidDialogClick() {
|
||||
update({
|
||||
enable: this.eidObj.value,
|
||||
id: this.eidObjNew.id,
|
||||
seq: this.eidObj.seq,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "编辑成功",
|
||||
type: "success",
|
||||
});
|
||||
this.eidDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChange(val) {
|
||||
console.log(val);
|
||||
if (val == 1) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-英语区`;
|
||||
this.eidText = `英语区`;
|
||||
} else if (val == 2) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-阿拉伯区`;
|
||||
this.eidText = `阿拉伯区`;
|
||||
} else if (val == 4) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||
this.eidText = `华语区`;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 70px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
429
src/views/accountApplyManage/accountApplyManage.vue
Normal file
429
src/views/accountApplyManage/accountApplyManage.vue
Normal file
@@ -0,0 +1,429 @@
|
||||
<template>
|
||||
<div class="account-apply-manage">
|
||||
<div class="container">
|
||||
<div class="region-box">
|
||||
<el-radio-group v-model="region">
|
||||
<el-radio
|
||||
v-for="(item, index) in userAreaRegion"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
>{{ item.name }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="handle-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
:disabled="tableLoading"
|
||||
>
|
||||
<div class="search-line">
|
||||
<el-form-item label="Shaker ID" prop="erbanNo">
|
||||
<el-input
|
||||
v-model.trim="searchForm.erbanNo"
|
||||
placeholder="Please enter"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="UID" prop="uid">
|
||||
<el-input
|
||||
v-model.trim="searchForm.uid"
|
||||
placeholder="Please enter"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="SID" prop="sid">
|
||||
<el-input
|
||||
v-model.trim="searchForm.sid"
|
||||
placeholder="Please enter"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="40px">
|
||||
<el-button type="primary" @click="handSearch">Search</el-button>
|
||||
<el-button plain @click="resetSearchForm">Reset Search</el-button>
|
||||
<el-upload
|
||||
class="file-uploader"
|
||||
action="#"
|
||||
list-type="picture-card"
|
||||
:show-file-list="false"
|
||||
:on-change="handleExcel"
|
||||
accept=".xls, .xlsx"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<el-button type="primary">Import</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<!-- <el-upload
|
||||
class="file-uploader"
|
||||
action="#"
|
||||
list-type="picture-card"
|
||||
:show-file-list="false"
|
||||
:on-change="handleExcel"
|
||||
accept=".xls, .xlsx"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<el-button type="primary" class="el-icon-upload">Import</el-button>
|
||||
</el-upload> -->
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
@header-click="headerCopy"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column align="center" prop="id" label="No.">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="erbanNo" label="Shaker ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="uid" label="UID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="level" label="SID Level">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="nick" label="Nickname">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="createTime" label="Apply time">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.createTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="prettyNo" label="SID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="status" label="State">
|
||||
<template v-slot="scope">
|
||||
<el-tag :type="applyStateTag(scope.row.status)">{{
|
||||
applyStateText(scope.row.status)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="updateTime" label="Review time">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.updateTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="Operate">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
v-if="scope.row.status == 0"
|
||||
@click="handlePass(scope.$index, scope.row)"
|
||||
>
|
||||
Pass
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
v-if="scope.row.status == 0"
|
||||
@click="handleReject(scope.$index, scope.row)"
|
||||
>
|
||||
Reject
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
v-if="scope.row.status == 1"
|
||||
class="red"
|
||||
@click="handleDelete(scope.$index, scope.row)"
|
||||
>
|
||||
Delete
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<table-pagination
|
||||
:pageParams="pageParams"
|
||||
:pageTotal="pageTotal"
|
||||
:ifShowSizes="true"
|
||||
@handleSizeChange="handleSizeChange"
|
||||
@handlePageChange="handlePageChange"
|
||||
></table-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPrettyNumberExamineList,
|
||||
prettyNumberExaminePass,
|
||||
prettyNumberExamineDelete,
|
||||
prettyNumberExamineReject,
|
||||
erbanUpload,
|
||||
} from "@/api/relPrivilegeManage/relPrivilegeManage.js";
|
||||
import TablePagination from "@/components/common/TablePagination";
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
import { ElMessageBox, ElMessage } from "element-plus"; // 正确引入 ElM
|
||||
// 混入
|
||||
// import Mixin from '../../mixin/mixRegion.js';
|
||||
|
||||
export default {
|
||||
name: "accountApplyManage",
|
||||
// mixins: [Mixin],
|
||||
components: { TablePagination },
|
||||
data() {
|
||||
return {
|
||||
tableLoading: false, // 表格是否加载中
|
||||
tableData: [], // 接口返回的表格数据
|
||||
// 搜索表单相关
|
||||
searchForm: {
|
||||
erbanNo: null,
|
||||
uid: null,
|
||||
level: null,
|
||||
region: null,
|
||||
},
|
||||
pageTotal: 0, // 接口返回的表格总条数
|
||||
pageParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.tableLoading = true;
|
||||
|
||||
let { pageParams, searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams, searchForm);
|
||||
|
||||
getPrettyNumberExamineList(pageParams).then((res) => {
|
||||
this.tableLoading = false;
|
||||
if (res.code == 200) {
|
||||
let data = res.data;
|
||||
console.log(data);
|
||||
this.tableData = data.rows;
|
||||
this.pageTotal = data.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//导入表格
|
||||
handleExcel(file) {
|
||||
let formData = new FormData(); //声明一个FormDate对象
|
||||
formData.append("file", file.raw); //把文件信息放入对象中
|
||||
console.log(file.raw);
|
||||
erbanUpload(formData)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
this.$message.success("Operation successful");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
// that.$message({
|
||||
// type: 'error',
|
||||
// message: 'Operation failed'
|
||||
// });
|
||||
});
|
||||
},
|
||||
// 通过
|
||||
handlePass(index, row) {
|
||||
ElMessageBox.confirm("Are you sure you want to pass?", "Prompt", {
|
||||
type: "warning",
|
||||
confirmButtonText: "Sure",
|
||||
cancelButtonText: "Cancel",
|
||||
})
|
||||
.then(() => {
|
||||
prettyNumberExaminePass({ id: row.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "Operation successful",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 拒绝
|
||||
handleReject(index, row) {
|
||||
ElMessageBox.confirm("Are you sure you want to refuse?", "Prompt", {
|
||||
type: "warning",
|
||||
confirmButtonText: "Sure",
|
||||
cancelButtonText: "Cancel",
|
||||
})
|
||||
.then(() => {
|
||||
prettyNumberExamineReject({ id: row.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "Operation successful",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 删除操作
|
||||
handleDelete(index, row) {
|
||||
// 二次确认删除
|
||||
ElMessageBox.confirm("Are you sure you want to delete?", "Prompt", {
|
||||
type: "warning",
|
||||
confirmButtonText: "Sure",
|
||||
cancelButtonText: "Cancel",
|
||||
})
|
||||
.then(() => {
|
||||
prettyNumberExamineDelete({ id: row.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "Operation successful",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 点击搜索
|
||||
handSearch() {
|
||||
this.$refs["searchForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重置搜索表单
|
||||
resetSearchForm() {
|
||||
this.$refs["searchForm"].resetFields();
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
// 分页导航
|
||||
handleSizeChange(val) {
|
||||
this.pageParams.pageNo = val;
|
||||
this.getData();
|
||||
},
|
||||
handlePageChange(val) {
|
||||
this.pageParams.pageNo = val;
|
||||
this.getData();
|
||||
},
|
||||
headerCopy(column, e) {
|
||||
this.$copy(column.label);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
applyStateTag() {
|
||||
return function (val) {
|
||||
let text = "";
|
||||
switch (val) {
|
||||
case 0:
|
||||
text = "warning";
|
||||
break;
|
||||
case 1:
|
||||
text = "success";
|
||||
break;
|
||||
case 2:
|
||||
text = "info";
|
||||
break;
|
||||
case 3:
|
||||
text = "danger";
|
||||
break;
|
||||
}
|
||||
return text;
|
||||
};
|
||||
},
|
||||
applyStateText() {
|
||||
return function (val) {
|
||||
let text = "";
|
||||
switch (val) {
|
||||
case 0:
|
||||
text = "In Review";
|
||||
break;
|
||||
case 1:
|
||||
text = "Passed";
|
||||
break;
|
||||
case 2:
|
||||
text = "Rejected";
|
||||
break;
|
||||
case 3:
|
||||
text = "Deleted";
|
||||
break;
|
||||
}
|
||||
return text;
|
||||
};
|
||||
},
|
||||
convertTimestamp() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDate(date);
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.red {
|
||||
color: rgb(241, 19, 19);
|
||||
}
|
||||
|
||||
// ::v-deep {
|
||||
// .el-upload--picture-card {
|
||||
// background-color: transparent;
|
||||
// border: 0;
|
||||
// border-radius: 0;
|
||||
// box-sizing: border-box;
|
||||
// width: 0;
|
||||
// height: 45px;
|
||||
// line-height: 0;
|
||||
// vertical-align: top;
|
||||
// }
|
||||
// }
|
||||
.file-uploader {
|
||||
display: block;
|
||||
margin-left: 51px;
|
||||
input {
|
||||
display: none;
|
||||
}
|
||||
.el-upload {
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
box-sizing: border-box;
|
||||
width: 0;
|
||||
height: 45px;
|
||||
line-height: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -390,7 +390,7 @@ export default {
|
||||
function setUserModal (data) {
|
||||
modalData = {
|
||||
uid: data.uid, erbanNo: data.erbanNo,
|
||||
games: Object.assign([], data.games.map(game => { return { gameId: game.gameId, price: game.price, proficiency: game.proficiency, tags: Object.assign([], game.tags) } }))
|
||||
games: Object.assign([], data.games ? data.games.map(game => { return { gameId: game.gameId, price: game.price, proficiency: game.proficiency, tags: Object.assign([], game.tags) } }) : [])
|
||||
};
|
||||
freshUserModal();
|
||||
}
|
||||
@@ -463,7 +463,7 @@ function freshUserModal () {
|
||||
} else {
|
||||
$("#modalAddBtn").hide();
|
||||
}
|
||||
const gameStr = modalData.games.map((game, index) =>
|
||||
const gameStr = !modalData.games ? '' : modalData.games.map((game, index) =>
|
||||
'<div class="form-group">' +
|
||||
'<label for="modalGameId" class="col-sm-3 control-label">游戏:</label>' +
|
||||
'<div class="col-sm-9">' +
|
||||
|
413
src/views/goldCoinGiftingHistory/GoldCoinGiftingHistory.vue
Normal file
413
src/views/goldCoinGiftingHistory/GoldCoinGiftingHistory.vue
Normal file
@@ -0,0 +1,413 @@
|
||||
<template>
|
||||
<div class="list-gold-coin-transfer">
|
||||
<div class="container">
|
||||
<div class="handle-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
:rules="searchRule"
|
||||
label-width="120px"
|
||||
:disabled="tableLoading"
|
||||
>
|
||||
<div class="search-line">
|
||||
<el-form-item label="转赠用户平台号" prop="sendUserPlatformNo">
|
||||
<el-input
|
||||
v-model.number="searchForm.sendUserPlatformNo"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收用户平台号" prop="receiveUserPlatformNo">
|
||||
<el-input
|
||||
v-model.number="searchForm.receiveUserPlatformNo"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" class="large">
|
||||
<el-form-item prop="startTime">
|
||||
<el-date-picker
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
v-model="searchForm.startTime"
|
||||
value-format="yyyy/MM/dd HH:mm:ss"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-col :span="2" align="center">-</el-col>
|
||||
<el-form-item prop="endTime">
|
||||
<el-date-picker
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
v-model="searchForm.endTime"
|
||||
value-format="yyyy/MM/dd HH:mm:ss"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="40px">
|
||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="mr10"
|
||||
@click="exportVisible = true"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<p style="color: #00d1b2">当前汇总值:{{ totalCoins }}</p>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
class="table"
|
||||
ref="multipleTable"
|
||||
header-cell-class-name="table-header"
|
||||
@header-click="headerCopy"
|
||||
v-loading="tableLoading"
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
width="90"
|
||||
label="ID"
|
||||
align="center"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="fromUserNick"
|
||||
label="转赠用户昵称"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="fromUserPlatformNo"
|
||||
width="120"
|
||||
label="转赠用户平台号"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="toUserNick"
|
||||
label="接收用户昵称"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="toUserPlatformNo"
|
||||
width="120"
|
||||
label="接收用户平台号"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="abbr"
|
||||
label="接收用户国家"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="goldNum"
|
||||
width="110"
|
||||
label="金币数量"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column width="160" label="创建时间" align="center">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.createTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160" label="更新时间" align="center">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.updateTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<table-pagination
|
||||
:pageParams="pageParams"
|
||||
:pageTotal="pageTotal"
|
||||
@handleSizeChange="handleSizeChange"
|
||||
@handlePageChange="handlePageChange"
|
||||
></table-pagination>
|
||||
</div>
|
||||
<!-- 确认导出弹出框 -->
|
||||
<el-dialog
|
||||
v-model="exportVisible"
|
||||
width="30%"
|
||||
:before-close="handlDialogClose"
|
||||
>
|
||||
<!-- 使用 v-slot 指令提供 'title' 插槽的内容 -->
|
||||
<template v-slot:title>
|
||||
<div style="display: flex; align-items: center">提示</div>
|
||||
</template>
|
||||
|
||||
<!-- 默认插槽的内容 -->
|
||||
<div style="font-size: 16px">确定以当前筛选条件导出Excel吗?</div>
|
||||
|
||||
<!-- 使用 v-slot 指令提供 'footer' 插槽的内容 -->
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="exportVisible = false" :disabled="dialogDisabled"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="confirmExport2Excel"
|
||||
:loading="btnLoading"
|
||||
:disabled="dialogDisabled"
|
||||
>确 定</el-button
|
||||
>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getGoldCoinTransferList,
|
||||
getGoldCoinSumGold,
|
||||
} from "@/api/relUserBelongings/relUserBelongings.js";
|
||||
import { formatDate } from "@/utils/relDate.js";
|
||||
import { exportExcel } from "@/utils/exportExcel.js";
|
||||
import TablePagination from "@/components/common/TablePagination.vue";
|
||||
export default {
|
||||
name: "GoldCoinGiftingHistory",
|
||||
components: { TablePagination },
|
||||
data() {
|
||||
return {
|
||||
clickedLineId: null, // 记录被点击的某行数据的id
|
||||
clickedLineText: "GIFT_IN_ROOM", // 记录红包类型
|
||||
tableData: [], // 接口返回的表格数据
|
||||
pageTotal: 0, // 接口返回的表格总条数
|
||||
pageParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
exportVisible: false,
|
||||
tableLoading: false, // 表格是否加载中
|
||||
|
||||
// 搜索表单相关
|
||||
searchForm: {
|
||||
sendUserPlatformNo: null, // 接收者平台号
|
||||
receiveUserPlatformNo: null, // 发送者平台号
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
},
|
||||
searchRule: {
|
||||
startTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs["searchForm"].validateField("endTime");
|
||||
callback();
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const { startTime } = this.searchForm;
|
||||
if (startTime !== null && startTime !== "" && value) {
|
||||
if (value <= startTime) {
|
||||
callback(new Error("须晚于开始时间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
dialogDisabled: false, // 是否禁用弹出框(dialog)表单元素
|
||||
btnLoading: false, // 弹出框(dialog)的确认按钮
|
||||
totalCoins: null, //当前金币汇总值
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.tableLoading = true;
|
||||
|
||||
let { pageParams, searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams, searchForm);
|
||||
|
||||
getGoldCoinSumGold(pageParams).then((res) => {
|
||||
if (res.data.success === true) {
|
||||
let data = res.data.data;
|
||||
this.totalCoins = data;
|
||||
}
|
||||
});
|
||||
getGoldCoinTransferList(pageParams).then((res) => {
|
||||
this.tableLoading = false;
|
||||
if (res.data.success === true) {
|
||||
let data = res.data.data;
|
||||
this.tableData = data.list;
|
||||
this.pageTotal = data.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击搜索
|
||||
handSearch() {
|
||||
this.$refs["searchForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重置搜索表单
|
||||
resetSearchForm() {
|
||||
this.$refs["searchForm"].resetFields();
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
},
|
||||
// 弹窗关闭前控制
|
||||
handlDialogClose(done) {
|
||||
const { dialogDisabled } = this;
|
||||
if (dialogDisabled) return;
|
||||
done();
|
||||
},
|
||||
// 重置表单状态
|
||||
resetDialog() {
|
||||
this.btnLoading = false;
|
||||
this.dialogDisabled = false;
|
||||
},
|
||||
|
||||
// 分页导航
|
||||
handleSizeChange(val) {
|
||||
this.$set(this.pageParams, "pageSize", val);
|
||||
this.getData();
|
||||
},
|
||||
handlePageChange(val) {
|
||||
this.$set(this.pageParams, "pageNo", val);
|
||||
this.getData();
|
||||
},
|
||||
headerCopy(column, e) {
|
||||
this.$copy(column.label);
|
||||
},
|
||||
|
||||
// 确认导出
|
||||
confirmExport2Excel() {
|
||||
this.btnLoading = true;
|
||||
this.dialogDisabled = true;
|
||||
|
||||
let { searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(searchForm, { pageSize: 10000, pageNo: 1 });
|
||||
|
||||
getGoldCoinTransferList(searchForm).then((res) => {
|
||||
this.resetDialog();
|
||||
if (res.data.success === true) {
|
||||
this.exportVisible = false;
|
||||
|
||||
const list = res.data.data.list;
|
||||
list.forEach((item) => {
|
||||
item.createTime = formatDate(item.createTime);
|
||||
item.updateTime = formatDate(item.updateTime);
|
||||
});
|
||||
const tHeader = [
|
||||
"ID",
|
||||
"转赠用户昵称",
|
||||
"转赠用户平台号",
|
||||
"接收用户昵称",
|
||||
"接收用户平台号",
|
||||
"接收用户国家",
|
||||
"金币数量",
|
||||
"创建时间",
|
||||
"更新时间",
|
||||
];
|
||||
const filterVal = [
|
||||
"id",
|
||||
"fromUserNick",
|
||||
"fromUserPlatformNo",
|
||||
"toUserNick",
|
||||
"toUserPlatformNo",
|
||||
"abbr",
|
||||
"goldNum",
|
||||
"createTime",
|
||||
"updateTime",
|
||||
];
|
||||
const exportName = `金币转赠历史${formatDate(new Date())}`;
|
||||
|
||||
exportExcel(tHeader, filterVal, list, exportName);
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
convertTimestamp() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDate(date);
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.handle-box {
|
||||
overflow: hidden;
|
||||
.search-line {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.el-form-item {
|
||||
width: 320px;
|
||||
.el-input,
|
||||
.el-select {
|
||||
width: 200px;
|
||||
}
|
||||
.el-form-item--small {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.el-form-item {
|
||||
float: left;
|
||||
}
|
||||
&.large {
|
||||
width: 580px;
|
||||
.el-form-item {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
&.small {
|
||||
.el-form-item {
|
||||
width: 90px;
|
||||
.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.table-td-thumb {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
314
src/views/guildOperationManagement/agencyDiamondFlow.vue
Normal file
314
src/views/guildOperationManagement/agencyDiamondFlow.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<div class="agency-diamond-flow">
|
||||
<div class="container">
|
||||
<div class="region-box">
|
||||
<el-radio-group v-model="region">
|
||||
<el-radio
|
||||
v-for="(item, index) in userAreaRegion"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
>{{ item.name }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="handle-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
:rules="searchRule"
|
||||
label-width="90px"
|
||||
:disabled="tableLoading"
|
||||
>
|
||||
<div class="search-line">
|
||||
<el-form-item label="公会ID" prop="agencyId">
|
||||
<el-input
|
||||
v-model.trim="searchForm.agencyId"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="公会长ID" prop="agencyOwnerId">
|
||||
<el-input
|
||||
v-model.trim="searchForm.agencyOwnerId"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="周期" prop="dateCycle">
|
||||
<el-select placeholder="请选择" v-model="searchForm.dateCycle">
|
||||
<el-option
|
||||
v-for="(item, i) in dateCycleList"
|
||||
:key="i"
|
||||
:label="item.startDateStr + '~' + item.endDateStr"
|
||||
:value="item.dateCycle"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label-width="40px">
|
||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-button type="primary" class="exportBtn" @click="confirmExport2Excel"
|
||||
>导出</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
@header-click="headerCopy"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- <el-table-column align="center" prop="region" label="区服">
|
||||
<template v-slot="scope">
|
||||
{{ regionType(scope.row.region) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" prop="agencyId" label="公会ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="agencyName" label="公会名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="hallMemberCount"
|
||||
label="主播人数"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" prop="agencyAbbr" label="公会国家"> </el-table-column> -->
|
||||
<el-table-column align="center" prop="agencyErbanNo" label="公会长ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="energyValue" label="总钻石流水">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.energyValue ? scope.row.energyValue.toLocaleString() : "null"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="salaryRate"
|
||||
label="公会长薪资比例"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.salaryRate ? scope.row.salaryRate + "%" : "0%" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="hallSalary" label="公会长薪资">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<table-pagination
|
||||
:pageParams="pageParams"
|
||||
:pageTotal="pageTotal"
|
||||
:page-sizes="[10, 20, 100, 200]"
|
||||
@handleSizeChange="handleSizeChange"
|
||||
@handlePageChange="handlePageChange"
|
||||
></table-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang=js>
|
||||
import { getDateCycleList, getAgencyDiamondFlow, agencyDiamondFlowExport } from '@/api/relAgency/relAgency.js';
|
||||
import TablePagination from '@/components/common/TablePagination';
|
||||
import { formatDate, formatDateYMD } from '@/utils/relDate';
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ref } from 'vue'; // 引入 ref
|
||||
import { ElMessageBox } from 'element-plus'; // 正确引入 ElM
|
||||
// 混入
|
||||
// import Mixin from '../../mixin/mixRegion.js';
|
||||
|
||||
export default {
|
||||
name: "agencyDiamondFlow",
|
||||
// mixins: [Mixin],
|
||||
components: { TablePagination },
|
||||
data() {
|
||||
return {
|
||||
dateCycleList: [],
|
||||
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
||||
tableLoading: false, // 表格是否加载中
|
||||
|
||||
tableData: [], // 接口返回的表格数据
|
||||
pageTotal: 0, // 接口返回的表格总条数
|
||||
pageParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
// 搜索表单相关
|
||||
searchForm: {
|
||||
agencyOwnerId: null,
|
||||
agencyId: null,
|
||||
dateCycle: null,
|
||||
region: null
|
||||
},
|
||||
searchRule: {
|
||||
startTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs['searchForm'].validateField('endTime');
|
||||
callback();
|
||||
},
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const { startTime } = this.searchForm;
|
||||
if (startTime !== null && startTime !== '' && value) {
|
||||
if (value <= startTime) {
|
||||
callback(new Error('须晚于开始时间'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDateCycleList();
|
||||
},
|
||||
methods: {
|
||||
getDateCycleList() {
|
||||
getDateCycleList({ month: 3 }).then((res) => {
|
||||
this.dateCycleList = res.data || [];
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.tableLoading = true;
|
||||
|
||||
let { pageParams, searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (!searchForm[item] || (searchForm[item] !== undefined && searchForm[item] === '')) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams, searchForm);
|
||||
|
||||
getAgencyDiamondFlow(pageParams).then((res) => {
|
||||
this.tableLoading = false;
|
||||
if (res.code == 200) {
|
||||
let data = res.data;
|
||||
this.tableData = data.records;
|
||||
this.pageTotal = data.total;
|
||||
}else{
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击搜索
|
||||
handSearch() {
|
||||
this.$refs['searchForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重置搜索表单
|
||||
resetSearchForm() {
|
||||
this.$refs['searchForm'].resetFields();
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
},
|
||||
// 确认导出
|
||||
confirmExport2Excel() {
|
||||
ElMessageBox.confirm('确定以当前筛选条件导出Excel吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.btnLoading = true;
|
||||
let { searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (!searchForm[item] || (searchForm[item] !== undefined && searchForm[item] === '')) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(searchForm, { pageSize: 10000, pageNo: 1 });
|
||||
|
||||
agencyDiamondFlowExport(searchForm)
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
this.exportVisible = false;
|
||||
this.btnLoading = false;
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement('a');
|
||||
alink.download = `公会钻石薪资流水统计${time}.xls`;
|
||||
alink.style.display = 'none';
|
||||
const blob = new Blob([res.data]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err); // 打印错误信息
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message:"导出失败",
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(val) {
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
handlePageChange(val) {
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
headerCopy(column, e) {
|
||||
this.$copy(column.label);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
convertTimestamp1() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDateYMD(date);
|
||||
};
|
||||
},
|
||||
convertTimestamp() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDate(date);
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope>
|
||||
.exportBtn {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
.search-line {
|
||||
width: 38%;
|
||||
}
|
||||
</style>
|
282
src/views/guildOperationManagement/agentSendSalary.vue
Normal file
282
src/views/guildOperationManagement/agentSendSalary.vue
Normal file
@@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<div class="agent-send-salary">
|
||||
<div class="container">
|
||||
<div class="handle-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
:rules="searchRule"
|
||||
label-width="90px"
|
||||
:disabled="tableLoading"
|
||||
>
|
||||
<div class="search-line">
|
||||
<el-form-item label="充值代理ID" prop="chargeAgentErbanNo">
|
||||
<el-input
|
||||
v-model.trim="searchForm.chargeAgentErbanNo"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="主播ID" prop="erbanNo">
|
||||
<el-input
|
||||
v-model.trim="searchForm.erbanNo"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="large">
|
||||
<el-form-item prop="startTime">
|
||||
<el-date-picker
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
v-model="searchForm.startTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-col :span="2" align="center">-</el-col>
|
||||
<el-form-item prop="endTime">
|
||||
<el-date-picker
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
v-model="searchForm.endTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label-width="40px">
|
||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-button type="text" class="total"
|
||||
>转增薪资总额:{{ total ? total.toLocaleString() : "0" }}</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
@header-click="headerCopy"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="receiveErbano"
|
||||
label="充值代理ID"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="receiveNick"
|
||||
label="充值代理昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
align="center"
|
||||
prop="receiveAbbr"
|
||||
label="充值代理国家"
|
||||
>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" prop="erbano" label="主播ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="nick" label="主播昵称">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" prop="abbr" label="主播国家">
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" prop="tradeUsb" label="转增薪资">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="gold" label="对应金币数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
width="160"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ convertTimestamp(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<table-pagination
|
||||
:pageParams="pageParams"
|
||||
:pageTotal="pageTotal"
|
||||
:page-sizes="[10, 20, 100, 200]"
|
||||
@handleSizeChange="handleSizeChange"
|
||||
@handlePageChange="handlePageChange"
|
||||
></table-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { chargeAgentList, chargeAgentSum } from "@/api/relAgency/relAgency.js";
|
||||
import TablePagination from "@/components/common/TablePagination";
|
||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ref } from "vue";
|
||||
export default {
|
||||
name: "agentSendSalary",
|
||||
components: { TablePagination },
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
||||
tableLoading: false, // 表格是否加载中
|
||||
|
||||
tableData: [], // 接口返回的表格数据
|
||||
pageTotal: 0, // 接口返回的表格总条数
|
||||
pageParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
// 搜索表单相关
|
||||
searchForm: {
|
||||
erbanNo: null,
|
||||
chargeAgentErbanNo: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
},
|
||||
searchRule: {
|
||||
startTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs["searchForm"].validateField("endTime");
|
||||
callback();
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const { startTime } = this.searchForm;
|
||||
if (startTime !== null && startTime !== "" && value) {
|
||||
if (value <= startTime) {
|
||||
callback(new Error("须晚于开始时间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.tableLoading = true;
|
||||
|
||||
let { pageParams, searchForm } = this;
|
||||
searchForm.startTime = dateFormat(searchForm.startTime,'yyyy-MM-dd hh:mm:ss');
|
||||
searchForm.endTime = dateFormat(searchForm.endTime,'yyyy-MM-dd hh:mm:ss');
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams, searchForm);
|
||||
console.log(pageParams);
|
||||
|
||||
chargeAgentList(pageParams).then((res) => {
|
||||
this.tableLoading = false;
|
||||
if (res.code == 200) {
|
||||
let data = res.data;
|
||||
this.tableData = data.records;
|
||||
this.pageTotal = data.total;
|
||||
}else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
chargeAgentSum(pageParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.data;
|
||||
}else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击搜索
|
||||
handSearch() {
|
||||
this.$refs["searchForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重置搜索表单
|
||||
resetSearchForm() {
|
||||
this.$refs["searchForm"].resetFields();
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
// 分页导航
|
||||
handleSizeChange(val) {
|
||||
// this.$set(this.pageParams, 'pageSize', val);
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
handlePageChange(val) {
|
||||
// this.$set(this.pageParams, 'pageNo', val);
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
headerCopy(column, e) {
|
||||
this.$copy(column.label);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
convertTimestamp1() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDateYMD(date);
|
||||
};
|
||||
},
|
||||
convertTimestamp() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDate(date);
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope>
|
||||
.exportBtn {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.total {
|
||||
font-size: 18px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
.search-line {
|
||||
width: 38%;
|
||||
}
|
||||
</style>
|
572
src/views/guildOperationManagement/anchorSalaryOperate.vue
Normal file
572
src/views/guildOperationManagement/anchorSalaryOperate.vue
Normal file
@@ -0,0 +1,572 @@
|
||||
<template>
|
||||
<div class="anchor-salary-operate">
|
||||
<div class="container">
|
||||
<div class="handle-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
:rules="searchRule"
|
||||
label-width="90px"
|
||||
:disabled="tableLoading"
|
||||
>
|
||||
<div class="search-line">
|
||||
<el-form-item label="主播ID" prop="erbanNo">
|
||||
<el-input
|
||||
v-model.trim="searchForm.erbanNo"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="公会ID" prop="agencyId">
|
||||
<el-input
|
||||
v-model.trim="searchForm.agencyId"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="公会长ID" prop="agencyOwnerId">
|
||||
<el-input
|
||||
v-model.trim="searchForm.agencyOwnerId"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="周期" prop="dateCycle">
|
||||
<el-select placeholder="请选择" v-model="searchForm.dateCycle">
|
||||
<el-option
|
||||
v-for="(item, i) in dateCycleList"
|
||||
:key="i"
|
||||
:label="item.startDateStr + '~' + item.endDateStr"
|
||||
:value="item.dateCycle"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label-width="40px">
|
||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
@header-click="headerCopy"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- <el-table-column align="center" prop="dateCycle" label="周期" width="105">
|
||||
<template v-slot="scope">
|
||||
{{ dateCycleType(scope.row.dateCycle) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" prop="erbano" label="主播ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="nick" label="主播昵称">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="agencyId" label="公会ID">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="agencyOwnerErbanNo"
|
||||
label="公会长ID"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="diamondFlow" label="钻石流水">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.diamondFlow
|
||||
? scope.row.diamondFlow.toLocaleString()
|
||||
: "0"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="diamondToUsb"
|
||||
label="钻石兑换薪资"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="handleOpen(1, scope.row)">
|
||||
{{ scope.row.diamondToUsb + "us" }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="usbToGold" label="薪资兑换金币">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="handleOpen(2, scope.row)">
|
||||
{{ scope.row.usbToGold + "us" }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="usbToAgent"
|
||||
label="薪资转增代理"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="handleOpen(3, scope.row)">
|
||||
{{ scope.row.usbToAgent + "us" }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="usbToOwner"
|
||||
label="薪资转增公会长"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="handleOpen(4, scope.row)">
|
||||
{{ scope.row.usbToOwner + "us" }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="officialWithdram"
|
||||
label="官方提现"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="handleOpen(5, scope.row)">
|
||||
{{ scope.row.officialWithdram + "us" }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="usb" label="剩余薪资">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="diamond" label="钻石余额(当前)">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.diamond ? scope.row.diamond.toLocaleString() : "null"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<table-pagination
|
||||
:pageParams="pageParams"
|
||||
:pageTotal="pageTotal"
|
||||
:page-sizes="[10, 20, 100, 200]"
|
||||
@handleSizeChange="handleSizeChange"
|
||||
@handlePageChange="handlePageChange"
|
||||
></table-pagination>
|
||||
</div>
|
||||
|
||||
<!-- 弹出框 -->
|
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="60%">
|
||||
<el-table
|
||||
:data="dialogData"
|
||||
border
|
||||
class="received-table"
|
||||
v-loading="dialogLoading"
|
||||
>
|
||||
<el-table-column prop="createTime" label="日期" align="center">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.createTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nick"
|
||||
label="主播昵称"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="erbano"
|
||||
label="主播ID"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<!-- 薪资兑换金币6 -->
|
||||
<el-table-column
|
||||
v-if="dialogType == 6"
|
||||
prop="gold"
|
||||
label="兑换金币数量"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.gold ? scope.row.gold.toLocaleString() : "0" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 钻石兑换薪资1 -->
|
||||
<el-table-column
|
||||
v-if="dialogType == 1"
|
||||
prop="exDiamond"
|
||||
label="兑换钻石数量"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.exDiamond ? scope.row.exDiamond.toLocaleString() : "0"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 1 || dialogType == 6"
|
||||
prop="tradeUsb"
|
||||
label="兑换薪资数"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.tradeUsb + "us" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 1"
|
||||
prop="afterDiamond"
|
||||
label="钻石余额"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.afterDiamond
|
||||
? scope.row.afterDiamond.toLocaleString()
|
||||
: "0"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 薪资转增代理2 -->
|
||||
<el-table-column
|
||||
v-if="dialogType == 2"
|
||||
prop="receiveErbano"
|
||||
label="充值代理ID"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 2"
|
||||
prop="receiveNick"
|
||||
label="充值代理名称"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 2"
|
||||
prop="beforeUsb"
|
||||
label="当前薪资"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.beforeUsb + "us" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 2"
|
||||
prop="tradeUsb"
|
||||
label="转增代理"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.tradeUsb + "us" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 薪资转增公会长3 -->
|
||||
<el-table-column
|
||||
v-if="dialogType == 3 || dialogType == 4"
|
||||
prop="receiveNick"
|
||||
label="公会长昵称"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 3 || dialogType == 4"
|
||||
prop="receiveErbano"
|
||||
label="公会长ID"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
v-if="dialogType == 3"
|
||||
prop="tradeUsb"
|
||||
label="转增公会长"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.tradeUsb + "us" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 官方提现4 -->
|
||||
<el-table-column
|
||||
v-if="dialogType == 4"
|
||||
prop="tradeUsb"
|
||||
label="官方提现"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.tradeUsb + "us" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="afterUsb" label="剩余薪资">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.afterUsb + "us" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<table-pagination
|
||||
:pageParams="pageParams1"
|
||||
:pageTotal="pageTotal1"
|
||||
:page-sizes="[5, 10, 20]"
|
||||
@handleSizeChange="handleSizeChange1"
|
||||
@handlePageChange="handlePageChange1"
|
||||
></table-pagination>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDateCycleList,
|
||||
getAnchorSalaryBill,
|
||||
anchorSalaryBillDetail,
|
||||
} from "@/api/relAgency/relAgency.js";
|
||||
import TablePagination from "@/components/common/TablePagination";
|
||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "anchorSalaryOperate",
|
||||
components: { TablePagination },
|
||||
data() {
|
||||
return {
|
||||
dateCycleList: [],
|
||||
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
||||
tableLoading: false, // 表格是否加载中
|
||||
|
||||
tableData: [], // 接口返回的表格数据
|
||||
pageTotal: 0, // 接口返回的表格总条数
|
||||
pageParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
// 搜索表单相关
|
||||
searchForm: {
|
||||
agencyOwnerId: null,
|
||||
agencyId: null,
|
||||
dateCycle: null,
|
||||
erbanNo: null,
|
||||
},
|
||||
searchRule: {
|
||||
startTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs["searchForm"].validateField("endTime");
|
||||
callback();
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const { startTime } = this.searchForm;
|
||||
if (startTime !== null && startTime !== "" && value) {
|
||||
if (value <= startTime) {
|
||||
callback(new Error("须晚于开始时间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
dialogData: [], //弹窗表格数据
|
||||
dialogVisible: false,
|
||||
dialogLoading: false,
|
||||
pageTotal1: 0, // 接口返回的表格总条数
|
||||
pageParams1: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
dialogParams: {},
|
||||
dialogTitle: "钻石兑换薪资",
|
||||
dialogType: 1,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDateCycleList();
|
||||
},
|
||||
methods: {
|
||||
getDateCycleList() {
|
||||
getDateCycleList({ month: 3 }).then((res) => {
|
||||
this.dateCycleList = res.data || [];
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.tableLoading = true;
|
||||
|
||||
let { pageParams, searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams, searchForm);
|
||||
|
||||
getAnchorSalaryBill(pageParams).then((res) => {
|
||||
this.tableLoading = false;
|
||||
if (res.code == 200) {
|
||||
let data = res.data;
|
||||
this.tableData = data.records;
|
||||
this.pageTotal = data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 弹窗
|
||||
handleOpen(index, row) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
this.dialogTitle = "钻石兑换薪资";
|
||||
this.dialogType = 1;
|
||||
break;
|
||||
case 2:
|
||||
this.dialogTitle = "薪资转增代理";
|
||||
this.dialogType = 2;
|
||||
break;
|
||||
case 3:
|
||||
this.dialogTitle = "薪资转增公会长";
|
||||
this.dialogType = 3;
|
||||
break;
|
||||
case 4:
|
||||
this.dialogTitle = "官方提现";
|
||||
this.dialogType = 4;
|
||||
break;
|
||||
case 6:
|
||||
this.dialogTitle = "薪资兑换金币";
|
||||
this.dialogType = 6;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.dialogParams = {
|
||||
salaryType: index,
|
||||
dateCycle: this.searchForm.dateCycle,
|
||||
uid: row.uid,
|
||||
hallId: row.hallId,
|
||||
};
|
||||
this.pageParams1 = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
console.log(this.dialogParams);
|
||||
|
||||
this.getDetail();
|
||||
},
|
||||
getDetail() {
|
||||
let { pageParams1, dialogParams } = this;
|
||||
pageParams1 = JSON.parse(JSON.stringify(pageParams1));
|
||||
dialogParams = JSON.parse(JSON.stringify(dialogParams));
|
||||
Object.keys(dialogParams).forEach((item) => {
|
||||
if (
|
||||
!dialogParams[item] ||
|
||||
(dialogParams[item] !== undefined && dialogParams[item] === "")
|
||||
) {
|
||||
delete dialogParams[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams1, dialogParams);
|
||||
this.dialogVisible = true;
|
||||
this.dialogLoading = true;
|
||||
anchorSalaryBillDetail(pageParams1).then((res) => {
|
||||
if (res.success === true) {
|
||||
let data = res.data;
|
||||
this.dialogData = data.records;
|
||||
this.pageTotal1 = data.total;
|
||||
}
|
||||
this.dialogLoading = false;
|
||||
});
|
||||
},
|
||||
// 点击搜索
|
||||
handSearch() {
|
||||
this.$refs["searchForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重置搜索表单
|
||||
resetSearchForm() {
|
||||
this.$refs["searchForm"].resetFields();
|
||||
this.pageParams.pageNo = 1;
|
||||
this.tableData = [];
|
||||
this.getData();
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(val) {
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
handlePageChange(val) {
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
// 弹窗分页导航
|
||||
handleSizeChange1(val) {
|
||||
this.$set(this.pageParams1, "pageSize", val);
|
||||
this.getDetail();
|
||||
},
|
||||
handlePageChange1(val) {
|
||||
this.$set(this.pageParams1, "pageNo", val);
|
||||
this.getDetail();
|
||||
},
|
||||
|
||||
headerCopy(column, e) {
|
||||
this.$copy(column.label);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
convertTimestamp1() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDateYMD(date);
|
||||
};
|
||||
},
|
||||
convertTimestamp() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDate(date);
|
||||
};
|
||||
},
|
||||
dateCycleType() {
|
||||
const { dateCycleList } = this;
|
||||
return function (value) {
|
||||
for (let item of dateCycleList) {
|
||||
if (item.dateCycle === value) {
|
||||
return (
|
||||
this.convertTimestamp1(item.startDate) +
|
||||
"~" +
|
||||
this.convertTimestamp1(item.endDate)
|
||||
);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope>
|
||||
.el-button--text {
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
.search-line {
|
||||
width: 38%;
|
||||
}
|
||||
</style>
|
827
src/views/guildOperationManagement/guildInfo.vue
Normal file
827
src/views/guildOperationManagement/guildInfo.vue
Normal file
@@ -0,0 +1,827 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>ID</span>
|
||||
<el-input v-model="inquire.userId"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<!-- <div class="inquire">
|
||||
<span>推荐人</span>
|
||||
<el-input
|
||||
v-model="inquire.referrer"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div> -->
|
||||
<!-- 时间选择器 -->
|
||||
<!-- <div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="addDialog = true">添加</el-button>
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="exportInfoFun()">导出</el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="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.backgroundUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.backgroundUrl]"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime"
|
||||
align="center"
|
||||
label="创建日期" />
|
||||
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
|
||||
<el-table-column align="center"
|
||||
label="成员数量/上限">
|
||||
<template v-slot="scope">
|
||||
<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 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="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,
|
||||
} from "@/api/noblemanNew/noblemanNew";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GuildInfoNew",
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
delDialog: false,
|
||||
delDialogData: null,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
userId: "",
|
||||
referrer: "",
|
||||
time: "",
|
||||
},
|
||||
//新增所需对象
|
||||
resource: {
|
||||
id: "",
|
||||
nick: "",
|
||||
referrer: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 新增弹窗
|
||||
addDialog: false,
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 编辑弹窗
|
||||
editDialog: false,
|
||||
ediObj: {
|
||||
leaderId: "",
|
||||
leaderNick: "",
|
||||
guildNick: "",
|
||||
guildNumber: "",
|
||||
id: "",
|
||||
imageUrl1: "",
|
||||
},
|
||||
// 收款账户弹窗
|
||||
payAccountDialog: false,
|
||||
payAccountTitle: "(会长昵称【ID:0】)的收款账户",
|
||||
payAccountNew: {},
|
||||
payAccount: {
|
||||
payoneer: "",
|
||||
usdt: "",
|
||||
payPal: "",
|
||||
},
|
||||
// 新增成员弹窗
|
||||
memberDialog: false,
|
||||
memberTitle: "【公会名称】成员信息",
|
||||
memberNew: {},
|
||||
member: {
|
||||
userID: "",
|
||||
tableData: [],
|
||||
},
|
||||
// 删除成员弹窗
|
||||
memberRemoveDialog: false,
|
||||
memberRemoveObj: {},
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData () {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
pageFamily({
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
// startDate: startTime,
|
||||
// endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 打开成员信息弹窗
|
||||
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.editDialog = true;
|
||||
},
|
||||
// 二次确认弹窗
|
||||
editDialogClick () {
|
||||
console.log(this.ediObj);
|
||||
update({
|
||||
id: this.ediObj.id,
|
||||
memberNumLimit: this.ediObj.guildNumber,
|
||||
backgroundUrl: this.ediObj.imageUrl1,
|
||||
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 = URL.createObjectURL();
|
||||
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>
|
181
src/views/guildOperationManagement/guildMove.vue
Normal file
181
src/views/guildOperationManagement/guildMove.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>ID</span>
|
||||
<el-input
|
||||
v-model="inquire.userId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">移除日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="familyName" align="center" label="家族昵称" />
|
||||
<el-table-column prop="erbanNo" align="center" label="成员ID" />
|
||||
<el-table-column prop="nick" align="center" label="成员昵称" />
|
||||
<el-table-column prop="targetErbanNo" align="center" label="目标成员ID" />
|
||||
<el-table-column prop="targetNick" align="center" label="目标成员昵称" />
|
||||
<el-table-column prop="type" align="center" label="操作类型">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.type == 1
|
||||
? "申请加入"
|
||||
: scope.row.type == 2
|
||||
? "申请退出"
|
||||
: scope.row.type == 3
|
||||
? "邀请加入"
|
||||
: scope.row.type == 4
|
||||
? "设置管理员"
|
||||
: scope.row.type == 5
|
||||
? "移除管理员"
|
||||
: "移除成员"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="操作时间" />
|
||||
<el-table-column prop="updateTime" align="center" label="最后更新时间" />
|
||||
<el-table-column prop="status" align="center" label="状态">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.status == 1
|
||||
? "未处理"
|
||||
: scope.row.status == 2
|
||||
? "同意"
|
||||
: scope.row.status == 2
|
||||
? "拒绝"
|
||||
: "过期"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { pageOperateRecord } from "@/api/noblemanNew/noblemanNew";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GuildMoveNew",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
userId: "",
|
||||
nick: "",
|
||||
time: "",
|
||||
},
|
||||
//新增所需对象
|
||||
resource: {
|
||||
id: "",
|
||||
nick: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 新增弹窗
|
||||
addDialog: false,
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
pageOperateRecord({
|
||||
erbanNo: this.inquire.userId,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
417
src/views/guildOperationManagement/officialWithdrawRecord.vue
Normal file
417
src/views/guildOperationManagement/officialWithdrawRecord.vue
Normal file
@@ -0,0 +1,417 @@
|
||||
<template>
|
||||
<div class="official-withdraw-record">
|
||||
<div class="container">
|
||||
<div class="region-box">
|
||||
<el-radio-group v-model="region">
|
||||
<el-radio
|
||||
v-for="(item, index) in userAreaRegion"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
>{{ item.name }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="handle-box">
|
||||
<el-form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
:rules="searchRule"
|
||||
label-width="90px"
|
||||
:disabled="tableLoading"
|
||||
>
|
||||
<div class="search-line">
|
||||
<el-form-item label="公会长ID" prop="agencyOwnerErbanNo">
|
||||
<el-input
|
||||
v-model.trim="searchForm.agencyOwnerErbanNo"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="searchForm.status">
|
||||
<el-option label="已结算" value="1"></el-option>
|
||||
<el-option label="未结算" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" class="large">
|
||||
<el-form-item prop="startTime">
|
||||
<el-date-picker
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
v-model="searchForm.startTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-col :span="2" align="center">-</el-col>
|
||||
<el-form-item prop="endTime">
|
||||
<el-date-picker
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
v-model="searchForm.endTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label-width="40px">
|
||||
<el-button type="primary" @click="handSearch">搜索</el-button>
|
||||
<el-button plain @click="resetSearchForm">重置搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-button type="primary" class="exportBtn" @click="confirmExport2Excel"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-button @click="handleChangeAll()" type="info" plain
|
||||
>批量操作</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
@header-click="headerCopy"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<!-- <el-table-column align="center" prop="region" label="区服">
|
||||
<template v-slot="scope">
|
||||
{{ regionType(scope.row.region) }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column align="center" prop="agencyId" label="公会ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="erbanNo" label="公会长ID">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="nick" label="公会长昵称">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" prop="region" label="区域">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="abbr" label="国家">
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" prop="guildUsdNum" label="提现薪资">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.guildUsdNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
width="160"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ convertTimestamp(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="status" label="状态">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.status == 0 ? "未结算" : "已结算" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="hallSalary" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
v-if="scope.row.status == 0"
|
||||
@click="handleChange(scope.row)"
|
||||
type="text"
|
||||
size="mini"
|
||||
>
|
||||
结算
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
label="操作时间"
|
||||
width="160"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.updateTime
|
||||
? convertTimestamp(scope.row.updateTime)
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="operator" label="操作人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<table-pagination
|
||||
:pageParams="pageParams"
|
||||
:pageTotal="pageTotal"
|
||||
:page-sizes="[10, 20, 100, 200]"
|
||||
@handleSizeChange="handleSizeChange"
|
||||
@handlePageChange="handlePageChange"
|
||||
></table-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
agencyWithdrawList,
|
||||
agencyWithdrawExamineExport,
|
||||
agencyWithdrawSet,
|
||||
agencyWithdrawBatchSet,
|
||||
} from "@/api/relAgency/relAgency.js";
|
||||
import TablePagination from "@/components/common/TablePagination";
|
||||
import { formatDate, formatDateYMD } from "@/utils/relDate";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElMessageBox } from 'element-plus'; // 正确引入 ElM
|
||||
// 混入
|
||||
// import Mixin from '../../mixin/mixRegion.js';
|
||||
|
||||
export default {
|
||||
name: "officialWithdrawRecord",
|
||||
// mixins: [Mixin],
|
||||
components: { TablePagination },
|
||||
data() {
|
||||
return {
|
||||
dateCycleList: [],
|
||||
btnLoading: false, // 导出弹出框(dialog)的确认按钮
|
||||
tableLoading: false, // 表格是否加载中
|
||||
|
||||
tableData: [], // 接口返回的表格数据
|
||||
pageTotal: 0, // 接口返回的表格总条数
|
||||
pageParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
// 搜索表单相关
|
||||
searchForm: {
|
||||
agencyOwnerErbanNo: null,
|
||||
status: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
},
|
||||
searchRule: {
|
||||
startTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
this.$refs["searchForm"].validateField("endTime");
|
||||
callback();
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
const { startTime } = this.searchForm;
|
||||
if (startTime !== null && startTime !== "" && value) {
|
||||
if (value <= startTime) {
|
||||
callback(new Error("须晚于开始时间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
idStr: [], //批量删除ID
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.tableLoading = true;
|
||||
|
||||
let { pageParams, searchForm } = this;
|
||||
searchForm.startTime = dateFormat(searchForm.startTime,'yyyy-MM-dd hh:mm:ss');
|
||||
searchForm.endTime = dateFormat(searchForm.endTime,'yyyy-MM-dd hh:mm:ss');
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(pageParams, searchForm);
|
||||
|
||||
agencyWithdrawList(pageParams).then((res) => {
|
||||
this.tableLoading = false;
|
||||
if (res.code == 200) {
|
||||
let data = res.data;
|
||||
this.tableData = data.records;
|
||||
this.pageTotal = data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSelectionChange(rows) {
|
||||
this.idStr = null;
|
||||
this.idStr = rows.map((obj) => obj.id).join(",");
|
||||
},
|
||||
handleChangeAll() {
|
||||
ElMessageBox.confirm("确定要结算吗", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
agencyWithdrawBatchSet({ ids: this.idStr }).then((res) => {
|
||||
if (res.success === true) {
|
||||
ElMessage({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.getData();
|
||||
this.idStr = null;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "warning ",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
handleChange(row) {
|
||||
ElMessageBox.confirm("确定要结算吗", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
agencyWithdrawSet({ id: row.id }).then((res) => {
|
||||
if (res.success === true) {
|
||||
ElMessage({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.getData();
|
||||
this.idStr = null;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "warning ",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 点击搜索
|
||||
handSearch() {
|
||||
this.$refs["searchForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重置搜索表单
|
||||
resetSearchForm() {
|
||||
this.$refs["searchForm"].resetFields();
|
||||
this.pageParams.pageNo = 1;
|
||||
this.getData();
|
||||
},
|
||||
// 确认导出
|
||||
confirmExport2Excel() {
|
||||
ElMessageBox.confirm("确定以当前筛选条件导出Excel吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.btnLoading = true;
|
||||
let { searchForm } = this;
|
||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||
Object.keys(searchForm).forEach((item) => {
|
||||
if (
|
||||
!searchForm[item] ||
|
||||
(searchForm[item] !== undefined && searchForm[item] === "")
|
||||
) {
|
||||
delete searchForm[item];
|
||||
}
|
||||
});
|
||||
Object.assign(searchForm, { pageSize: 10000, pageNo: 1 });
|
||||
|
||||
agencyWithdrawExamineExport(searchForm)
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
this.exportVisible = false;
|
||||
this.btnLoading = false;
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `官方提现记录${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res.data]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err); // 打印错误信息
|
||||
ElMessage.error("导出失败");
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "info",
|
||||
message: "取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(val) {
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
handlePageChange(val) {
|
||||
this.pageParams.pageSize = val;
|
||||
this.getData();
|
||||
},
|
||||
headerCopy(column, e) {
|
||||
this.$copy(column.label);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
convertTimestamp1() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDateYMD(date);
|
||||
};
|
||||
},
|
||||
convertTimestamp() {
|
||||
return function (time) {
|
||||
let date = new Date(time);
|
||||
return formatDate(date);
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope>
|
||||
.exportBtn {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
.search-line {
|
||||
width: 38%;
|
||||
}
|
||||
</style>
|
@@ -72,7 +72,7 @@ export default {
|
||||
name: "LoginView",
|
||||
data () {
|
||||
return {
|
||||
smsSwitch: true,
|
||||
smsSwitch: false,
|
||||
};
|
||||
},
|
||||
setup () {
|
||||
|
624
src/views/medal/MedalInfo.vue
Normal file
624
src/views/medal/MedalInfo.vue
Normal file
@@ -0,0 +1,624 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>勋章ID</span>
|
||||
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>勋章昵称</span>
|
||||
<el-input v-model="inquire.nick" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span class="demonstration">地区</span>
|
||||
<el-select filterable v-model="inquire.partitionId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="primary" type="primary" @click="add()"> 新增 </el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="id" align="center" label="勋章ID" />
|
||||
<el-table-column prop="partitionFlag" align="center" label="地区">
|
||||
<template v-slot="scope">{{
|
||||
partitionFlagFun(scope.row.partitionFlag, 1)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-华语区">
|
||||
<template v-slot="scope">{{ JSON.parse(scope.row.name).zh }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-英语区">
|
||||
<template v-slot="scope">{{ JSON.parse(scope.row.name).en }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-阿语区">
|
||||
<template v-slot="scope">{{ JSON.parse(scope.row.name).ar }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="picUrl"
|
||||
label="勋章图片"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.picUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="scope.row.picUrl"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="enable" align="center" label="状态">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.enable ? "生效" : "不生效"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="添加时间" />
|
||||
<el-table-column align="center" label="操作" width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="eidFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="grantFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
:disabled="!scope.row.enable"
|
||||
>
|
||||
发放
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 新增&编辑弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
class="pub"
|
||||
v-model="controlsDialog"
|
||||
:title="controlsTitle"
|
||||
width="32%"
|
||||
center
|
||||
>
|
||||
<!-- 地区 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>地区</span
|
||||
>
|
||||
<el-select
|
||||
multiple
|
||||
filterable
|
||||
v-model="controlsObj.value"
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in controlsObj.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 勋章名称-华语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>勋章名称-华语</span
|
||||
>
|
||||
<el-input
|
||||
v-model="controlsObj.nickZh"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章名称-英语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>勋章名称-英语</span
|
||||
>
|
||||
<el-input
|
||||
v-model="controlsObj.nickEn"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章名称-阿语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>勋章名称-阿语</span
|
||||
>
|
||||
<el-input
|
||||
v-model="controlsObj.nickAr"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章图片 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>勋章图片</span
|
||||
>
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<img
|
||||
:src="controlsObj.imageUrl1"
|
||||
class="avatar"
|
||||
/>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
<!-- 状态 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>状态</span
|
||||
>
|
||||
<el-select filterable v-model="controlsObj.value2" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options2"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="controlsDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="controlsDialogOut()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 发放勋章弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
class="pub"
|
||||
v-model="grantDialog"
|
||||
title="发放勋章"
|
||||
width="32%"
|
||||
center
|
||||
>
|
||||
<!-- 勋章名称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>勋章名称</span
|
||||
>
|
||||
<el-input
|
||||
v-model="grantObj.nick"
|
||||
placeholder="默认展示的是中文勋章名称"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 发放对象平台号 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>发放对象平台号</span
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
v-model="grantObj.userId"
|
||||
placeholder="多个平台号用英文“,”号分开分隔"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 发放天数 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>发放天数</span
|
||||
>
|
||||
<el-input
|
||||
v-model="grantObj.days"
|
||||
placeholder="输入天数,不输入则视为无限制"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 备注 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>备注</span
|
||||
>
|
||||
<el-input
|
||||
v-model="grantObj.desc"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="grantDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="grantOut()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
listPartitionInfo,
|
||||
medalPage,
|
||||
medalSave,
|
||||
medalSend,
|
||||
} from "@/api/medal/medal";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "MedalInfo",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
id: "",
|
||||
nick: "",
|
||||
partitionId: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10,
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
// 操作弹窗
|
||||
controlsDialog: false,
|
||||
controlsTitle: "新增&编辑",
|
||||
controlsType: 1,
|
||||
controlsObj: {
|
||||
value: [],
|
||||
options: [],
|
||||
nickZh: "",
|
||||
nickEn: "",
|
||||
nickAr: "",
|
||||
imageUrl1: "",
|
||||
value2: "",
|
||||
options2: [
|
||||
{
|
||||
desc: "生效",
|
||||
id: true,
|
||||
},
|
||||
{
|
||||
desc: "不生效",
|
||||
id: false,
|
||||
},
|
||||
],
|
||||
id: "",
|
||||
},
|
||||
// 发放弹窗
|
||||
grantDialog: false,
|
||||
grantObj: {
|
||||
nick: "",
|
||||
userId: "",
|
||||
days: "",
|
||||
desc: "",
|
||||
},
|
||||
grantObjNew: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listPartitionInfo().then((res) => {
|
||||
this.inquire.options = res.data;
|
||||
this.inquire.options.push({
|
||||
desc: "全部",
|
||||
id: "",
|
||||
});
|
||||
listPartitionInfo().then((res) => {
|
||||
this.controlsObj.options = res.data;
|
||||
this.getData();
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
medalPage({
|
||||
id: this.inquire.id,
|
||||
name: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.records;
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
add() {
|
||||
this.controlsTitle = "新增";
|
||||
this.controlsType = 1;
|
||||
this.controlsObj.value = [];
|
||||
this.controlsObj.nickZh = "";
|
||||
this.controlsObj.nickEn = "";
|
||||
this.controlsObj.nickAr = "";
|
||||
this.controlsObj.imageUrl1 = "";
|
||||
this.controlsObj.value2 = "";
|
||||
this.controlsDialog = true;
|
||||
},
|
||||
// 编辑
|
||||
eidFun(val) {
|
||||
this.controlsTitle = "编辑";
|
||||
this.controlsType = 2;
|
||||
this.controlsObj.value = this.partitionFlagFun(val.partitionFlag, 2);
|
||||
this.controlsObj.nickZh = JSON.parse(val.name).zh;
|
||||
this.controlsObj.nickEn = JSON.parse(val.name).en;
|
||||
this.controlsObj.nickAr = JSON.parse(val.name).ar;
|
||||
this.controlsObj.imageUrl1 = val.picUrl;
|
||||
this.controlsObj.value2 = val.enable;
|
||||
this.controlsObj.id = val.id;
|
||||
this.controlsDialog = true;
|
||||
},
|
||||
// 确认保存按钮
|
||||
controlsDialogOut() {
|
||||
if (this.controlsType == 1) {
|
||||
// 新增
|
||||
var obj = {};
|
||||
var partitionFlagVal = 0;
|
||||
console.log(this.controlsObj.value);
|
||||
console.log(this.controlsObj.options);
|
||||
this.controlsObj.value.forEach((res, i) => {
|
||||
partitionFlagVal |= this.controlsObj.options[i].id;
|
||||
});
|
||||
obj.partitionFlag = partitionFlagVal;
|
||||
obj.name = JSON.stringify({
|
||||
zh: this.controlsObj.nickZh,
|
||||
en: this.controlsObj.nickEn,
|
||||
ar: this.controlsObj.nickAr,
|
||||
});
|
||||
obj.picUrl = this.controlsObj.imageUrl1;
|
||||
obj.enable = this.controlsObj.value2;
|
||||
console.log(obj);
|
||||
medalSave(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
this.controlsDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
var obj1 = {};
|
||||
var partitionFlagVal1 = 0;
|
||||
this.controlsObj.value.forEach((res, i) => {
|
||||
partitionFlagVal1 += res;
|
||||
});
|
||||
obj1.partitionFlag = partitionFlagVal1;
|
||||
obj1.name = JSON.stringify({
|
||||
zh: this.controlsObj.nickZh,
|
||||
en: this.controlsObj.nickEn,
|
||||
ar: this.controlsObj.nickAr,
|
||||
});
|
||||
obj1.picUrl = this.controlsObj.imageUrl1;
|
||||
obj1.enable = this.controlsObj.value2;
|
||||
obj1.id = this.controlsObj.id;
|
||||
console.log(1111111111, this.controlsObj.value);
|
||||
console.log(this.controlsObj.options);
|
||||
console.log(obj1);
|
||||
medalSave(obj1).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
this.controlsDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//发放按钮
|
||||
grantFun(val) {
|
||||
this.grantObjNew = val;
|
||||
this.grantObj.nick = JSON.parse(val.name).zh;
|
||||
this.grantDialog = true;
|
||||
},
|
||||
// 确认发放
|
||||
grantOut() {
|
||||
medalSend({
|
||||
days: this.grantObj.days,
|
||||
erbanNoStr: this.grantObj.userId,
|
||||
medalId: this.grantObjNew.id,
|
||||
remark: this.grantObj.desc,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "发放成功",
|
||||
type: "success",
|
||||
});
|
||||
this.grantDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
partitionFlagFun(num, type) {
|
||||
//1 2 4
|
||||
var val = 0;
|
||||
if (type == 2) {
|
||||
if (num == 0 || num == 7) {
|
||||
val = [4, 1, 2];
|
||||
} else if (num == 1) {
|
||||
val = [1];
|
||||
} else if (num == 3) {
|
||||
val = [1, 2];
|
||||
} else if (num == 2) {
|
||||
val = [2];
|
||||
} else if (num == 6) {
|
||||
val = [2, 4];
|
||||
} else if (num == 4) {
|
||||
val = [4];
|
||||
}
|
||||
} else {
|
||||
if (num == 0 || num == 7) {
|
||||
val = "华语区、英语区、阿语区";
|
||||
} else if (num == 1) {
|
||||
val = "英语区";
|
||||
} else if (num == 3) {
|
||||
val = "英语区、阿语区";
|
||||
} else if (num == 2) {
|
||||
val = "阿语区";
|
||||
} else if (num == 6) {
|
||||
val = "阿语区、华语区";
|
||||
} else if (num == 4) {
|
||||
val = "华语区";
|
||||
}
|
||||
}
|
||||
return val;
|
||||
},
|
||||
beforeAvatarUpload() {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传中~",
|
||||
type: "warning",
|
||||
});
|
||||
},
|
||||
handleAvatarError() {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传失败!",
|
||||
type: "error",
|
||||
});
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
console.log(file);
|
||||
this.controlsObj.imageUrl1 = file.response.data;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传成功!",
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
363
src/views/medal/MedalRecord.vue
Normal file
363
src/views/medal/MedalRecord.vue
Normal file
@@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>勋章ID</span>
|
||||
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>用户平台ID</span>
|
||||
<el-input
|
||||
v-model="inquire.userId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="primary" type="primary" @click="grantDialog = true">
|
||||
发放勋章
|
||||
</el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="createTime" align="center" label="发放时间" />
|
||||
<el-table-column prop="source" align="center" label="发放渠道">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.source == 1 ? "管理后台" : scope.row.source
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="id" align="center" label="发放勋章ID" />
|
||||
<el-table-column prop="medalName" align="center" label="勋章名称" />
|
||||
<el-table-column align="center" prop="x" label="勋章图片" width="120">
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.picUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="scope.row.picUrl"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="x" align="center" label="生效天数">
|
||||
<template v-slot="scope">{{ scope.row.days }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="x" align="center" label="备注">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.remark == "" ? "-" : scope.row.remark
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="x" align="center" label="状态">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.status == 1
|
||||
? "生效中"
|
||||
: scope.row.status == 0
|
||||
? "已失效"
|
||||
: "撤销"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="erbanNo" align="center" label="发放对象平台号" />
|
||||
<el-table-column prop="nick" align="center" label="发放对象昵称" />
|
||||
<el-table-column
|
||||
prop="partitionName"
|
||||
align="center"
|
||||
label="发放对象分区"
|
||||
/>
|
||||
<el-table-column align="center" label="操作" width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="eidFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
:disabled="scope.row.status <= 0 ? true : false"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 发放勋章弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
class="pub"
|
||||
v-model="grantDialog"
|
||||
title="发放勋章"
|
||||
width="32%"
|
||||
center
|
||||
>
|
||||
<!-- 勋章昵称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>勋章昵称</span
|
||||
>
|
||||
<el-select filterable v-model="grantObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in grantObj.options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 发放对象平台号 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>发放对象平台号</span
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
v-model="grantObj.userId"
|
||||
placeholder="多个平台号用英文“,”号分开分隔"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 发放天数 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>发放天数</span
|
||||
>
|
||||
<el-input
|
||||
v-model="grantObj.days"
|
||||
placeholder="输入天数,不输入则视为无限制"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 备注 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>备注</span
|
||||
>
|
||||
<el-input
|
||||
v-model="grantObj.desc"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="grantDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="grantOut()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二次确认弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
v-model="delDialog"
|
||||
title="提示"
|
||||
width="30%"
|
||||
center
|
||||
>
|
||||
<span> 确定要撤销吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
medalRecordPage,
|
||||
listAll,
|
||||
medalSend,
|
||||
rollback,
|
||||
} from "@/api/medal/medal";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "MedalRecord",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
id: "",
|
||||
userId: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10,
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
// 发放弹窗
|
||||
grantDialog: false,
|
||||
grantObj: {
|
||||
value: "",
|
||||
options: [],
|
||||
userId: "",
|
||||
days: "",
|
||||
desc: "",
|
||||
},
|
||||
// 撤销
|
||||
delDialog: false,
|
||||
delObj: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listAll().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.grantObj.options = res.data;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
medalRecordPage({
|
||||
medalId: this.inquire.id,
|
||||
erbanNo: this.inquire.userId,
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.records;
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认发放
|
||||
grantOut() {
|
||||
medalSend({
|
||||
days: this.grantObj.days,
|
||||
erbanNoStr: this.grantObj.userId,
|
||||
medalId: this.grantObj.value,
|
||||
remark: this.grantObj.desc,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "发放成功",
|
||||
type: "success",
|
||||
});
|
||||
this.grantDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 撤销按钮
|
||||
eidFun(val) {
|
||||
this.delObj = val;
|
||||
this.delDialog = true;
|
||||
},
|
||||
// 确认撤销按钮
|
||||
delClick() {
|
||||
console.log(this.delObj);
|
||||
rollback({ recordId: this.delObj.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "撤销成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.delDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
325
src/views/nobleman/GoldWater.vue
Normal file
325
src/views/nobleman/GoldWater.vue
Normal file
@@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">会长分区</span>
|
||||
<el-select
|
||||
v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 公会ID -->
|
||||
<div class="inquire">
|
||||
<span>会长ID</span>
|
||||
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<!-- 公会 -->
|
||||
<div class="inquire">
|
||||
<span>公会名称</span>
|
||||
<el-input
|
||||
v-model="inquire.nick"
|
||||
placeholder="支持模糊查询"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="deriveFun()"
|
||||
>导出</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||
<el-table-column prop="name" align="center" label="公会名称" />
|
||||
<el-table-column
|
||||
prop="ownerPartitionName"
|
||||
align="center"
|
||||
label="会长分区"
|
||||
/>
|
||||
<el-table-column prop="memberNum" align="center" label="成员数" />
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="月金币收入(流水)"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hasGoldIncomeMemberNum"
|
||||
align="center"
|
||||
label="有流水成员数"
|
||||
/>
|
||||
<el-table-column prop="sendGiftUserNum" align="center" label="送礼人数" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="ediClick(scope.row)" type="text" size="default"
|
||||
>查看详情</el-button
|
||||
>
|
||||
<el-button @click="deriveFun2(scope.row)" type="text" size="default"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 内嵌单个工会详情 -->
|
||||
<el-dialog :title="detailsTitle" v-model="detailsDialog">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataDetails"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="erbanNo" align="center" label="用户平台ID"
|
||||
><template v-slot="scope">
|
||||
{{
|
||||
scope.row.enable ? scope.row.erbanNo : scope.row.erbanNo + "离开"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="micRemainTime" align="center" label="直播时长" />
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="金币收入(流水)"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="sendGiftUserNum"
|
||||
align="center"
|
||||
label="送礼人数"
|
||||
/>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailsDialog = false">关闭</el-button>
|
||||
<el-button type="primary" @click="incomeExportFamilyFun()"
|
||||
>导出</el-button
|
||||
>
|
||||
</div></template
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
incomePageFamily,
|
||||
incomeListFamilyMember,
|
||||
incomeExportFamily,
|
||||
incomeExportFamilys,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GoldWater",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
time: this.calculateLastSevenDays(),
|
||||
id: "",
|
||||
nick: "",
|
||||
partitionId: 2,
|
||||
inquireonInfos: [
|
||||
{ desc: "英语区", id: 1 },
|
||||
{ desc: "阿拉伯区", id: 2 },
|
||||
{ desc: "华语区", id: 4 },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 内嵌单个公会详情
|
||||
detailsDialog: false,
|
||||
detailsTitle: "",
|
||||
tableDataDetails: [],
|
||||
familyIdEx: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomePageFamily({
|
||||
erbanNo: this.inquire.id,
|
||||
familyName: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 导出总外列表
|
||||
deriveFun(val) {
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomeExportFamilys({
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
erbanNo: this.inquire.id,
|
||||
familyName: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {});
|
||||
},
|
||||
// 导出列表最外层
|
||||
deriveFun2(val) {
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomeExportFamily({
|
||||
familyId: val.id,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
}).then((res) => {});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 默认七天
|
||||
calculateLastSevenDays() {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
||||
return [start, end];
|
||||
},
|
||||
// 查看详情按钮
|
||||
ediClick(val) {
|
||||
this.detailsTitle = `公会昵称:【${val.name}】 时间:【${val.createTime}】—金币收入明细`;
|
||||
let time = this.inquire.time;
|
||||
let startDate = "";
|
||||
let endDate = "";
|
||||
if (time && time.length > 0) {
|
||||
startDate = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endDate = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
this.familyIdEx = val.id;
|
||||
incomeListFamilyMember({
|
||||
endDate,
|
||||
startDate,
|
||||
familyId: val.id,
|
||||
}).then((res) => {
|
||||
this.tableDataDetails = res.data;
|
||||
this.detailsDialog = true;
|
||||
});
|
||||
},
|
||||
// 导出按钮
|
||||
incomeExportFamilyFun() {
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomeExportFamily({
|
||||
familyId: this.familyIdEx,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
}).then((res) => {});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -18,7 +18,7 @@
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<!-- <div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
@@ -30,7 +30,7 @@
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
@@ -73,13 +73,53 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="创建日期" />
|
||||
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
|
||||
<el-table-column align="center" label="成员数量/上限"
|
||||
><template v-slot="scope"
|
||||
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</template
|
||||
></el-table-column
|
||||
>
|
||||
<el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" />
|
||||
<el-table-column align="center" label="成员数量/上限">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="memberDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="default"
|
||||
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收款账户" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="payAccountDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="medium "
|
||||
>
|
||||
payoneer:{{
|
||||
scope.row.payAccount.payoneer
|
||||
? scope.row.payAccount.payoneer
|
||||
: "未添加"
|
||||
}} </el-button
|
||||
><br />
|
||||
<el-button
|
||||
@click="payAccountDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="medium "
|
||||
>
|
||||
USDT-ERC20:{{
|
||||
scope.row.payAccount.usdt ? scope.row.payAccount.usdt : "未添加"
|
||||
}} </el-button
|
||||
><br />
|
||||
<el-button
|
||||
@click="payAccountDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="medium "
|
||||
>
|
||||
PayPal:{{
|
||||
scope.row.payAccount.payPal
|
||||
? scope.row.payAccount.payPal
|
||||
: "未添加"
|
||||
}} </el-button
|
||||
><br />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
|
||||
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
@@ -203,9 +243,24 @@
|
||||
v-model="ediObj.guildNick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 公会背景图 -->
|
||||
<div class="selectBox selectBoxImg">
|
||||
<span class="left" style="margin-right: 20px">公会背景图</span>
|
||||
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="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
|
||||
@@ -238,6 +293,145 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 编辑收款账户弹窗 -->
|
||||
<el-dialog
|
||||
v-model="payAccountDialog"
|
||||
:title="payAccountTitle"
|
||||
width="28%"
|
||||
center
|
||||
>
|
||||
<!-- Payoneer -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>Payoneer</span
|
||||
>
|
||||
<el-input
|
||||
v-model="payAccount.payoneer"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- USDT-ERC20 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>USDT-ERC20</span
|
||||
>
|
||||
<el-input
|
||||
v-model="payAccount.usdt"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- PayPal -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>PayPal</span
|
||||
>
|
||||
<el-input
|
||||
v-model="payAccount.payPal"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="payAccountDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="payAccountClick()">
|
||||
保存
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 编辑成员弹窗 -->
|
||||
<el-dialog v-model="memberDialog" :title="memberTitle" width="36%" center>
|
||||
<!-- 新增用户 -->
|
||||
<div class="inquire">
|
||||
<span>平台ID</span>
|
||||
<el-input
|
||||
v-model="member.userID"
|
||||
placeholder="请输入新增平台id"
|
||||
class="input"
|
||||
></el-input>
|
||||
<el-button type="primary" @click="addMemberFun()"> 新增 </el-button>
|
||||
</div>
|
||||
<!-- 内嵌表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="member.tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column align="center" label="用户平台ID">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.erbanNo
|
||||
}}{{
|
||||
scope.row.roleType == 1
|
||||
? "(会长)"
|
||||
: scope.row.roleType == 2
|
||||
? "(管理员)"
|
||||
: ""
|
||||
}}
|
||||
{{ scope.row.enable == false ? "(已离开)" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="createTime" align="center" label="加入时间" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="setMemberFun(scope.row)"
|
||||
:class="scope.row.roleType == 2 ? 'danger' : 'primary'"
|
||||
:type="scope.row.roleType == 2 ? 'danger' : 'primary'"
|
||||
size="default"
|
||||
:disabled="scope.row.roleType == 1 ? true : false"
|
||||
>{{
|
||||
scope.row.roleType == 1
|
||||
? "会长"
|
||||
: scope.row.roleType == 2
|
||||
? "取消管理员"
|
||||
: "设为管理员"
|
||||
}}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="
|
||||
memberRemoveObj = scope.row;
|
||||
memberRemoveDialog = true;
|
||||
"
|
||||
class="danger"
|
||||
type="danger"
|
||||
size="default"
|
||||
:disabled="scope.row.roleType == 1 ? true : false"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="memberDialog = false">
|
||||
关闭
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 二次确认删除弹窗 -->
|
||||
<el-dialog v-model="memberRemoveDialog" title="提示" width="30%" center>
|
||||
<span> 确定要删除该成员吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="memberRemoveDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delmemberRemoveClick()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -247,6 +441,11 @@ import {
|
||||
create,
|
||||
update,
|
||||
dismiss,
|
||||
savePayAccount,
|
||||
manageListFamilyMember,
|
||||
addMember,
|
||||
setManager,
|
||||
removeMember,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
@@ -287,7 +486,28 @@ export default {
|
||||
guildNick: "",
|
||||
guildNumber: "",
|
||||
id: "",
|
||||
imageUrl1: "",
|
||||
},
|
||||
// 收款账户弹窗
|
||||
payAccountDialog: false,
|
||||
payAccountTitle: "(会长昵称【ID:0】)的收款账户",
|
||||
payAccountNew: {},
|
||||
payAccount: {
|
||||
payoneer: "",
|
||||
usdt: "",
|
||||
payPal: "",
|
||||
},
|
||||
// 新增成员弹窗
|
||||
memberDialog: false,
|
||||
memberTitle: "【公会名称】成员信息",
|
||||
memberNew: {},
|
||||
member: {
|
||||
userID: "",
|
||||
tableData: [],
|
||||
},
|
||||
// 删除成员弹窗
|
||||
memberRemoveDialog: false,
|
||||
memberRemoveObj: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -308,8 +528,8 @@ export default {
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
// startDate: startTime,
|
||||
// endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
@@ -318,6 +538,132 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 打开成员信息弹窗
|
||||
memberDialogFun(val) {
|
||||
var than = this;
|
||||
than.memberTitle = `【${val.name}】成员信息`;
|
||||
than.memberNew = val;
|
||||
manageListFamilyMember({
|
||||
familyId: val.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
than.memberDialog = true;
|
||||
});
|
||||
},
|
||||
// 二次确认删除成员
|
||||
delmemberRemoveClick() {
|
||||
removeMember({
|
||||
familyMemberId: this.memberRemoveObj.familyMemberId,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "删除成功",
|
||||
type: "success",
|
||||
});
|
||||
manageListFamilyMember({
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.memberRemoveDialog = false;
|
||||
});
|
||||
},
|
||||
// 设置管理员
|
||||
setMemberFun(val) {
|
||||
setManager({
|
||||
familyMemberId: val.familyMemberId,
|
||||
status: val.roleType == 3 ? true : val.roleType == 2 ? false : null,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "设置成功!",
|
||||
type: "success",
|
||||
});
|
||||
this.member.userID = "";
|
||||
manageListFamilyMember({
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增成员
|
||||
addMemberFun() {
|
||||
addMember({
|
||||
erbanNo: this.member.userID,
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存成功!",
|
||||
type: "success",
|
||||
});
|
||||
this.member.userID = "";
|
||||
manageListFamilyMember({
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存失败!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 打开收款账户弹窗
|
||||
payAccountDialogFun(val) {
|
||||
this.payAccountTitle = `(${val.ownerNick}【ID:${val.ownerErbanNo}】)的收款账户`;
|
||||
this.payAccount.payoneer = val.payAccount.payoneer;
|
||||
this.payAccount.usdt = val.payAccount.usdt;
|
||||
this.payAccount.payPal = val.payAccount.payPal;
|
||||
this.payAccountDialog = true;
|
||||
this.payAccountNew = val;
|
||||
},
|
||||
// 保存收款账户
|
||||
payAccountClick() {
|
||||
savePayAccount({
|
||||
id: this.payAccountNew.payAccount.familyId,
|
||||
payPal: this.payAccount.payPal,
|
||||
payoneer: this.payAccount.payoneer,
|
||||
usdt: this.payAccount.usdt,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存成功!",
|
||||
type: "success",
|
||||
});
|
||||
this.payAccountDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存失败!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 导出
|
||||
exportInfoFun() {
|
||||
let time = this.inquire.time;
|
||||
@@ -331,8 +677,8 @@ export default {
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
// startDate: startTime,
|
||||
// endDate: endTime,
|
||||
}).then((res) => {});
|
||||
},
|
||||
// 添加
|
||||
@@ -353,6 +699,7 @@ export default {
|
||||
this.ediObj.guildNick = obj.name;
|
||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||
this.ediObj.id = obj.id;
|
||||
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
||||
this.editDialog = true;
|
||||
},
|
||||
// 二次确认弹窗
|
||||
@@ -361,6 +708,8 @@ export default {
|
||||
update({
|
||||
id: this.ediObj.id,
|
||||
memberNumLimit: this.ediObj.guildNumber,
|
||||
backgroundUrl: this.ediObj.imageUrl1,
|
||||
name: this.ediObj.guildNick,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
@@ -403,6 +752,30 @@ export default {
|
||||
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 = URL.createObjectURL();
|
||||
this.ediObj.imageUrl1 = file.response.data;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传成功!",
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
@@ -436,4 +809,13 @@ export default {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.selectBoxImg {
|
||||
height: 150px;
|
||||
}
|
||||
</style>
|
||||
|
398
src/views/nobleman/WagesCount.vue
Normal file
398
src/views/nobleman/WagesCount.vue
Normal file
@@ -0,0 +1,398 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-date-picker v-model="inquire.time"
|
||||
type="month"
|
||||
placeholder="选择月">
|
||||
</el-date-picker></el-config-provider>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">会长分区</span>
|
||||
<el-select v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 公会 -->
|
||||
<div class="inquire">
|
||||
<span>会长ID</span>
|
||||
<el-input v-model="inquire.nick"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<!-- 导出 -->
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="deriveFun()">导出</el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="ownerErbanNo"
|
||||
align="center"
|
||||
label="会长ID" />
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="公会名称" />
|
||||
<el-table-column prop="ownerPartitionName"
|
||||
align="center"
|
||||
label="会长分区" />
|
||||
<el-table-column prop="enable"
|
||||
align="center"
|
||||
label="是否有效状态">
|
||||
<template v-slot="scope">{{ scope.row.enable? '是': '否' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="memberNum"
|
||||
align="center"
|
||||
label="成员数" />
|
||||
<el-table-column prop="goldIncome"
|
||||
align="center"
|
||||
label="月金币收入(流水)" />
|
||||
<el-table-column prop="goldWage"
|
||||
align="center"
|
||||
label="金币工资" />
|
||||
<el-table-column prop="agentWage"
|
||||
align="center"
|
||||
label="代理工资" />
|
||||
<el-table-column prop="diamondRemain"
|
||||
align="center"
|
||||
label="当前钻石余额">
|
||||
<template v-slot="scope">{{ scope.row.diamondRemain }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="260">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="ediClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">查看详情</el-button>
|
||||
<el-button @click="deriveFun2(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 内嵌单个工会详情 -->
|
||||
<el-dialog :title="detailsTitle"
|
||||
v-model="detailsDialog">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableDataDetails"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="erbanNo"
|
||||
align="center"
|
||||
label="用户平台ID">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.erbanNo == scope.row.familyOwnerErbanNo
|
||||
? scope.row.erbanNo + "(会长)"
|
||||
: scope.row.enable
|
||||
? scope.row.erbanNo
|
||||
: scope.row.erbanNo + "离开"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick"
|
||||
align="center"
|
||||
label="用户昵称" />
|
||||
<el-table-column prop="micRemainTime"
|
||||
align="center"
|
||||
label="本月直播时长" />
|
||||
<el-table-column prop="micVaildDays"
|
||||
align="center"
|
||||
label="本月有效天数" />
|
||||
<el-table-column prop="goldIncome"
|
||||
align="center"
|
||||
label="月金币收入(流水)" />
|
||||
<el-table-column prop="goldWage"
|
||||
align="center"
|
||||
label="金币工资" />
|
||||
<el-table-column prop="agentWage"
|
||||
align="center"
|
||||
label="代理工资" />
|
||||
<el-table-column prop="diamondRemain"
|
||||
align="center"
|
||||
label="当前钻石余额" />
|
||||
<el-table-column align="center"
|
||||
label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="detailsClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailsDialog = false">关闭</el-button>
|
||||
<el-button type="primary"
|
||||
@click="detailsClickOut()">导出</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 内嵌单个成员明细 -->
|
||||
<el-dialog :title="detailsTitle2"
|
||||
v-model="detailsDialog2">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableDataDetails2"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="date"
|
||||
align="center"
|
||||
label="日期" />
|
||||
<el-table-column prop="micRemainTime"
|
||||
align="center"
|
||||
label="直播时长" />
|
||||
<el-table-column prop="micVaild"
|
||||
align="center"
|
||||
label="是否有效天">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.micVaild ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goldIncome"
|
||||
align="center"
|
||||
label="当日金币收入" />
|
||||
<el-table-column prop="savedGoldIncome"
|
||||
align="center"
|
||||
label="月累计金币收入" />
|
||||
<el-table-column prop="saveedGoldWage"
|
||||
align="center"
|
||||
label="月金币工资" />
|
||||
<el-table-column prop="diamondRemain"
|
||||
align="center"
|
||||
label="当日钻石余额" />
|
||||
<!-- <el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="detailsClick2(scope)"
|
||||
class="primary"
|
||||
type="text"
|
||||
size="default"
|
||||
:disabled="!scope.row.enable"
|
||||
>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailsDialog2 = false">关闭</el-button>
|
||||
<el-button type="primary"
|
||||
@click="detailsClickOut2()">导出</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 分页 -->
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
|
||||
import {
|
||||
statPageFamily,
|
||||
listFamilyMember,
|
||||
statExportFamilyMember,
|
||||
listFamilyMemberDaily,
|
||||
exportFamilyMemberDaily,
|
||||
statExportFamily,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "WagesCount",
|
||||
data () {
|
||||
return {
|
||||
zhCn,
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
time: "",
|
||||
nick: "",
|
||||
partitionId: 2,
|
||||
inquireonInfos: [
|
||||
{ desc: "英语区", id: 1 },
|
||||
{ desc: "阿拉伯区", id: 2 },
|
||||
{ desc: "华语区", id: 4 },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 内嵌单个公会详情
|
||||
detailsDialog: false,
|
||||
detailsTitle: "工会昵称 时间段 结算明细",
|
||||
tableDataDetails: [],
|
||||
detailsClickOutObj: {},
|
||||
// 内嵌单个公会详情2
|
||||
detailsDialog2: false,
|
||||
detailsTitle2: "工会昵称 用户昵称(ID:0) 时间段 结算明细",
|
||||
tableDataDetails2: [],
|
||||
detailsClickOutObj2: {},
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData () {
|
||||
// this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
if (time) {
|
||||
time = dateFormat(this.inquire.time, "yyyy-MM");
|
||||
}
|
||||
statPageFamily({
|
||||
erbanNo: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
month: time,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 导出总外列表
|
||||
deriveFun (val) {
|
||||
let time = this.inquire.time;
|
||||
if (time) {
|
||||
time = dateFormat(this.inquire.time, "yyyy-MM");
|
||||
}
|
||||
statExportFamily({
|
||||
erbanNo: this.inquire.nick,
|
||||
month: time,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => { });
|
||||
},
|
||||
// 导出列表最外层
|
||||
deriveFun2 (val) {
|
||||
statExportFamilyMember({
|
||||
familyId: val.id,
|
||||
month: dateFormat(this.inquire.time, "yyyy-MM"),
|
||||
});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 1层查看详情按钮
|
||||
ediClick (val) {
|
||||
console.log(val);
|
||||
var than = this;
|
||||
this.detailsClickOutObj = val;
|
||||
than.detailsTitle = `[${val.name}] [${dateFormat(
|
||||
than.inquire.time,
|
||||
"yyyy-MM"
|
||||
)}]结算明细`;
|
||||
listFamilyMember({
|
||||
familyId: val.id,
|
||||
month: dateFormat(than.inquire.time, "yyyy-MM"),
|
||||
}).then((res) => {
|
||||
this.tableDataDetails = res.data;
|
||||
this.detailsDialog = true;
|
||||
});
|
||||
},
|
||||
// 导出最外层数据按钮
|
||||
detailsClickOut () {
|
||||
statExportFamilyMember({
|
||||
familyId: this.detailsClickOutObj.id,
|
||||
month: dateFormat(this.inquire.time, "yyyy-MM"),
|
||||
});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 嵌套详情按钮
|
||||
detailsClick (val) {
|
||||
var than = this;
|
||||
this.detailsClickOutObj2 = val;
|
||||
than.detailsTitle2 = `公会名称:${val.familyName} 成员名称:${val.nick
|
||||
}(ID:${val.erbanNo}) ${dateFormat(
|
||||
than.inquire.time,
|
||||
"yyyy-MM"
|
||||
)} 结算明细`;
|
||||
listFamilyMemberDaily({
|
||||
familyId: val.familyId,
|
||||
month: dateFormat(than.inquire.time, "yyyy-MM"),
|
||||
uid: val.uid,
|
||||
}).then((res) => {
|
||||
than.tableDataDetails2 = res.data;
|
||||
than.detailsDialog2 = true;
|
||||
});
|
||||
},
|
||||
// 导出每日成员数据
|
||||
detailsClickOut2 () {
|
||||
exportFamilyMemberDaily({
|
||||
familyId: this.detailsClickOutObj2.id,
|
||||
month: dateFormat(this.inquire.time, "yyyy-MM"),
|
||||
uid: this.detailsClickOutObj2.uid,
|
||||
});
|
||||
this.detailsDialog2 = false;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
188
src/views/nobleman/WaterSettlement.vue
Normal file
188
src/views/nobleman/WaterSettlement.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="addDialog = true"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-tabs v-model="roleType" @click="handleClick" style="margin-top: 20px">
|
||||
<el-tab-pane label="金币工资" name="3"></el-tab-pane>
|
||||
<el-tab-pane label="代理工资" name="1"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="level"
|
||||
align="center"
|
||||
label="金币目标(金币流水)"
|
||||
/>
|
||||
<el-table-column prop="wage" align="center" label="金币工资(USD)" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="delClick(scope.row)"
|
||||
class="danger"
|
||||
type="danger"
|
||||
size="default"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 新增弹窗 -->
|
||||
<el-dialog title="新增档位" v-model="addDialog" width="35%">
|
||||
<div class="inquire">
|
||||
<span>金币目标(金币流水)</span>
|
||||
<el-input v-model="add.gold" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>金币工资(USD)</span>
|
||||
<el-input v-model="add.usdt" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addShour()">保存</el-button>
|
||||
</div></template
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二次确认删除弹窗 -->
|
||||
<el-dialog v-model="delDialog" title="提示" width="30%" center>
|
||||
<span> 确定要删除吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="dle()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { manageList, manageAdd, manageDelete } from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "WaterSettlement",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
// 切换
|
||||
roleType: "3",
|
||||
// 表格
|
||||
tableData: [],
|
||||
arr1: [],
|
||||
arr2: [],
|
||||
// 新增弹窗
|
||||
addDialog: false,
|
||||
add: {
|
||||
gold: "",
|
||||
usdt: "",
|
||||
},
|
||||
delDialog: false,
|
||||
delObj: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
manageList({
|
||||
roleType: this.roleType,
|
||||
}).then((res) => {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
this.getData();
|
||||
},
|
||||
// 确认新增按钮
|
||||
addShour() {
|
||||
manageAdd({
|
||||
roleType: this.roleType,
|
||||
level: this.add.gold,
|
||||
wage: this.add.usdt,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "新增成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.addDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
delClick(val) {
|
||||
this.delObj = val;
|
||||
this.delDialog = true;
|
||||
},
|
||||
// 确认删除
|
||||
dle() {
|
||||
manageDelete({ id: this.delObj.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "删除成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.delDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
width: 60%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
374
src/views/ssGuild/SsGuild.vue
Normal file
374
src/views/ssGuild/SsGuild.vue
Normal file
@@ -0,0 +1,374 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>主播ID</span>
|
||||
<el-input
|
||||
v-model="inquire.anchorId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>公会ID</span>
|
||||
<el-input
|
||||
v-model="inquire.guildId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>公会长ID</span>
|
||||
<el-input
|
||||
v-model="inquire.guildUserId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>周期</span>
|
||||
<el-select v-model="inquire.weekTime" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.weekTimeOptions"
|
||||
:key="item.cycleDateBegin"
|
||||
:label="item.cycleDateShow"
|
||||
:value="item.cycleDateBegin"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>发放状态</span>
|
||||
<el-select v-model="inquire.status" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.statusOptions"
|
||||
: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="confirmExport2Excel()"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-button class="warning" type="warning " @click="sendGoldFun()"
|
||||
>批量发放</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column type="selection" :selectable="callback" label="选择" />
|
||||
<el-table-column prop="cycleDate" align="center" label="周期" />
|
||||
<el-table-column prop="erbanNo" align="center" label="主播ID" />
|
||||
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||
<el-table-column
|
||||
prop="guildDiamondNum"
|
||||
align="center"
|
||||
label="公会总流水"
|
||||
/>
|
||||
<el-table-column prop="ssLevelName" align="center" label="公会等级" />
|
||||
<el-table-column prop="diamondNum" align="center" label="主播流水" />
|
||||
<el-table-column prop="memberLevelName" align="center" label="主播档位" />
|
||||
<el-table-column prop="goldNum" align="center" label="主播获得奖励" />
|
||||
<el-table-column align="center" prop="giftInfo" label="发放状态">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.sendStatusStr }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sendUser" align="center" label="发放人" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="sendGoldOneFun(scope.row)"
|
||||
:class="scope.row.sendStatusStr == '未发放' ? 'primary' : 'info'"
|
||||
:type="scope.row.sendStatusStr == '未发放' ? 'primary' : 'info'"
|
||||
size="default"
|
||||
:disabled="scope.row.sendStatusStr == '未发放' ? false : true"
|
||||
>{{
|
||||
scope.row.sendStatusStr == "未发放" ? "发放" : "已发放"
|
||||
}}</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
cycleDateList,
|
||||
list,
|
||||
ssGuildExport,
|
||||
sendGold,
|
||||
} from "@/api/SsGuild/SsGuild";
|
||||
// @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: "SsGuild",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
delDialog: false,
|
||||
delDialogData: null,
|
||||
selectedRows: [], //存储选中行数据
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
anchorId: "",
|
||||
guildId: "",
|
||||
guildUserId: "",
|
||||
weekTime: "",
|
||||
weekTimeOptions: [],
|
||||
status: "",
|
||||
statusOptions: [
|
||||
{ value: 0, label: "未发放" },
|
||||
{ value: 1, label: "已发放" },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
cycleDateList().then((res) => {
|
||||
this.inquire.weekTimeOptions = res.data;
|
||||
});
|
||||
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");
|
||||
}
|
||||
list({
|
||||
erbanNo: this.inquire.anchorId,
|
||||
guildId: this.inquire.guildId,
|
||||
ownerErbanNo: this.inquire.guildUserId,
|
||||
cycleDate: this.inquire.weekTime,
|
||||
status: this.inquire.status,
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).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;
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.selectedRows = val;
|
||||
console.log("Selected rows:", this.selectedRows);
|
||||
},
|
||||
handleGetSelection() {
|
||||
// 获取选中的行数据
|
||||
console.log("Current selected rows:", this.selectedRows);
|
||||
},
|
||||
// 确认导出
|
||||
confirmExport2Excel() {
|
||||
ElMessageBox.confirm("确定导出Excel吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
ssGuildExport({
|
||||
erbanNo: this.inquire.anchorId,
|
||||
guildId: this.inquire.guildId,
|
||||
ownerErbanNo: this.inquire.guildUserId,
|
||||
cycleDate: this.inquire.weekTime,
|
||||
status: this.inquire.status,
|
||||
})
|
||||
.then((res) => {
|
||||
// if (res) {
|
||||
// this.exportVisible = false;
|
||||
// this.btnLoading = false;
|
||||
// let alink = document.createElement("a");
|
||||
// alink.download = `SS公会奖励发放.xls`;
|
||||
// alink.style.display = "none";
|
||||
// const blob = new Blob([res.data]);
|
||||
// alink.href = URL.createObjectURL(blob);
|
||||
// document.body.appendChild(alink);
|
||||
// alink.click();
|
||||
// URL.revokeObjectURL(alink.href);
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err); // 打印错误信息
|
||||
ElMessage.error("导出失败");
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "info",
|
||||
message: "取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
callback(row) {
|
||||
return row.sendStatusStr == "未发放" ? true : false;
|
||||
},
|
||||
// 确认批量发放
|
||||
sendGoldFun() {
|
||||
ElMessageBox.confirm("确定发放奖励吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
var str = "";
|
||||
this.selectedRows.forEach((res) => {
|
||||
str += `${res.id},`;
|
||||
});
|
||||
sendGold({ ids: str })
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "发放成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err); // 打印错误信息
|
||||
ElMessage.error("发放失败");
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "info",
|
||||
message: "取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 确认单个发放
|
||||
sendGoldOneFun(val) {
|
||||
ElMessageBox.confirm("确定发放奖励吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
sendGold({ ids: val.id })
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "发放成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err); // 打印错误信息
|
||||
ElMessage.error("发放失败");
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: "info",
|
||||
message: "取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
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>
|
@@ -65,6 +65,8 @@
|
||||
<option value="11">个播人气礼物</option>
|
||||
<option value="15">线性福袋礼物</option>
|
||||
<option value="16">超级幸运礼物</option>
|
||||
<option value="17">国家礼物</option>
|
||||
<option value="18">CP礼物</option>
|
||||
</select>
|
||||
</div>
|
||||
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
|
||||
@@ -206,6 +208,8 @@
|
||||
<option value="11">个播人气礼物</option>
|
||||
<option value="15">线性福袋礼物</option>
|
||||
<option value="16">超级幸运礼物</option>
|
||||
<option value="17">国家礼物</option>
|
||||
<option value="18">CP礼物</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -35,6 +35,7 @@
|
||||
<el-table-column prop="vipLevel" align="center" label="赠送贵族等级">
|
||||
<template v-slot="scope">VIP{{ scope.row.vipLevel }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adminName" align="center" label="操作人" />
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
@@ -90,6 +91,24 @@
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 赠送天数 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>赠送天数</span
|
||||
>
|
||||
<el-select v-model="editObj.value2" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in editObj.options2"
|
||||
:key="item.day"
|
||||
:label="item.dayName"
|
||||
:value="item.day"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- 用户昵称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
@@ -182,6 +201,33 @@ export default {
|
||||
userId: "",
|
||||
value: "",
|
||||
options: [],
|
||||
value2: "",
|
||||
options2: [
|
||||
{
|
||||
dayName: "1天",
|
||||
day: 1,
|
||||
},
|
||||
{
|
||||
dayName: "3天",
|
||||
day: 3,
|
||||
},
|
||||
{
|
||||
dayName: "5天",
|
||||
day: 5,
|
||||
},
|
||||
{
|
||||
dayName: "7天",
|
||||
day: 7,
|
||||
},
|
||||
{
|
||||
dayName: "15天",
|
||||
day: 15,
|
||||
},
|
||||
{
|
||||
dayName: "30天",
|
||||
day: 30,
|
||||
},
|
||||
],
|
||||
nick: "",
|
||||
time: "",
|
||||
region: "",
|
||||
@@ -247,6 +293,7 @@ export default {
|
||||
vipSendSend({
|
||||
uid: this.editObj.uid,
|
||||
vipLevel: this.editObj.value,
|
||||
days: this.editObj.value2,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
|
Reference in New Issue
Block a user