Compare commits

...

44 Commits

Author SHA1 Message Date
liaozetao
7d915d59f3 修复渠道展示问题 2023-11-21 14:57:34 +08:00
liaozetao
8c9af40427 修复跳转类型 2023-11-21 12:02:35 +08:00
liaozetao
d3082e3390 修复开屏跳转类型 2023-11-21 11:57:49 +08:00
liaozetao
35d01b2afd 开屏设置默认开启 2023-11-21 11:54:43 +08:00
liaozetao
5360a54da1 修复闪屏逻辑 2023-11-20 18:44:09 +08:00
liaozetao
f600e089a2 修复上传按钮 2023-11-20 18:34:13 +08:00
liaozetao
365263162b 手机授权页面增加字段 2023-11-20 18:25:55 +08:00
liaozetao
2b326dbaba 上传文件增加遮罩层 2023-11-20 16:20:36 +08:00
liaozetao
f50ba76de7 修改file文件上传判断 2023-11-20 16:11:10 +08:00
liaozetao
2a32c0dbb9 补充 2023-11-20 16:05:25 +08:00
liaozetao
7b7f38d5cb 修复展示类型 2023-11-20 15:38:58 +08:00
liaozetao
1c5f7e927c 判断不允许重复发请求 2023-11-20 14:51:52 +08:00
liaozetao
20ea616755 删除日志 2023-11-20 12:35:56 +08:00
liaozetao
0e3591c1f0 修复按钮展示问题 2023-11-20 12:19:17 +08:00
liaozetao
96e96d09ae 修复上传问题 2023-11-20 12:08:25 +08:00
liaozetao
3e66a6c467 补充 2023-11-20 12:00:51 +08:00
liaozetao
395e3917f8 修改上传逻辑 2023-11-20 11:58:36 +08:00
liaozetao
518842aca2 修復時間格式化 2023-11-20 11:34:20 +08:00
liaozetao
1fea5ed803 修復圖片上傳 2023-11-20 11:19:50 +08:00
liaozetao
091adb4093 修复下拉框字段 2023-11-20 11:14:23 +08:00
liaozetao
99cd6320b6 修复按钮判断 2023-11-20 10:59:07 +08:00
liaozetao
87de178799 修复时间格式化问题 2023-11-20 10:52:30 +08:00
liaozetao
1568ebb36c 新增开屏设置 2023-11-17 17:52:47 +08:00
liaozetao
96871a60ff 新增资源位管理 2023-11-16 14:35:46 +08:00
liaozetao
7383842e7f 去除unmounted 2023-11-14 17:59:51 +08:00
liaozetao
baa2cfcb8c 修复table组件问题 2023-11-14 17:57:20 +08:00
liaozetao
2c55463d35 修复上传组件 2023-11-14 16:01:12 +08:00
Dragon
b8568ce761 后台-充值明细-输入框校验修改 2023-11-14 12:17:07 +08:00
Dragon
7daf9feb39 转赠身份设置后台管理 2023-11-06 18:23:59 +08:00
liaozetao
20bccaae6a 优化菜单展示逻辑 2023-11-02 17:29:09 +08:00
liaozetao
d392cb089f 修改菜单读取逻辑 2023-11-02 17:16:37 +08:00
liaozetao
9a68bf278f 归因场次不允许跨月 2023-11-02 15:44:30 +08:00
liaozetao
f8fc444e32 新增累计字段 2023-11-01 13:08:38 +08:00
liaozetao
332edf1d0c 修复小数点问题 2023-11-01 11:50:29 +08:00
Dragon
73eea6d101 修复保存传参异常问题 2023-11-01 11:39:29 +08:00
Dragon
c51d205a42 优化配置管理 2023-11-01 11:39:28 +08:00
Dragon
8c1cd51293 注释toast 2023-10-31 15:51:37 +08:00
Dragon
b8ad4f0234 修复分页异常问题 2023-10-31 15:29:17 +08:00
Dragon
8226604c00 新增编辑功能 2023-10-31 15:29:17 +08:00
Dragon
c23afafdc5 修复判断展示条件 2023-10-31 15:29:17 +08:00
Dragon
6b7aa99419 修复bug 2023-10-31 15:29:16 +08:00
Dragon
dd95a1d64e 红包管理后台 2023-10-31 15:29:16 +08:00
liaozetao
ec90636760 补充 2023-10-30 17:07:15 +08:00
liaozetao
5d6d22a0af 新增模块分析库 2023-10-30 16:49:55 +08:00
336 changed files with 2659 additions and 1399 deletions

101
package-lock.json generated
View File

@@ -8,6 +8,7 @@
"name": "peko-admin-web",
"version": "0.1.0",
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"admin-lte": "^2.3.2",
"axios": "^1.5.0",
"bootstrap": "^3.3.5",
@@ -25,7 +26,8 @@
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"vue-router": "^4.0.3",
"vuex": "^4.0.0"
"vuex": "^4.0.0",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@babel/core": "^7.12.16",
@@ -40,6 +42,7 @@
"unplugin-auto-import": "^0.16.7",
"unplugin-vue-components": "^0.25.2",
"vue": "^3.2.13",
"webpack-bundle-analyzer": "^4.9.1",
"webpack-cli": "^5.1.4"
}
},
@@ -3715,6 +3718,14 @@
"node": ">= 10.0.0"
}
},
"node_modules/adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/admin-lte": {
"version": "2.3.2",
"resolved": "https://registry.npmmirror.com/admin-lte/-/admin-lte-2.3.2.tgz",
@@ -4438,6 +4449,18 @@
"node": ">=4"
}
},
"node_modules/cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"dependencies": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz",
@@ -4690,6 +4713,14 @@
"node": ">=0.10.0"
}
},
"node_modules/codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz",
@@ -4960,6 +4991,17 @@
"node": ">=10"
}
},
"node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"bin": {
"crc32": "bin/crc32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz",
@@ -6777,6 +6819,14 @@
"node": ">= 0.6"
}
},
"node_modules/frac": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/fraction.js": {
"version": "4.3.6",
"resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.3.6.tgz",
@@ -11659,6 +11709,17 @@
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
"dev": true
},
"node_modules/ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"dependencies": {
"frac": "~1.1.2"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz",
@@ -12813,7 +12874,7 @@
},
"node_modules/webpack-bundle-analyzer": {
"version": "4.9.1",
"resolved": "https://registry.npmmirror.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.1.tgz",
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.1.tgz",
"integrity": "sha512-jnd6EoYrf9yMxCyYDPj8eutJvtjQNp8PHmni/e/ulydHBWhT5J3menXt3HEkScsu9YqMAcG4CfFjs3rj5pVU1w==",
"dev": true,
"dependencies": {
@@ -13272,6 +13333,22 @@
"integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==",
"dev": true
},
"node_modules/wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/word": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
@@ -13338,6 +13415,26 @@
}
}
},
"node_modules/xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"dependencies": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
"bin": {
"xlsx": "bin/xlsx.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz",

View File

@@ -3,11 +3,12 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --mode development",
"dev": "vue-cli-service serve --mode development --report",
"build": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"admin-lte": "^2.3.2",
"axios": "^1.5.0",
"bootstrap": "^3.3.5",
@@ -25,7 +26,8 @@
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"vue-router": "^4.0.3",
"vuex": "^4.0.0"
"vuex": "^4.0.0",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@babel/core": "^7.12.16",
@@ -40,6 +42,7 @@
"unplugin-auto-import": "^0.16.7",
"unplugin-vue-components": "^0.25.2",
"vue": "^3.2.13",
"webpack-bundle-analyzer": "^4.9.1",
"webpack-cli": "^5.1.4"
}
}

23
src/api/common/upload.js Normal file
View File

@@ -0,0 +1,23 @@
import '@/utils/ajaxfileupload';
export const uploadFile = id => {
return new Promise((resolve, reject) => {
$.ajaxFileUpload({
fileElementId: id,
url: '/admin/upload/img',
type: 'post',
dataType: 'json',
secureuri: false,
async: true,
submitType: 'ajax',
success: function (res) {
resolve(res);
},
error: function (res, status, e) {
console.error(res);
console.error(status);
reject(e);
}
});
});
};

View File

@@ -0,0 +1,34 @@
import request from '@/utils/request';
export const getResourcePage = query => {
return request({
url: '/admin/resource/page',
method: 'get',
params: query
});
};
export const delResource = query => {
return request({
url: '/admin/resource/del',
method: 'get',
params: query
});
};
export const effective = query => {
return request({
url: '/admin/resource/effective',
method: 'get',
params: query
});
};
export const saveResource = data => {
return request({
url: '/admin/resource/save',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: data
});
}

View File

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

View File

@@ -0,0 +1,60 @@
import request from '@/utils/request';
import qs from 'qs';
// 获取房间权限列表
export const redEnvelopePage = query => {
return request({
url: '/admin/room/redEnvelope/page',
method: 'get',
params: query
});
};
// 新增
export const redEnvelopeSave = query => {
return request({
url: '/admin/room/redEnvelope/save',
method: 'post',
params: query
});
};
// 删除
export const delRoomRedEnvelope = query => {
return request({
url: '/admin/room/redEnvelope/delRoomRedEnvelope',
method: 'get',
params: query
});
};
// 弹窗列表
export const userPage = query => {
return request({
url: '/admin/room/redEnvelope/userPage',
method: 'get',
params: query
});
};
// 弹窗新增
export const saveManager = query => {
return request({
url: '/admin/room/redEnvelope/saveManager',
method: 'post',
params: query
});
};
// 弹窗编辑
export const redEnvelopeUpdate = query => {
return request({
url: '/admin/room/redEnvelope/update',
method: 'post',
params: query
});
};
// 弹窗删除
export const delUserRoomRedEnvelope = query => {
return request({
url: '/admin/room/redEnvelope/delUserRoomRedEnvelope',
method: 'get',
params: query
});
};

View File

@@ -0,0 +1,29 @@
import request from '@/utils/request';
import qs from 'qs';
// 获取列表
export const getList = query => {
return request({
url: '/admin/sysConf/getList',
method: 'get',
params: query
});
};
// 保存新增
export const sysConfSave = query => {
return request({
url: '/admin/sysConf/save',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: query
});
};
// 删除
export const sysConfDel = query => {
return request({
url: '/admin/sysConf/del',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: query
});
};

View File

@@ -0,0 +1,27 @@
import request from '@/utils/request';
import qs from 'qs';
// 获取列表
export const userPage = query => {
return request({
url: '/admin/give/user/page',
method: 'get',
params: query
});
};
// 新增
export const userSave = query => {
return request({
url: '/admin/give/user/save',
method: 'post',
params: query
});
};
// 删除
export const batchDel = query => {
return request({
url: '/admin/give/user/batchDel',
method: 'get',
params: query
});
};

View File

@@ -2203,8 +2203,10 @@
fixedScroll = data.fixedScroll;
data = data[this.options.dataField];
} else if (!$.isArray(data)) { // support fixedScroll
fixedScroll = data.fixedScroll;
data = data.data;
if (data) {
fixedScroll = data.fixedScroll;
data = data.data;
}
}
this.initData(data);
@@ -2528,13 +2530,25 @@
};
BootstrapTable.prototype.destroy = function () {
let bootstrapTable = $('div .bootstrap-table');
if (bootstrapTable) {
let $this = this;
let tables = bootstrapTable.filter(i => {
let $container = $(bootstrapTable[i]);
return ($container && $container.html().indexOf('"' +$this.$el[0].id + '"') != -1);
});
if (tables.length > 1) {
this.$container = $(tables[0]);
this.options.toolbar = $('div.fixed-table-toolbar > div.bars.pull-left').html();
}
}
this.$el.insertBefore(this.$container);
$(this.options.toolbar).insertBefore(this.$el);
this.$container.next().remove();
this.$container.remove();
this.$el.html(this.$el_.html())
.css('margin-top', '0')
.attr('class', this.$el_.attr('class') || ''); // reset the class
$(this.options.toolbar).insertBefore(this.$el);
this.$container.next().remove();
this.$container.remove();
this.$el.html(this.$el_.html())
.css('margin-top', '0')
.attr('class', this.$el_.attr('class') || ''); // reset the class
};
BootstrapTable.prototype.showLoading = function () {
@@ -2776,12 +2790,17 @@
data = $this.data('bootstrap.table'),
options = $.extend({}, BootstrapTable.DEFAULTS, $this.data(),
typeof option === 'object' && option);
if (typeof option === 'string') {
if ($.inArray(option, allowedMethods) < 0) {
throw new Error("Unknown method: " + option);
}
if (!data && option === 'destroy') {
new BootstrapTable(this, options).destroy();
return;
}
if (!data) {
return;
}

View File

@@ -105,6 +105,7 @@
<script>
import store from '@/store';
import { getStore } from '@/utils/store';
import loading from '@/assets/images/loading.gif';
export default {
@@ -130,10 +131,17 @@ export default {
},
methods: {
getMenu() {
store.dispatch('getMenu').then(res => {
this.parentMenus = res.parents;
this.childMenus = res.childs;
});
let parentMenus = getStore({ name: 'parent_menus' });
let childMenus = getStore({ name: 'child_menus' });
if (parentMenus && childMenus && parentMenus.length > 0 && childMenus.length > 0) {
this.parentMenus = parentMenus;
this.childMenus = childMenus;
} else {
store.dispatch('getMenu').then(res => {
this.parentMenus = res.parents;
this.childMenus = res.childs;
});
}
},
getChilds(parentId) {
return this.childMenus.filter(v => v.parentid == parentId);

View File

@@ -2,39 +2,69 @@
/*鼠标点击后移开,恢复本身样式*/
.primary,
.primary:focus:not(.primary:hover) {
color: white;
background: #409eff;
}
/*鼠标悬浮,没有按下;鼠标按下后抬起,没有移开*/
/* 更改背景和字體顏色 */
.primary:focus, .primary:hover{
color: white;
background: #409eff;
}
/*鼠标悬浮,没有按下;鼠标按下后抬起,没有移开*/
/* 更改背景和字體顏色 */
.primary:focus,
.primary:hover {
color: white;
background: #409eff;
}
/*鼠标按下,没有抬起*/
/* 更改邊框顏色 */
.primary:active {
color: white;
background: #337ecc;
color: white;
background: #337ecc;
}
/*鼠标点击后移开,恢复本身样式*/
.danger,
.danger:focus:not(.danger:hover) {
color: white;
background: #f56c6c;
}
/* 危险的按钮样式 */
/*鼠标悬浮,没有按下;鼠标按下后抬起,没有移开*/
/* 更改背景和字體顏色 */
.danger:focus, .danger:hover{
color: white;
background: #f56c6c;
}
/* 危险的按钮样式 */
/*鼠标悬浮,没有按下;鼠标按下后抬起,没有移开*/
/* 更改背景和字體顏色 */
.danger:focus,
.danger:hover {
color: white;
background: #f56c6c;
}
/*鼠标按下,没有抬起*/
/* 更改邊框顏色 */
.danger:active {
color: white;
background: #c45656;
color: white;
background: #c45656;
}
/*鼠标点击后移开,恢复本身样式*/
.success,
.success:focus:not(.success:hover) {
color: white;
background: #67c23a;
}
/* 危险的按钮样式 */
/*鼠标悬浮,没有按下;鼠标按下后抬起,没有移开*/
/* 更改背景和字體顏色 */
.success:focus,
.success:hover {
color: white;
background: #b3e19d;
}
/*鼠标按下,没有抬起*/
/* 更改邊框顏色 */
.danger:active {
color: white;
background: #529b2e;
}

View File

@@ -4,7 +4,6 @@ jQuery.extend({
if (s.error) {
s.error.call(s.context || s, xhr, status, e);
}
// Fire the global callback
if (s.global) {
(s.context ? jQuery(s.context) : jQuery.event).trigger("ajaxError", [xhr, s, e]);
@@ -13,17 +12,14 @@ jQuery.extend({
createUploadIframe: function (id, uri) {
//create frame
var frameId = 'jUploadFrame' + id;
if (window.ActiveXObject) {
var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');
if (typeof uri == 'boolean') {
io.src = 'javascript:false';
}
else if (typeof uri == 'string') {
} else if (typeof uri == 'string') {
io.src = uri;
}
}
else {
} else {
io = document.createElement('iframe');
io.id = frameId;
io.name = frameId;
@@ -31,18 +27,21 @@ jQuery.extend({
io.style.position = 'absolute';
io.style.top = '-1000px';
io.style.left = '-1000px';
document.body.appendChild(io);
return io
return io;
},
createUploadForm: function (id, fileElementId) {
//create form
var formId = 'jUploadForm' + id;
var fileId = 'jUploadFile' + id;
var form = $('<form action="" method="POST" name="' + formId + '" id="' + formId + '" enctype="multipart/form-data"></form>');
var form = $('#' + formId);
if (form && form.length > 0) {
form.remove();
}
form = $('<form action="" method="POST" name="' + formId + '" id="' + formId + '" enctype="multipart/form-data"></form>');
var oldElement = $('#' + fileElementId);
var newElement = $(oldElement).clone();
var newElement = $(oldElement).clone(true).val("");
//须要复制元素的全部事件处理。
$(oldElement).attr('id', fileId);
$(oldElement).before(newElement);
$(oldElement).appendTo(form);
@@ -53,7 +52,6 @@ jQuery.extend({
$(form).appendTo('body');
return form;
},
ajaxFileUpload: function (s) {
// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
s = jQuery.extend({}, jQuery.ajaxSettings, s);
@@ -68,7 +66,7 @@ jQuery.extend({
}
var requestDone = false;
// Create the request object
var xml = {}
var xml = {};
if (s.global)
jQuery.event.trigger("ajaxSend", [xml, s]);
// Wait for a response to come back
@@ -98,7 +96,6 @@ jQuery.extend({
// If a local callback was specified, fire it and pass it the data
if (s.success)
s.success(data, status);
// Fire the global callback
if (s.global)
jQuery.event.trigger("ajaxSuccess", [xml, s]);
@@ -112,30 +109,22 @@ jQuery.extend({
// The request was completed
if (s.global)
jQuery.event.trigger("ajaxComplete", [xml, s]);
// Handle the global AJAX counter
if (s.global && ! --jQuery.active)
jQuery.event.trigger("ajaxStop");
// Process result
if (s.complete)
s.complete(xml, status);
jQuery(io).unbind()
jQuery(io).unbind();
setTimeout(function () {
try {
$(io).remove();
$(form).remove();
} catch (e) {
jQuery.handleError(s, xml, null, e);
}
}, 100)
xml = null
}, 100);
xml = null;
}
}
// Timeout checker
@@ -153,12 +142,23 @@ jQuery.extend({
$(form).attr('target', frameId);
if (form.encoding) {
form.encoding = 'multipart/form-data';
}
else {
} else {
form.enctype = 'multipart/form-data';
}
$(form).submit();
let submitType = s.submitType;
let $form = $(form);
if (!submitType || submitType == 'form') {
$form.submit();
} else if (submitType == 'ajax') {
$form.ajaxSubmit({
success: function (data, status) {
s.success(data, status);
},
error: function (err) {
jQuery.handleError(s, xml, null, err);
}
});
}
} catch (e) {
jQuery.handleError(s, xml, null, e);
}
@@ -169,9 +169,7 @@ jQuery.extend({
document.getElementById(frameId).addEventListener('load', uploadCallback, false);
}
return { abort: function () { } };
},
uploadHttpData: function (r, type) {
var data = !type;
data = type == "xml" || data ? r.responseXML : r.responseText;

26
src/utils/excelUtils.js Normal file
View File

@@ -0,0 +1,26 @@
import * as XLSX from 'xlsx';
const exportToExcel = (row, fileName, list, sheetNames) => {//调用方式 exportToExcel(接口返回的表格列表, "文件名", 定义的表头和字段[{ piko号: "erbanNo" }{ piko号: "erbanNo" }],, ["Sheet1"]);
var data = [];
var headerTitle = [];
row.forEach((res, i) => {
var arr = [];
for (let index = 0; index < list.length; index++) {
for (let key in list[index]) {
headerTitle[index] = key;
arr[index] = res[list[index][key]];
}
}
data[i] = arr;
});
let smallArr = Array.from(data);
let bigArr = [];
smallArr = smallArr.map((item) => {
bigArr.push(Object.values(item));
});
const ws = XLSX.utils.aoa_to_sheet([...[headerTitle], ...bigArr]); // tableName为表头tableData为数据
const wb = XLSX.utils.book_new();
// 将工作表放入工作簿中
XLSX.utils.book_append_sheet(wb, ws, sheetNames);
XLSX.writeFile(wb, fileName + ".xlsx");
}
export default exportToExcel

View File

@@ -3,8 +3,9 @@ import store from "@/store";
import global from "@/constants/global";
const service = axios.create();
import { ElMessage } from 'element-plus'
service.interceptors.request.use(config => {
console.log('config', config);
return config;
}, error => {
Promise.reject(error);
@@ -12,6 +13,18 @@ service.interceptors.request.use(config => {
service.interceptors.response.use(res => {
userLogout(res.headers[global.NEED_LOGOUT.toLowerCase()]);
console.log('res.data', res);
// if (res.data.code == 200) {
// ElMessage({
// message: "成功",
// type: 'success'
// });
// } else {
// ElMessage({
// message: res.data.message,
// type: 'error'
// });
// }
return res.data;
}, error => {
return Promise.reject(error);
@@ -21,11 +34,11 @@ $.ajaxSetup({
headers: {
'Access-Control-Allow-Origin': '*',
},
beforeSend: function(xhr) {
beforeSend: function (xhr) {
console.log(xhr);
},
complete: function(xhr) {
if (xhr && typeof(xhr.getResponseHeader) == 'function') {
complete: function (xhr) {
if (xhr && typeof (xhr.getResponseHeader) == 'function') {
userLogout(xhr.getResponseHeader(global.NEED_LOGOUT));
}
}
@@ -34,7 +47,7 @@ $.ajaxSetup({
/**
* 强制退出
*/
function userLogout(needLogout) {
function userLogout (needLogout) {
try {
if (global.NEED_LOGOUT == needLogout) {
var win = window;

View File

@@ -389,9 +389,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -590,9 +590,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -757,9 +757,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -1147,9 +1147,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -617,9 +617,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -654,9 +654,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -166,9 +166,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -289,9 +289,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -133,9 +133,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -256,9 +256,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -249,9 +249,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -138,9 +138,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -409,9 +409,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -184,9 +184,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -136,9 +136,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};

View File

@@ -221,9 +221,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -242,9 +242,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -261,9 +261,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -279,9 +279,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -502,9 +502,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -212,9 +212,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -254,9 +254,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -1061,9 +1061,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -434,9 +434,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -264,9 +264,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -551,9 +551,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -151,9 +151,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -438,6 +438,11 @@ export default {
let id = $('#id').val();
let startTime = $('#startTime').val();
let endTime = $('#endTime').val();
if (getDate(endTime).getMonth() != getDate(startTime).getMonth()) {
$("#tipMsg").text("归因场次不允许跨月.");
$("#tipModal").modal('show');
return;
}
if ((getDate(endTime).getTime() - getDate(startTime).getTime()) > (36 * 60 * 60 * 1000)) {
$("#tipMsg").text("时间间隔不能超过36h.");
$("#tipModal").modal('show');
@@ -536,9 +541,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -405,9 +405,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -517,9 +517,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -570,9 +570,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -156,9 +156,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -290,9 +290,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -133,9 +133,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -267,9 +267,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -1035,9 +1035,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -114,9 +114,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -125,9 +125,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -489,9 +489,7 @@ export default {
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -272,9 +272,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -482,9 +482,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -257,9 +257,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -197,9 +197,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -471,9 +471,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -200,9 +200,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -548,9 +548,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
function clearForm(formId) {

View File

@@ -407,9 +407,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -815,9 +815,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -773,9 +773,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -201,9 +201,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -472,9 +472,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -143,9 +143,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -185,9 +185,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -228,9 +228,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -823,9 +823,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -147,9 +147,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -959,9 +959,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -977,9 +977,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -342,9 +342,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -571,9 +571,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -476,9 +476,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -575,9 +575,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -329,9 +329,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -186,9 +186,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -477,9 +477,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -382,9 +382,7 @@ export default {
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
// 初始化团队选择器

View File

@@ -454,9 +454,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};

View File

@@ -206,8 +206,11 @@ export default {
{ field: 'totalChargeAmount', title: '累计充值(美元)', align: 'center', width: '5%', },
{ field: 'totalChargeUserNum', title: '累计充值人数', align: 'center', width: '5%', },
{ field: 'totalChargeNum', title: '累计充值次数', align: 'center', width: '5%', },
{ field: 'totalGiveNum', title: '累计收到转赠次数', align: 'center', width: '5%', },
{ field: 'totalGiveAmount', title: '累计收到转赠金额', align: 'center', width: '5%', },
{ field: 'newUserGiveAmount', title: '当月新增转赠', align: 'center', width: '10%', valign: 'center' },
{ field: 'totalGiveAmount', title: '累计转赠(美元)', align: 'center', width: '5%', },
{ field: 'totalGiveUserNum', title: '累计转赠人数', align: 'center', width: '5%', },
{ field: 'totalGiveNum', title: '累计转赠次数', align: 'center', width: '5%', },
{
field: 'month',
title: '操作',
@@ -352,9 +355,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -477,7 +477,7 @@ export default {
groupData.tchargeMoney = tchargeMoney;
groupData.tsendGiftMony = tsendGiftMony;
groupData.tgiveCount = tgiveCount;
groupData.tgiveMoney = tgiveMoney;
groupData.tgiveMoney = tgiveMoney.toFixed(0);
groupData.tarpu = (tchargeMoney / tnewUserCount).toFixed(2);
groupDataList.push(groupData);
}
@@ -793,9 +793,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -254,9 +254,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -306,9 +306,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -770,9 +770,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -333,9 +333,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -364,9 +364,7 @@ export default {
})
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -785,9 +785,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
function cleanModal(obj) {

View File

@@ -193,9 +193,7 @@ export default {
}
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -970,9 +970,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -535,9 +535,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -100,9 +100,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -390,9 +390,7 @@ export default {
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -1207,9 +1207,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
function clearModal() {

View File

@@ -1304,9 +1304,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
function clearModal() {

View File

@@ -297,9 +297,7 @@ export default {
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
// 根据type获取路径名称

View File

@@ -218,9 +218,7 @@ export default {
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -579,9 +579,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

View File

@@ -378,9 +378,7 @@ export default {
});
}
},
unmounted() {
$('#table').bootstrapTable('destroy');
}
};
</script>

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