Compare commits
22 Commits
officialWi
...
roomBackgr
Author | SHA1 | Date | |
---|---|---|---|
![]() |
836fb732c8 | ||
![]() |
9a151fbe05 | ||
![]() |
07e9a1e8b2 | ||
![]() |
d3c14383f8 | ||
![]() |
5bba43c189 | ||
![]() |
74939056ce | ||
![]() |
004bf0e03a | ||
![]() |
b467577792 | ||
![]() |
99a1c89643 | ||
![]() |
b043d8c06e | ||
![]() |
fb007e763c | ||
![]() |
2fddf66a5d | ||
![]() |
75bcd232a4 | ||
![]() |
ae0a3507a6 | ||
![]() |
31d6efd60e | ||
![]() |
70993f1b4d | ||
![]() |
e4fb991a98 | ||
![]() |
b84438c19d | ||
![]() |
ed9178a1d0 | ||
![]() |
78b3a70d5f | ||
![]() |
baad132403 | ||
![]() |
c865eae77b |
6
package-lock.json
generated
6
package-lock.json
generated
@@ -27,6 +27,7 @@
|
|||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
"sass": "^1.67.0",
|
"sass": "^1.67.0",
|
||||||
"sass-loader": "^13.3.2",
|
"sass-loader": "^13.3.2",
|
||||||
|
"svgaplayerweb": "^2.3.2",
|
||||||
"unplugin-element-plus": "^0.8.0",
|
"unplugin-element-plus": "^0.8.0",
|
||||||
"vue-clipboard2": "^0.3.3",
|
"vue-clipboard2": "^0.3.3",
|
||||||
"vue-router": "^4.0.3",
|
"vue-router": "^4.0.3",
|
||||||
@@ -11990,6 +11991,11 @@
|
|||||||
"integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==",
|
"integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/svgaplayerweb": {
|
||||||
|
"version": "2.3.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/svgaplayerweb/-/svgaplayerweb-2.3.2.tgz",
|
||||||
|
"integrity": "sha512-QuTvNIgy3W6Mi4h74SczEHUtAwb8m3ax7Ai7xRLUuN6hjJh49RGtWOWq1IuF2I7ECcl0HAYn8FcTn99UDz9UiQ=="
|
||||||
|
},
|
||||||
"node_modules/svgo": {
|
"node_modules/svgo": {
|
||||||
"version": "2.8.0",
|
"version": "2.8.0",
|
||||||
"resolved": "https://registry.npmmirror.com/svgo/-/svgo-2.8.0.tgz",
|
"resolved": "https://registry.npmmirror.com/svgo/-/svgo-2.8.0.tgz",
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
"sass": "^1.67.0",
|
"sass": "^1.67.0",
|
||||||
"sass-loader": "^13.3.2",
|
"sass-loader": "^13.3.2",
|
||||||
|
"svgaplayerweb": "^2.3.2",
|
||||||
"unplugin-element-plus": "^0.8.0",
|
"unplugin-element-plus": "^0.8.0",
|
||||||
"vue-clipboard2": "^0.3.3",
|
"vue-clipboard2": "^0.3.3",
|
||||||
"vue-router": "^4.0.3",
|
"vue-router": "^4.0.3",
|
||||||
|
38
src/api/lingSmallGames/lingSmallGames.js
Normal file
38
src/api/lingSmallGames/lingSmallGames.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 获取游戏列表
|
||||||
|
export const sysConfKey = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/sysConf/key',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取列表
|
||||||
|
export const statisPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/miniGame/leadercc/statis/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取详情列表
|
||||||
|
export const detailPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/miniGame/leadercc/statis/detailPage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 导出
|
||||||
|
export const exportForMiniGame = query => {
|
||||||
|
window.location.href = `/admin/miniGame/leadercc/statis/exportForMiniGame?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
// 导出弹窗
|
||||||
|
export const statisExport = query => {
|
||||||
|
window.location.href = `/admin/miniGame/leadercc/statis/export?${genQueryParam(query)}`;
|
||||||
|
return;
|
||||||
|
};
|
87
src/api/roomBackground/roomBackground.js
Normal file
87
src/api/roomBackground/roomBackground.js
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { genQueryParam } from '@/utils/maintainer';
|
||||||
|
import qs from 'qs';
|
||||||
|
|
||||||
|
// 地区接口
|
||||||
|
export const listPartitionInfo = query => {
|
||||||
|
return request({
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ==============================================首页ui配置==============================================
|
||||||
|
// 配置
|
||||||
|
export const appUiSetting = query => {
|
||||||
|
return request({
|
||||||
|
url: '/appUiSetting',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 保存
|
||||||
|
export const appUiSettingSave = query => {
|
||||||
|
return request({
|
||||||
|
url: '/appUiSetting/save',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ==============================================自定义背景==============================================
|
||||||
|
// 列表
|
||||||
|
export const page = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 新增
|
||||||
|
export const roomBackgroundAdd = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/add',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 编辑
|
||||||
|
export const roomBackgroundUpdate = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/update',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ==============================================自定义背景==============================================
|
||||||
|
// 列表
|
||||||
|
export const customPage = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 通过
|
||||||
|
export const customPass = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/pass',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 拒绝
|
||||||
|
export const customReject = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/reject',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 删除
|
||||||
|
export const customDel = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomBackground/custom/del',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
1528
src/views/firstpage/towPageBannerView.vue
Normal file
1528
src/views/firstpage/towPageBannerView.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,7 @@
|
|||||||
:src="scope.row.logo"
|
:src="scope.row.logo"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.logo"
|
:preview-src-list="scope.row.logo"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
:src="scope.row.background"
|
:src="scope.row.background"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.background"
|
:preview-src-list="scope.row.background"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
:src="scope.row.pic"
|
:src="scope.row.pic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.pic"
|
:preview-src-list="scope.row.pic"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
376
src/views/games/lingSmallGames.vue
Normal file
376
src/views/games/lingSmallGames.vue
Normal file
@@ -0,0 +1,376 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>游戏</span>
|
||||||
|
<el-select v-model="inquire.gameArrVal" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.gamesArr"
|
||||||
|
:key="item.gameId"
|
||||||
|
:label="item.gameName"
|
||||||
|
:value="item.gameId"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 时间选择器 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span class="demonstration">日期</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="inquire.time"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
tableData = [];
|
||||||
|
currentPage = 1;
|
||||||
|
isFinished = false;
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="dateTime" align="center" label="日期" />
|
||||||
|
<el-table-column prop="userCount" align="center" label="人数" />
|
||||||
|
<el-table-column prop="consumeNum" align="center" label="货币消耗" />
|
||||||
|
<el-table-column prop="settleNum" align="center" label="结算总量" />
|
||||||
|
<el-table-column prop="platformNum" align="center" label="平台收入" />
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
detailPageFunArr = scope.row;
|
||||||
|
tableDataDetails = [];
|
||||||
|
currentPage2 = 1;
|
||||||
|
isFinished2 = false;
|
||||||
|
detailPageFun();
|
||||||
|
"
|
||||||
|
size="default"
|
||||||
|
>查看详情</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页 -->
|
||||||
|
<!-- <el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
v-model:current-page="currentPage"
|
||||||
|
v-model:page-size="pageSize"
|
||||||
|
:page-sizes="[1, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/> -->
|
||||||
|
<!-- 加载更多按钮 -->
|
||||||
|
<div v-if="!isFinished" class="pagination">
|
||||||
|
<el-button
|
||||||
|
class="pagination_in"
|
||||||
|
@click="loadMore"
|
||||||
|
type="primary"
|
||||||
|
:loading="isLoading"
|
||||||
|
>加载更多</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div v-else class="pagination">
|
||||||
|
<span class="pagination_in">没有更多数据了</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 内嵌单个工会详情 -->
|
||||||
|
<el-dialog :title="detailsTitle" v-model="detailsDialog">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading2"
|
||||||
|
:data="tableDataDetails"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="用户平台ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="昵称" />
|
||||||
|
<el-table-column prop="consumeNum" align="center" label="货币消耗" />
|
||||||
|
<el-table-column prop="settleNum" align="center" label="结算总量" />
|
||||||
|
<el-table-column prop="platformNum" align="center" label="平台收入" />
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<!-- <el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
v-model:current-page="currentPage2"
|
||||||
|
v-model:page-size="pageSize2"
|
||||||
|
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total2"
|
||||||
|
@size-change="handleSizeChange2"
|
||||||
|
@current-change="handleCurrentChange2"
|
||||||
|
/> -->
|
||||||
|
<!-- 加载更多按钮 -->
|
||||||
|
<div v-if="!isFinished2" class="pagination">
|
||||||
|
<el-button
|
||||||
|
class="pagination_in"
|
||||||
|
@click="loadMore2"
|
||||||
|
type="primary"
|
||||||
|
:loading="isLoading2"
|
||||||
|
>加载更多</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div v-else class="pagination">
|
||||||
|
<span class="pagination_in">没有更多数据了</span>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="detailsDialog = false">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="confirmExport2Excel2()"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div></template
|
||||||
|
>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
statisPage,
|
||||||
|
sysConfKey,
|
||||||
|
detailPage,
|
||||||
|
exportForMiniGame,
|
||||||
|
statisExport,
|
||||||
|
} from "@/api/lingSmallGames/lingSmallGames";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
|
||||||
|
export default {
|
||||||
|
name: "lingSmallGames",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
loading2: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
time: "",
|
||||||
|
gameArrVal: "",
|
||||||
|
gamesArr: [],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
isLoading: false, // 加载状态
|
||||||
|
isFinished: false, // 是否加载完成
|
||||||
|
// 弹窗
|
||||||
|
detailsDialog: false,
|
||||||
|
detailsTitle: "",
|
||||||
|
tableDataDetails: [],
|
||||||
|
dateTimePub: null,
|
||||||
|
detailPageFunArr: {},
|
||||||
|
// 分页
|
||||||
|
total2: 0, //总页数
|
||||||
|
currentPage2: 1, //页码
|
||||||
|
pageSize2: 10, //条数
|
||||||
|
isLoading2: false, // 加载状态
|
||||||
|
isFinished2: false, // 是否加载完成
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
sysConfKey({ configId: "leadercc_game" }).then((res) => {
|
||||||
|
this.inquire.gamesArr = JSON.parse(res.data.configValue);
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.isLoading = true;
|
||||||
|
this.loading = true;
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
}
|
||||||
|
statisPage({
|
||||||
|
gameId: this.inquire.gameArrVal,
|
||||||
|
startTime: startTime,
|
||||||
|
endTime: endTime,
|
||||||
|
pageNum: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 判断返回的记录是否为空数组
|
||||||
|
const records = res.data.records;
|
||||||
|
if (records.length > 0) {
|
||||||
|
// 如果有数据,追加到表格数据中
|
||||||
|
this.tableData = [...this.tableData, ...records];
|
||||||
|
this.currentPage++; // 更新当前页码
|
||||||
|
} else {
|
||||||
|
// 如果数据长度为 0,停止加载
|
||||||
|
this.isFinished = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
this.isLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 加载下一页数据
|
||||||
|
loadMore() {
|
||||||
|
if (!this.isFinished) {
|
||||||
|
this.currentPage = this.currentPage++;
|
||||||
|
this.getData(this.currentPage);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 加载下一页数据
|
||||||
|
loadMore2() {
|
||||||
|
if (!this.isFinished2) {
|
||||||
|
this.currentPage2 = this.currentPage2++;
|
||||||
|
this.detailPageFun(this.currentPage2);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
confirmExport2Excel() {
|
||||||
|
this.loading = true;
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
}
|
||||||
|
exportForMiniGame({
|
||||||
|
gameId: this.inquire.gameArrVal,
|
||||||
|
startTime: startTime,
|
||||||
|
endTime: endTime,
|
||||||
|
}).then();
|
||||||
|
},
|
||||||
|
// 导出弹窗
|
||||||
|
confirmExport2Excel2() {
|
||||||
|
statisExport({
|
||||||
|
dateTime: this.dateTimePub,
|
||||||
|
gameId: this.inquire.gameArrVal,
|
||||||
|
}).then();
|
||||||
|
},
|
||||||
|
// 详情接口
|
||||||
|
detailPageFun() {
|
||||||
|
this.isLoading2 = true;
|
||||||
|
this.detailsDialog = true;
|
||||||
|
this.loading2 = true;
|
||||||
|
this.detailsTitle = this.dateTimePub = this.detailPageFunArr.dateTime;
|
||||||
|
detailPage({
|
||||||
|
gameId: this.detailPageFunArr.gameId,
|
||||||
|
dateTime: this.detailPageFunArr.dateTime,
|
||||||
|
pageNum: this.currentPage2,
|
||||||
|
pageSize: this.pageSize2,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 判断返回的记录是否为空数组
|
||||||
|
const records2 = res.data.records;
|
||||||
|
if (records2.length > 0) {
|
||||||
|
// 如果有数据,追加到表格数据中
|
||||||
|
this.tableDataDetails = [...this.tableDataDetails, ...records2];
|
||||||
|
this.currentPage2++; // 更新当前页码
|
||||||
|
} else {
|
||||||
|
// 如果数据长度为 0,停止加载
|
||||||
|
this.isFinished2 = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading2 = false;
|
||||||
|
this.isLoading2 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleSizeChange2() {
|
||||||
|
this.detailPageFun();
|
||||||
|
},
|
||||||
|
handleCurrentChange2() {
|
||||||
|
this.detailPageFun();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialogTableVisibleBut {
|
||||||
|
display: block;
|
||||||
|
margin: 30px 0 0 830px;
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
@@ -177,8 +177,13 @@ export default {
|
|||||||
this.tableLoading = true;
|
this.tableLoading = true;
|
||||||
|
|
||||||
let { pageParams, searchForm } = this;
|
let { pageParams, searchForm } = this;
|
||||||
searchForm.startTime = dateFormat(searchForm.startTime,'yyyy-MM-dd hh:mm:ss');
|
console.log(searchForm);
|
||||||
searchForm.endTime = dateFormat(searchForm.endTime,'yyyy-MM-dd hh:mm:ss');
|
searchForm.startTime = searchForm.startTime
|
||||||
|
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: null;
|
||||||
|
searchForm.endTime = searchForm.endTime
|
||||||
|
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
|
||||||
|
: null;
|
||||||
searchForm = JSON.parse(JSON.stringify(searchForm));
|
searchForm = JSON.parse(JSON.stringify(searchForm));
|
||||||
pageParams = JSON.parse(JSON.stringify(pageParams));
|
pageParams = JSON.parse(JSON.stringify(pageParams));
|
||||||
Object.keys(searchForm).forEach((item) => {
|
Object.keys(searchForm).forEach((item) => {
|
||||||
@@ -198,7 +203,7 @@ export default {
|
|||||||
let data = res.data;
|
let data = res.data;
|
||||||
this.tableData = data.records;
|
this.tableData = data.records;
|
||||||
this.pageTotal = data.total;
|
this.pageTotal = data.total;
|
||||||
}else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
message: res.message,
|
message: res.message,
|
||||||
@@ -209,7 +214,7 @@ export default {
|
|||||||
chargeAgentSum(pageParams).then((res) => {
|
chargeAgentSum(pageParams).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.total = res.data;
|
this.total = res.data;
|
||||||
}else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
message: res.message,
|
message: res.message,
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
v-model="inquire.time[0]"
|
v-model="inquire.time[0]"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="开始时间"
|
placeholder="开始时间"
|
||||||
|
format="YYYY-MM-DD 00:00:00"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
v-model="inquire.time[1]"
|
v-model="inquire.time[1]"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="结束时间"
|
placeholder="结束时间"
|
||||||
|
format="YYYY-MM-DD 23:59:59"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
@@ -144,7 +146,6 @@ export default {
|
|||||||
let time = this.inquire.time;
|
let time = this.inquire.time;
|
||||||
let startTime = null;
|
let startTime = null;
|
||||||
let endTime = null;
|
let endTime = null;
|
||||||
console.log(this.inquire.time, 111111);
|
|
||||||
if (time.length > 0) {
|
if (time.length > 0) {
|
||||||
startTime = this.inquire.time[0]
|
startTime = this.inquire.time[0]
|
||||||
? dateFormat(this.inquire.time[0], "yyyy-MM-dd")
|
? dateFormat(this.inquire.time[0], "yyyy-MM-dd")
|
||||||
@@ -180,8 +181,8 @@ export default {
|
|||||||
let startTime = "";
|
let startTime = "";
|
||||||
let endTime = "";
|
let endTime = "";
|
||||||
if (time && time.length > 0) {
|
if (time && time.length > 0) {
|
||||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd");
|
||||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
diamondStatisticsExport({
|
diamondStatisticsExport({
|
||||||
guildId: this.inquire.guildId,
|
guildId: this.inquire.guildId,
|
||||||
|
@@ -61,6 +61,19 @@
|
|||||||
<el-table-column prop="name"
|
<el-table-column prop="name"
|
||||||
align="center"
|
align="center"
|
||||||
label="公会昵称" />
|
label="公会昵称" />
|
||||||
|
<el-table-column align="center"
|
||||||
|
prop="giftInfo"
|
||||||
|
label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center"
|
||||||
prop="giftInfo"
|
prop="giftInfo"
|
||||||
label="公会背景图">
|
label="公会背景图">
|
||||||
@@ -69,7 +82,7 @@
|
|||||||
:src="scope.row.backgroundUrl"
|
:src="scope.row.backgroundUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.backgroundUrl]"
|
:preview-src-list="[scope.row.backgroundUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
@@ -241,6 +254,22 @@
|
|||||||
style="width: 75%"
|
style="width: 75%"
|
||||||
class="input"></el-input>
|
class="input"></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 公会头像 -->
|
||||||
|
<div class="selectBox selectBoxImg">
|
||||||
|
<span class="left" style="margin-right: 20px">公会头像</span>
|
||||||
|
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="ediObj.imageUrl2" :src="ediObj.imageUrl2" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
<!-- 公会背景图 -->
|
<!-- 公会背景图 -->
|
||||||
<div class="selectBox selectBoxImg">
|
<div class="selectBox selectBoxImg">
|
||||||
<span class="left"
|
<span class="left"
|
||||||
@@ -480,6 +509,7 @@ export default {
|
|||||||
guildNumber: "",
|
guildNumber: "",
|
||||||
id: "",
|
id: "",
|
||||||
imageUrl1: "",
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
},
|
},
|
||||||
// 收款账户弹窗
|
// 收款账户弹窗
|
||||||
payAccountDialog: false,
|
payAccountDialog: false,
|
||||||
@@ -706,6 +736,7 @@ export default {
|
|||||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||||
this.ediObj.id = obj.id;
|
this.ediObj.id = obj.id;
|
||||||
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
||||||
|
this.ediObj.imageUrl2 = obj.avatar;
|
||||||
this.editDialog = true;
|
this.editDialog = true;
|
||||||
},
|
},
|
||||||
// 二次确认弹窗
|
// 二次确认弹窗
|
||||||
@@ -715,6 +746,7 @@ export default {
|
|||||||
id: this.ediObj.id,
|
id: this.ediObj.id,
|
||||||
memberNumLimit: this.ediObj.guildNumber,
|
memberNumLimit: this.ediObj.guildNumber,
|
||||||
backgroundUrl: this.ediObj.imageUrl1,
|
backgroundUrl: this.ediObj.imageUrl1,
|
||||||
|
avatar: this.ediObj.imageUrl2,
|
||||||
name: this.ediObj.guildNick,
|
name: this.ediObj.guildNick,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@@ -774,7 +806,6 @@ export default {
|
|||||||
},
|
},
|
||||||
handleAvatarSuccess (res, file) {
|
handleAvatarSuccess (res, file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
|
||||||
this.ediObj.imageUrl1 = file.response.data;
|
this.ediObj.imageUrl1 = file.response.data;
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
@@ -782,6 +813,15 @@ export default {
|
|||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
this.ediObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
// 分页导航
|
// 分页导航
|
||||||
handleSizeChange () {
|
handleSizeChange () {
|
||||||
this.getData();
|
this.getData();
|
||||||
|
@@ -72,7 +72,7 @@
|
|||||||
:src="imgFun(JsonFunc(scope.row.rewardJson))[0]"
|
:src="imgFun(JsonFunc(scope.row.rewardJson))[0]"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="imgFun(JsonFunc(scope.row.rewardJson))"
|
:preview-src-list="imgFun(JsonFunc(scope.row.rewardJson))"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
:src="scope.row.luckyBagPic"
|
:src="scope.row.luckyBagPic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.luckyBagPic]"
|
:preview-src-list="[scope.row.luckyBagPic]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
:src="scope.row.destGiftPic"
|
:src="scope.row.destGiftPic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.destGiftPic]"
|
:preview-src-list="[scope.row.destGiftPic]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
:src="scope.row.rewardGiftPic"
|
:src="scope.row.rewardGiftPic"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.rewardGiftPic]"
|
:preview-src-list="[scope.row.rewardGiftPic]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -60,7 +60,7 @@
|
|||||||
:src="scope.row.picUrl"
|
:src="scope.row.picUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.picUrl"
|
:preview-src-list="scope.row.picUrl"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
:src="scope.row.picUrl"
|
:src="scope.row.picUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.picUrl"
|
:preview-src-list="scope.row.picUrl"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -58,6 +58,19 @@
|
|||||||
label="会长分区"
|
label="会长分区"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image
|
<el-image
|
||||||
@@ -65,7 +78,7 @@
|
|||||||
:src="scope.row.backgroundUrl"
|
:src="scope.row.backgroundUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.backgroundUrl]"
|
:preview-src-list="[scope.row.backgroundUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
@@ -245,6 +258,22 @@
|
|||||||
class="input"
|
class="input"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 公会头像 -->
|
||||||
|
<div class="selectBox selectBoxImg">
|
||||||
|
<span class="left" style="margin-right: 20px">公会头像</span>
|
||||||
|
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="ediObj.imageUrl2" :src="ediObj.imageUrl2" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
<!-- 公会背景图 -->
|
<!-- 公会背景图 -->
|
||||||
<div class="selectBox selectBoxImg">
|
<div class="selectBox selectBoxImg">
|
||||||
<span class="left" style="margin-right: 20px">公会背景图</span>
|
<span class="left" style="margin-right: 20px">公会背景图</span>
|
||||||
@@ -487,6 +516,7 @@ export default {
|
|||||||
guildNumber: "",
|
guildNumber: "",
|
||||||
id: "",
|
id: "",
|
||||||
imageUrl1: "",
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
},
|
},
|
||||||
// 收款账户弹窗
|
// 收款账户弹窗
|
||||||
payAccountDialog: false,
|
payAccountDialog: false,
|
||||||
@@ -700,6 +730,7 @@ export default {
|
|||||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||||
this.ediObj.id = obj.id;
|
this.ediObj.id = obj.id;
|
||||||
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
||||||
|
this.ediObj.imageUrl2 = obj.avatar;
|
||||||
this.editDialog = true;
|
this.editDialog = true;
|
||||||
},
|
},
|
||||||
// 二次确认弹窗
|
// 二次确认弹窗
|
||||||
@@ -709,6 +740,7 @@ export default {
|
|||||||
id: this.ediObj.id,
|
id: this.ediObj.id,
|
||||||
memberNumLimit: this.ediObj.guildNumber,
|
memberNumLimit: this.ediObj.guildNumber,
|
||||||
backgroundUrl: this.ediObj.imageUrl1,
|
backgroundUrl: this.ediObj.imageUrl1,
|
||||||
|
avatar: this.ediObj.imageUrl2,
|
||||||
name: this.ediObj.guildNick,
|
name: this.ediObj.guildNick,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@@ -766,6 +798,16 @@ export default {
|
|||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.ediObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
handleAvatarSuccess(res, file) {
|
handleAvatarSuccess(res, file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
||||||
|
@@ -50,6 +50,19 @@
|
|||||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||||
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
||||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||||
|
<el-table-column align="center" prop="giftInfo" label="公会头像">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.avatar"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.avatar]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image
|
<el-image
|
||||||
@@ -57,7 +70,7 @@
|
|||||||
:src="scope.row.backgroundUrl"
|
:src="scope.row.backgroundUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.backgroundUrl]"
|
:preview-src-list="[scope.row.backgroundUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -1,84 +1,128 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form action="" id="searchForm" method="POST">
|
<form action=""
|
||||||
<select name="search-type" id="search-type">
|
id="searchForm"
|
||||||
<option value="0">请选择</option>
|
method="POST">
|
||||||
<option value="1">幸运许愿池偏差类型</option>
|
<select name="search-type"
|
||||||
<option value="4">梦幻许愿池池偏差类型</option>
|
id="search-type">
|
||||||
</select>
|
<option value="1">幸运许愿池偏差类型</option>
|
||||||
</form>
|
<option value="4">梦幻许愿池池偏差类型</option>
|
||||||
<button class="btn btn-primary" id="searchBtn">搜索</button>
|
</select>
|
||||||
<button id="add" class="btn btn-default">
|
<select id="partitionId"></select>
|
||||||
<i class="glyphicon glyphicon-plus"></i>新增
|
</form>
|
||||||
</button>
|
<button class="btn btn-primary"
|
||||||
</div>
|
id="searchBtn">搜索</button>
|
||||||
</section>
|
<button id="add"
|
||||||
</div>
|
class="btn btn-default">
|
||||||
</div>
|
<i class="glyphicon glyphicon-plus"></i>新增
|
||||||
</section>
|
</button>
|
||||||
<div class="modal fade" id="deviateRangeModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
</div>
|
||||||
<div class="modal-dialog" role="document">
|
</section>
|
||||||
<div class="modal-content">
|
</div>
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
||||||
aria-hidden="true">×</span></button>
|
|
||||||
<h4 class="modal-title" id="modalLabel">偏差范围</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form class="form-horizontal" id="deviateRangeForm">
|
|
||||||
<input id="deviateRangeId" type="hidden" name="id" />
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">下限:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="number" id="deviateLowerLimit" name="lowerLimit" class=" validate[required]"
|
|
||||||
placeholder="单行输入">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">上限:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="number" id="deviateUpperLimit" name="upperLimit" class=" validate[required]"
|
|
||||||
placeholder="单行输入">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group type">
|
|
||||||
<label for="type" class="col-sm-3 control-label">选择类型:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<select name="type" id="type" data-btn-class="btn btn-warning">
|
|
||||||
<option value="1">幸运许愿池偏差类型</option>
|
|
||||||
<option value="4">梦幻许愿池池偏差类型</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">创建者:</label>
|
|
||||||
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="text" id="creator" name="creator" class="validate[required]" placeholder="必填项">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
|
||||||
<button type="button" class="btn btn-primary" id="save">保存</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
<div class="modal fade"
|
||||||
|
id="deviateRangeModal"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="modalLabel">
|
||||||
|
<div class="modal-dialog"
|
||||||
|
role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="modalLabel">偏差范围</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal"
|
||||||
|
id="deviateRangeForm">
|
||||||
|
<input id="deviateRangeId"
|
||||||
|
type="hidden"
|
||||||
|
name="id" />
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">下限:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="number"
|
||||||
|
id="deviateLowerLimit"
|
||||||
|
name="lowerLimit"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">上限:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="number"
|
||||||
|
id="deviateUpperLimit"
|
||||||
|
name="upperLimit"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group type">
|
||||||
|
<label for="type"
|
||||||
|
class="col-sm-3 control-label">选择类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="type"
|
||||||
|
id="type"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
|
<option value="1">幸运许愿池偏差类型</option>
|
||||||
|
<option value="4">梦幻许愿池池偏差类型</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group deviatePartitionId">
|
||||||
|
<label for="type"
|
||||||
|
class="col-sm-3 control-label">选择分区:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="partitionId"
|
||||||
|
id="deviatePartitionId"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建者:</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text"
|
||||||
|
id="creator"
|
||||||
|
name="creator"
|
||||||
|
class="validate[required]"
|
||||||
|
placeholder="必填项">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-default"
|
||||||
|
data-dismiss="modal">关闭</button>
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-primary"
|
||||||
|
id="save">保存</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -86,160 +130,190 @@ import TableHelper from '@/utils/bootstrap-table-helper';
|
|||||||
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
|
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DeviateRangeManageAdminView",
|
name: "DeviateRangeManageAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$.ajax({
|
||||||
$('#table').bootstrapTable('destroy');
|
type: 'get',
|
||||||
$('#table').bootstrapTable({
|
url: '/partition/listPartitionInfo',
|
||||||
columns: [
|
dataType: 'json',
|
||||||
{ field: 'id', title: 'id', align: 'center', width: '15%' },
|
success: function (json) {
|
||||||
{ field: 'lowerLimit', title: '下限', align: 'center', width: '15%' },
|
if (json.code == 200) {
|
||||||
{ field: 'upperLimit', title: '上限', width: '20%' },
|
var deviatePartitionId = $("#deviatePartitionId");
|
||||||
{ field: 'creator', title: '创建人', align: 'center', width: '5%' },
|
deviatePartitionId.empty();
|
||||||
{
|
|
||||||
field: 'tmp', title: '操作', align: 'center', width: '20%', formatter: function (val, row, index) {
|
|
||||||
var key = row.id;
|
|
||||||
return "<button class='btn btn-sm btn-success opt-edit' data-id=" + key + ">编辑</button> " +
|
|
||||||
"<button class='btn btn-sm btn-danger opt-del' data-id=" + key + ">删除</button>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: true,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
type: parseInt($("#search-type").val())
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/deviateRange/list',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
var partitionId = $("#partitionId");
|
||||||
|
partitionId.empty();
|
||||||
|
|
||||||
// 构建下拉组合框
|
// 遍历数据并添加 option
|
||||||
ComboboxHelper.build(null, '#status');
|
$.each(json.data, function (index, item) {
|
||||||
ComboboxHelper.build(null, '#type');
|
// 创建新的 option 元素
|
||||||
$("#deviateRangeForm").validationEngine();
|
var option = $('<option></option>')
|
||||||
|
.attr('value', item.id) // 设置 value 属性
|
||||||
|
.text(item.desc); // 设置文本内容
|
||||||
|
|
||||||
$("#add").click(function () {
|
// 追加到 select 元素
|
||||||
// 打开编辑弹窗
|
partitionId.append(option.clone());
|
||||||
$('#deviateRangeId').val('');
|
|
||||||
$("#deviateRangeModal").modal('show');
|
|
||||||
$("#deviateRangeForm")[0].reset();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#table").on("click", '.opt-del', function () {
|
|
||||||
if (confirm("你确认删除该记录吗?" +
|
|
||||||
"\r\n删除偏差范围,会一起删除偏差奖池对应的配置,请谨慎操作!")) {
|
|
||||||
var id = $(this).attr("data-id");
|
|
||||||
$.ajax({
|
|
||||||
type: 'post',
|
|
||||||
url: "/admin/deviateRange/del",
|
|
||||||
data: { 'deviateRangeId': id },
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
if (res.code == 200) {
|
|
||||||
$("#tipMsg").text("删除成功");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
TableHelper.doRefresh("#table");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("删除失败,错误信息:" + res.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#table").on("click", '.opt-edit', function () {
|
|
||||||
var id = $(this).attr("data-id");
|
|
||||||
$.ajax({
|
|
||||||
type: "post",
|
|
||||||
url: "/admin/deviateRange/one",
|
|
||||||
data: { 'deviateRangeId': id },
|
|
||||||
dataType: "json",
|
|
||||||
success: function (data) {
|
|
||||||
if (data) {
|
|
||||||
$("#deviateRangeId").val(data.id);
|
|
||||||
$("#deviateLowerLimit").val(data.lowerLimit);
|
|
||||||
$("#deviateUpperLimit").val(data.upperLimit);
|
|
||||||
$("#creator").val(data.creator);
|
|
||||||
ComboboxHelper.setDef("#type", data.type);
|
|
||||||
// 打开编辑弹窗
|
|
||||||
$("#deviateRangeModal").modal('show');
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("获取偏差范围出错");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#save").click(function () {
|
|
||||||
if ($("#deviateRangeForm").validationEngine('validate')) {
|
|
||||||
var lowerLimit = parseInt($('#deviateLowerLimit').val());
|
|
||||||
var upperLimit = parseInt($('#deviateUpperLimit').val());
|
|
||||||
if (lowerLimit > upperLimit) {
|
|
||||||
$("#tipMsg").text("偏差下限不能大于上限");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$("#save").prop('disabled', true);
|
|
||||||
$.ajax({
|
|
||||||
type: "post",
|
|
||||||
url: "/admin/deviateRange/save",
|
|
||||||
data: $('#deviateRangeForm').serialize(),
|
|
||||||
dataType: "json",
|
|
||||||
success: function (res) {
|
|
||||||
$("#save").prop('disabled', false);
|
|
||||||
if (res.code == 200) {
|
|
||||||
$("#deviateRangeModal").modal('hide');
|
|
||||||
$("#tipMsg").text("保存成功");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
TableHelper.doRefresh("#table");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("保存失败,错误信息:" + res.message);
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 筛选按钮点击事件
|
|
||||||
$('#searchBtn').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
deviatePartitionId.append(option.clone());
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{ field: 'id', title: 'id', align: 'center', width: '15%' },
|
||||||
|
{ field: 'lowerLimit', title: '下限', align: 'center', width: '15%' },
|
||||||
|
{ field: 'upperLimit', title: '上限', width: '20%' },
|
||||||
|
{ field: 'creator', title: '创建人', align: 'center', width: '5%' },
|
||||||
|
{
|
||||||
|
field: 'tmp', title: '操作', align: 'center', width: '20%', formatter: function (val, row, index) {
|
||||||
|
var key = row.id;
|
||||||
|
return "<button class='btn btn-sm btn-success opt-edit' data-id=" + key + ">编辑</button> " +
|
||||||
|
"<button class='btn btn-sm btn-danger opt-del' data-id=" + key + ">删除</button>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: true,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
type: parseInt($("#search-type").val()),
|
||||||
|
partitionId: parseInt($("#partitionId").val())
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/deviateRange/list',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 构建下拉组合框
|
||||||
|
ComboboxHelper.build(null, '#status');
|
||||||
|
ComboboxHelper.build(null, '#type');
|
||||||
|
$("#deviateRangeForm").validationEngine();
|
||||||
|
|
||||||
|
$("#add").click(function () {
|
||||||
|
// 打开编辑弹窗
|
||||||
|
$('#deviateRangeId').val('');
|
||||||
|
$("#deviateRangeModal").modal('show');
|
||||||
|
$("#deviateRangeForm")[0].reset();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#table").on("click", '.opt-del', function () {
|
||||||
|
if (confirm("你确认删除该记录吗?" +
|
||||||
|
"\r\n删除偏差范围,会一起删除偏差奖池对应的配置,请谨慎操作!")) {
|
||||||
|
var id = $(this).attr("data-id");
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: "/admin/deviateRange/del",
|
||||||
|
data: { 'deviateRangeId': id },
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
$("#tipMsg").text("删除成功");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("删除失败,错误信息:" + res.message);
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#table").on("click", '.opt-edit', function () {
|
||||||
|
var id = $(this).attr("data-id");
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/admin/deviateRange/one",
|
||||||
|
data: { 'deviateRangeId': id },
|
||||||
|
dataType: "json",
|
||||||
|
success: function (data) {
|
||||||
|
if (data) {
|
||||||
|
$("#deviateRangeId").val(data.id);
|
||||||
|
$("#deviateLowerLimit").val(data.lowerLimit);
|
||||||
|
$("#deviateUpperLimit").val(data.upperLimit);
|
||||||
|
$("#deviatePartitionId").val(data.partitionId);
|
||||||
|
$("#creator").val(data.creator);
|
||||||
|
ComboboxHelper.setDef("#type", data.type);
|
||||||
|
// 打开编辑弹窗
|
||||||
|
$("#deviateRangeModal").modal('show');
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("获取偏差范围出错");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#save").click(function () {
|
||||||
|
if ($("#deviateRangeForm").validationEngine('validate')) {
|
||||||
|
var lowerLimit = parseInt($('#deviateLowerLimit').val());
|
||||||
|
var upperLimit = parseInt($('#deviateUpperLimit').val());
|
||||||
|
if (lowerLimit > upperLimit) {
|
||||||
|
$("#tipMsg").text("偏差下限不能大于上限");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#save").prop('disabled', true);
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/admin/deviateRange/save",
|
||||||
|
data: $('#deviateRangeForm').serialize(),
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
$("#save").prop('disabled', false);
|
||||||
|
if (res.code == 200) {
|
||||||
|
$("#deviateRangeModal").modal('hide');
|
||||||
|
$("#tipMsg").text("保存成功");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
TableHelper.doRefresh("#table");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("保存失败,错误信息:" + res.message);
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 筛选按钮点击事件
|
||||||
|
$('#searchBtn').on('click', function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,332 +1,400 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<form action="" id="searchForm" method="POST">
|
<form action=""
|
||||||
<div class="col-sm-12">
|
id="searchForm"
|
||||||
<div class="col-sm-4">
|
method="POST">
|
||||||
<label for="timeBegin" class="qry_col control-label">日期:</label>
|
<div class="col-sm-12">
|
||||||
<input type="text" name="timeBegin" id="timeBegin" class="input-sm" placeholder="起始时间">
|
<label for="partitionId"
|
||||||
- <input type="text" name="timeEnd" id="timeEnd" class="input-sm" placeholder="结束时间">
|
class="qry_col control-label">分区:</label>
|
||||||
</div>
|
<div class="col-sm-2">
|
||||||
<label for="erbanNo" class="qry_col control-label">平台号:</label>
|
<select id="partitionId"
|
||||||
<div class="col-sm-2">
|
class="input-sm"></select>
|
||||||
<input type="text" name="erbanNo" id="erbanNo" class="input-sm" placeholder="">
|
</div>
|
||||||
</div>
|
<div class="col-sm-4">
|
||||||
</div>
|
<label for="timeBegin"
|
||||||
<div class="col-sm-12">
|
class="qry_col control-label">日期:</label>
|
||||||
<label for="boxType" class="qry_col control-label">许愿池类型:</label>
|
<input type="text"
|
||||||
<div class="col-sm-2">
|
name="timeBegin"
|
||||||
<select name="boxType" id="boxType" class="col-sm-2 form-control"
|
id="timeBegin"
|
||||||
data-btn-class="btn-warning">
|
class="input-sm"
|
||||||
<option value="" selected="selected">全部</option>
|
placeholder="起始时间">
|
||||||
<option value="1">幸运许愿池</option>
|
- <input type="text"
|
||||||
<option value="2">梦幻许愿池</option>
|
name="timeEnd"
|
||||||
</select>
|
id="timeEnd"
|
||||||
</div>
|
class="input-sm"
|
||||||
<label for="poolType" class="qry_col control-label">奖池类型:</label>
|
placeholder="结束时间">
|
||||||
<div class="col-sm-2">
|
</div>
|
||||||
<select name="poolType" id="poolType" class="col-sm-2 form-control"
|
<label for="erbanNo"
|
||||||
data-btn-class="btn-warning">
|
class="qry_col control-label">平台号:</label>
|
||||||
<option value="" selected="selected">全部</option>
|
<div class="col-sm-2">
|
||||||
<option value="1">幸运新人奖池</option>
|
<input type="text"
|
||||||
<option value="2">幸运普通奖池</option>
|
name="erbanNo"
|
||||||
<option value="3">幸运白名单奖池</option>
|
id="erbanNo"
|
||||||
<option value="4">幸运偏差奖池</option>
|
class="input-sm"
|
||||||
<option value="12">幸运次数奖池</option>
|
placeholder="">
|
||||||
<option value="7">梦幻普通奖池</option>
|
</div>
|
||||||
<option value="9">梦幻偏差奖池</option>
|
</div>
|
||||||
<option value="10">梦幻新人奖池</option>
|
<div class="col-sm-12">
|
||||||
<option value="11">梦幻白名单奖池</option>
|
<label for="boxType"
|
||||||
</select>
|
class="qry_col control-label">许愿池类型:</label>
|
||||||
</div>
|
<div class="col-sm-2">
|
||||||
<label for="dataType" class="qry_col control-label">数据类型:</label>
|
<select name="boxType"
|
||||||
<div class="col-sm-2">
|
id="boxType"
|
||||||
<select name="dataType" id="dataType" class="col-sm-2 form-control"
|
class="col-sm-2 form-control"
|
||||||
data-btn-class="btn-warning">
|
data-btn-class="btn-warning">
|
||||||
<option value="1" selected="selected">普通用户数据</option>
|
<option value=""
|
||||||
<option value="2">被排除用户的数据</option>
|
selected="selected">全部</option>
|
||||||
</select>
|
<option value="1">幸运许愿池</option>
|
||||||
</div>
|
<option value="2">梦幻许愿池</option>
|
||||||
</div>
|
</select>
|
||||||
</form>
|
</div>
|
||||||
<button class="btn btn-primary" id="searchBtn">筛选</button>
|
<label for="poolType"
|
||||||
<div class="tips">因数据量庞大,默认不会显示每天的结果,默认只展示平台总收益情况,请先选择时间范围再搜索</div>
|
class="qry_col control-label">奖池类型:</label>
|
||||||
<div class="dataCount">
|
<div class="col-sm-2">
|
||||||
<p>
|
<select name="poolType"
|
||||||
<span>抽奖记录总数:</span>
|
id="poolType"
|
||||||
<span id="countNum"></span>
|
class="col-sm-2 form-control"
|
||||||
</p>
|
data-btn-class="btn-warning">
|
||||||
<p>
|
<option value=""
|
||||||
<span>用户投入钻石总数:</span>
|
selected="selected">全部</option>
|
||||||
<span id="userPay"></span>
|
<option value="1">幸运新人奖池</option>
|
||||||
</p>
|
<option value="2">幸运普通奖池</option>
|
||||||
<p>
|
<option value="3">幸运白名单奖池</option>
|
||||||
<span>总平台总价值:</span>
|
<option value="4">幸运偏差奖池</option>
|
||||||
<span id="platformNum"></span>
|
<option value="12">幸运次数奖池</option>
|
||||||
</p>
|
<option value="7">梦幻普通奖池</option>
|
||||||
<p>
|
<option value="9">梦幻偏差奖池</option>
|
||||||
<span>总实际总价值:</span>
|
<option value="10">梦幻新人奖池</option>
|
||||||
<span id="actualNum"></span>
|
<option value="11">梦幻白名单奖池</option>
|
||||||
</p>
|
</select>
|
||||||
<p>
|
</div>
|
||||||
<span>用户获得礼物中钻石数:</span>
|
<label for="dataType"
|
||||||
<span id="giftNum"></span>
|
class="qry_col control-label">数据类型:</label>
|
||||||
</p>
|
<div class="col-sm-2">
|
||||||
<p>
|
<select name="dataType"
|
||||||
<span>用户获得非礼物总钻石数:</span>
|
id="dataType"
|
||||||
<span id="notGiftNum"></span>
|
class="col-sm-2 form-control"
|
||||||
</p>
|
data-btn-class="btn-warning">
|
||||||
<p>
|
<option value="1"
|
||||||
<span>用户获得实物总数:</span>
|
selected="selected">普通用户数据</option>
|
||||||
<span id="realGiftNum"></span>
|
<option value="2">被排除用户的数据</option>
|
||||||
</p>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
<button class="btn btn-primary"
|
||||||
<div id="table"></div>
|
id="searchBtn">筛选</button>
|
||||||
</section>
|
<div class="tips">因数据量庞大,默认不会显示每天的结果,默认只展示平台总收益情况,请先选择时间范围再搜索</div>
|
||||||
|
<div class="dataCount">
|
||||||
|
<p>
|
||||||
|
<span>抽奖记录总数:</span>
|
||||||
|
<span id="countNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户投入钻石总数:</span>
|
||||||
|
<span id="userPay"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>总平台总价值:</span>
|
||||||
|
<span id="platformNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>总实际总价值:</span>
|
||||||
|
<span id="actualNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户获得礼物中钻石数:</span>
|
||||||
|
<span id="giftNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户获得非礼物总钻石数:</span>
|
||||||
|
<span id="notGiftNum"></span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span>用户获得实物总数:</span>
|
||||||
|
<span id="realGiftNum"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
<div id="table"></div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeDataAdminNewView",
|
name: "PrizeDataAdminNewView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
$(function () {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function (json) {
|
||||||
|
if (json.code == 200) {
|
||||||
|
//var deviatePartitionId = $("#deviatePartitionId");
|
||||||
|
//deviatePartitionId.empty();
|
||||||
|
|
||||||
|
var partitionId = $("#partitionId");
|
||||||
|
partitionId.empty();
|
||||||
|
|
||||||
|
var defaultOption = $('<option></option>').attr('value', '').text("全部");
|
||||||
|
partitionId.append(defaultOption);
|
||||||
|
|
||||||
|
// 遍历数据并添加 option
|
||||||
|
$.each(json.data, function (index, item) {
|
||||||
|
// 创建新的 option 元素
|
||||||
|
var option = $('<option></option>')
|
||||||
|
.attr('value', item.id) // 设置 value 属性
|
||||||
|
.text(item.desc); // 设置文本内容
|
||||||
|
|
||||||
|
// 追加到 select 元素
|
||||||
|
partitionId.append(option.clone());
|
||||||
|
|
||||||
|
//deviatePartitionId.append(option.clone());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
var picker1 = $('#timeBegin').datetimepicker({
|
|
||||||
format: 'yyyy-mm-dd',
|
|
||||||
todayBtn: true,
|
|
||||||
autoclose: true,
|
|
||||||
minView: 'month',
|
|
||||||
endDate: new Date()
|
|
||||||
});
|
|
||||||
|
|
||||||
var picker2 = $('#timeEnd').datetimepicker({
|
var picker1 = $('#timeBegin').datetimepicker({
|
||||||
format: 'yyyy-mm-dd',
|
format: 'yyyy-mm-dd',
|
||||||
todayBtn: true,
|
todayBtn: true,
|
||||||
autoclose: true,
|
autoclose: true,
|
||||||
minView: 'month',
|
minView: 'month',
|
||||||
endDate: new Date()
|
endDate: new Date()
|
||||||
});
|
});
|
||||||
|
|
||||||
var $timeBegin = '', $timeEnd = '';
|
var picker2 = $('#timeEnd').datetimepicker({
|
||||||
var main = {
|
format: 'yyyy-mm-dd',
|
||||||
init: function () {
|
todayBtn: true,
|
||||||
this.eventRegister();
|
autoclose: true,
|
||||||
this.valueChange();
|
minView: 'month',
|
||||||
},
|
endDate: new Date()
|
||||||
|
});
|
||||||
|
|
||||||
eventRegister: function () {
|
var $timeBegin = '', $timeEnd = '';
|
||||||
picker1.on('changeDate', function () {
|
var main = {
|
||||||
var date = $('#timeBegin').datetimepicker('getDate');
|
init: function () {
|
||||||
picker2.datetimepicker('setStartDate', date);
|
this.eventRegister();
|
||||||
});
|
this.valueChange();
|
||||||
picker2.on('changeDate', function () {
|
},
|
||||||
var date = $('#timeEnd').datetimepicker('getDate');
|
|
||||||
picker1.datetimepicker('setEndDate', date);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#searchBtn').on('click', function () {
|
eventRegister: function () {
|
||||||
var $dataCount = $('.dataCount');
|
picker1.on('changeDate', function () {
|
||||||
// var $startDate = $('#timeBegin').val().replace(/\//g,'-');
|
var date = $('#timeBegin').datetimepicker('getDate');
|
||||||
var $startDate;
|
picker2.datetimepicker('setStartDate', date);
|
||||||
if ($('#timeBegin').val() == "" || $('#timeBegin').val() == 'undefined') {
|
});
|
||||||
$startDate = '';
|
picker2.on('changeDate', function () {
|
||||||
} else {
|
var date = $('#timeEnd').datetimepicker('getDate');
|
||||||
/*var arr = $('#timeBegin').val().split('/');
|
picker1.datetimepicker('setEndDate', date);
|
||||||
var length = arr.length;
|
});
|
||||||
var $startDate = arr[length-1] +'-' + arr[0] + '-' + arr[length - 2];*/
|
|
||||||
$startDate = $('#timeBegin').val();
|
|
||||||
}
|
|
||||||
var $endDate;
|
|
||||||
if ($('#timeEnd').val() == '' || $('#timeEnd').val() == 'undefined') {
|
|
||||||
$endDate = $startDate;
|
|
||||||
} else {
|
|
||||||
/*var arr2 = $('#timeEnd').val().split('/');
|
|
||||||
var length2 = arr2.length;
|
|
||||||
var $endDate = arr2[length2-1] + '-' + arr2[0] + '-' + arr2[length2-2];*/
|
|
||||||
$endDate = $('#timeEnd').val();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($startDate == '') {
|
$('#searchBtn').on('click', function () {
|
||||||
$timeBegin = '';
|
var $dataCount = $('.dataCount');
|
||||||
$timeEnd = '';
|
// var $startDate = $('#timeBegin').val().replace(/\//g,'-');
|
||||||
} else {
|
var $startDate;
|
||||||
$timeBegin = $startDate + ' 00:00:00';
|
if ($('#timeBegin').val() == "" || $('#timeBegin').val() == 'undefined') {
|
||||||
$timeEnd = $endDate + ' 23:59:59';
|
$startDate = '';
|
||||||
}
|
} else {
|
||||||
|
/*var arr = $('#timeBegin').val().split('/');
|
||||||
|
var length = arr.length;
|
||||||
|
var $startDate = arr[length-1] +'-' + arr[0] + '-' + arr[length - 2];*/
|
||||||
|
$startDate = $('#timeBegin').val();
|
||||||
|
}
|
||||||
|
var $endDate;
|
||||||
|
if ($('#timeEnd').val() == '' || $('#timeEnd').val() == 'undefined') {
|
||||||
|
$endDate = $startDate;
|
||||||
|
} else {
|
||||||
|
/*var arr2 = $('#timeEnd').val().split('/');
|
||||||
|
var length2 = arr2.length;
|
||||||
|
var $endDate = arr2[length2-1] + '-' + arr2[0] + '-' + arr2[length2-2];*/
|
||||||
|
$endDate = $('#timeEnd').val();
|
||||||
|
}
|
||||||
|
|
||||||
$.post('/admin/drawlottery/record/totalNew', {
|
if ($startDate == '') {
|
||||||
erbanNo: $('#erbanNo').val(),
|
$timeBegin = '';
|
||||||
startDate: $timeBegin,
|
$timeEnd = '';
|
||||||
endDate: $timeEnd,
|
} else {
|
||||||
boxType: $('#boxType').val(),
|
$timeBegin = $startDate + ' 00:00:00';
|
||||||
poolType: $('#poolType').val(),
|
$timeEnd = $endDate + ' 23:59:59';
|
||||||
dataType: $('#dataType').val()
|
}
|
||||||
}, function (res) {
|
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
if (res.code == 200) {
|
$.post('/admin/drawlottery/record/totalNew', {
|
||||||
var data = res.data;
|
erbanNo: $('#erbanNo').val(),
|
||||||
$dataCount.find('#countNum').html(data.countNum);
|
startDate: $timeBegin,
|
||||||
$dataCount.find('#userPay').html(data.userTotalPay);
|
endDate: $timeEnd,
|
||||||
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
boxType: $('#boxType').val(),
|
||||||
$dataCount.find('#actualNum').html(data.totalActualValue);
|
poolType: $('#poolType').val(),
|
||||||
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
dataType: $('#dataType').val(),
|
||||||
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
partitionId: $("#partitionId").val(),
|
||||||
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
}, function (res) {
|
||||||
// TableHelper.doRefresh('#table');
|
console.log(res);
|
||||||
tableRefresh();
|
|
||||||
} else {
|
|
||||||
console.log('数据错误,导致加载失败,' + res.code);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '#details', function () {
|
if (res.code == 200) {
|
||||||
console.log($(this).data('id'));
|
var data = res.data;
|
||||||
});
|
$dataCount.find('#countNum').html(data.countNum);
|
||||||
|
$dataCount.find('#userPay').html(data.userTotalPay);
|
||||||
|
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
||||||
},
|
$dataCount.find('#actualNum').html(data.totalActualValue);
|
||||||
|
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
||||||
valueChange: function () {
|
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
||||||
var $dataCount = $('.dataCount');
|
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
||||||
$.post('/admin/drawlottery/record/totalNew', {
|
// TableHelper.doRefresh('#table');
|
||||||
erbanNo: $('#erbanNo').val(),
|
tableRefresh();
|
||||||
startDate: $timeBegin,
|
} else {
|
||||||
endDate: $timeEnd,
|
console.log('数据错误,导致加载失败,' + res.code);
|
||||||
boxType: $('#boxType').val(),
|
|
||||||
poolType: $('#poolType').val(),
|
|
||||||
dataType: $('#dataType').val()
|
|
||||||
}, function (res) {
|
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
if (res.code == 200) {
|
|
||||||
var data = res.data;
|
|
||||||
$dataCount.find('#countNum').html(data.countNum);
|
|
||||||
$dataCount.find('#userPay').html(data.userTotalPay);
|
|
||||||
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
|
||||||
$dataCount.find('#actualNum').html(data.totalActualValue);
|
|
||||||
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
|
||||||
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
|
||||||
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
} else {
|
|
||||||
console.log('数据错误,导致加载失败,' + res.code);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
};
|
|
||||||
main.init();
|
|
||||||
|
|
||||||
function tableRefresh() {
|
|
||||||
$('#table').bootstrapTable('destroy');
|
|
||||||
$('#table').bootstrapTable({
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
field: 'createTime', title: '日期', align: 'center', valign: 'middle', width: '20%', formatter: function (val, rows, index) {
|
|
||||||
if (val) {
|
|
||||||
var date = new Date(val);
|
|
||||||
return date.format('yyyy-MM-dd')
|
|
||||||
} else {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
|
|
||||||
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
|
|
||||||
// var key = row.createTime;
|
|
||||||
// return '<button class="btn btn-primary btn-sm" id="details" data-id="' + key + '">查看详情</button>';
|
|
||||||
// }}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: 'server',
|
|
||||||
queryParamsType: 'undefined',
|
|
||||||
queryParams: function queryParams(params) {
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
startDate: $timeBegin,
|
|
||||||
endDate: $timeEnd,
|
|
||||||
boxType: $('#boxType').val(),
|
|
||||||
poolType: $('#poolType').val(),
|
|
||||||
erbanNo: $('#erbanNo').val(),
|
|
||||||
dataType: $('#dataType').val(),
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'id',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/drawlottery/record/listNew',
|
|
||||||
onLoadSuccess: function () {
|
|
||||||
console.log('load success');
|
|
||||||
},
|
|
||||||
onLOadError: function () {
|
|
||||||
console.log('load fail');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '#details', function () {
|
||||||
|
console.log($(this).data('id'));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
valueChange: function () {
|
||||||
|
var $dataCount = $('.dataCount');
|
||||||
|
$.post('/admin/drawlottery/record/totalNew', {
|
||||||
|
erbanNo: $('#erbanNo').val(),
|
||||||
|
startDate: $timeBegin,
|
||||||
|
endDate: $timeEnd,
|
||||||
|
boxType: $('#boxType').val(),
|
||||||
|
poolType: $('#poolType').val(),
|
||||||
|
dataType: $('#dataType').val()
|
||||||
|
}, function (res) {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
if (res.code == 200) {
|
||||||
|
var data = res.data;
|
||||||
|
$dataCount.find('#countNum').html(data.countNum);
|
||||||
|
$dataCount.find('#userPay').html(data.userTotalPay);
|
||||||
|
$dataCount.find('#platformNum').html(data.totalPlatformValue);
|
||||||
|
$dataCount.find('#actualNum').html(data.totalActualValue);
|
||||||
|
$dataCount.find('#giftNum').html(data.totalGiftActualValue);
|
||||||
|
$dataCount.find('#notGiftNum').html(data.totalNotGiftActualValue);
|
||||||
|
$dataCount.find('#realGiftNum').html(data.totalRealGiftActualValue);
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
} else {
|
||||||
|
console.log('数据错误,导致加载失败,' + res.code);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
main.init();
|
||||||
|
|
||||||
|
function tableRefresh () {
|
||||||
|
$('#table').bootstrapTable('destroy');
|
||||||
|
$('#table').bootstrapTable({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
field: 'createTime', title: '日期', align: 'center', valign: 'middle', width: '20%', formatter: function (val, rows, index) {
|
||||||
|
if (val) {
|
||||||
|
var date = new Date(val);
|
||||||
|
return date.format('yyyy-MM-dd')
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
|
||||||
|
// var key = row.createTime;
|
||||||
|
// return '<button class="btn btn-primary btn-sm" id="details" data-id="' + key + '">查看详情</button>';
|
||||||
|
// }}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: 'server',
|
||||||
|
queryParamsType: 'undefined',
|
||||||
|
queryParams: function queryParams (params) {
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
startDate: $timeBegin,
|
||||||
|
endDate: $timeEnd,
|
||||||
|
boxType: $('#boxType').val(),
|
||||||
|
poolType: $('#poolType').val(),
|
||||||
|
erbanNo: $('#erbanNo').val(),
|
||||||
|
dataType: $('#dataType').val(),
|
||||||
|
partitionId: $('#partitionId').val(),
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'id',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/drawlottery/record/listNew',
|
||||||
|
onLoadSuccess: function () {
|
||||||
|
console.log('load success');
|
||||||
|
},
|
||||||
|
onLOadError: function () {
|
||||||
|
console.log('load fail');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.dataCount {
|
.dataCount {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataCount>p {
|
.dataCount > p {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qry_col {
|
.qry_col {
|
||||||
float: left;
|
float: left;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
@@ -12,9 +12,14 @@
|
|||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<form action="" id="searchForm" method="POST">
|
<form action=""
|
||||||
|
id="searchForm"
|
||||||
转盘分类:<select name="jackpotType" id="jackpotType" data-btn-class="btn btn-warning">
|
method="POST">
|
||||||
|
分区:<select id="partitionId"
|
||||||
|
class="input-sm"></select>
|
||||||
|
转盘分类:<select name="jackpotType"
|
||||||
|
class="input-sm"
|
||||||
|
id="jackpotType">
|
||||||
<option value="1">幸运新人奖池</option>
|
<option value="1">幸运新人奖池</option>
|
||||||
<option value="2">幸运普通奖池</option>
|
<option value="2">幸运普通奖池</option>
|
||||||
<option value="3">幸运白名单奖池</option>
|
<option value="3">幸运白名单奖池</option>
|
||||||
@@ -29,17 +34,23 @@
|
|||||||
</select>
|
</select>
|
||||||
<label class="deviateRange">
|
<label class="deviateRange">
|
||||||
偏差范围:
|
偏差范围:
|
||||||
<select name="deviateRange" id="deviateRange" data-btn-class="btn btn-warning">
|
<select name="deviateRange"
|
||||||
|
id="deviateRange"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label class="diamondDeviateRange">
|
<label class="diamondDeviateRange">
|
||||||
偏差范围:
|
偏差范围:
|
||||||
<select name="diamondDeviateRange" id="diamondDeviateRange" data-btn-class="btn btn-warning">
|
<select name="diamondDeviateRange"
|
||||||
|
id="diamondDeviateRange"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
<button class="btn btn-primary" id="searchBtn">搜索</button>
|
<button class="btn btn-primary"
|
||||||
<button class="btn btn-primary" id="add">添加奖品</button>
|
id="searchBtn">搜索</button>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
id="add">添加奖品</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 jackpot">
|
<div class="col-sm-12 jackpot">
|
||||||
@@ -51,10 +62,14 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="col-sm-12">
|
<p class="col-sm-12">
|
||||||
<span class="col-sm-3" id="jackpotName"></span>
|
<span class="col-sm-3"
|
||||||
<span class="col-sm-3" id="jackpotNum"></span>
|
id="jackpotName"></span>
|
||||||
<span class="col-sm-3" id="prizeNum"></span>
|
<span class="col-sm-3"
|
||||||
<span class="col-sm-3" id="expectNum"></span>
|
id="jackpotNum"></span>
|
||||||
|
<span class="col-sm-3"
|
||||||
|
id="prizeNum"></span>
|
||||||
|
<span class="col-sm-3"
|
||||||
|
id="expectNum"></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -65,31 +80,47 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 添加弹窗 -->
|
<!-- 添加弹窗 -->
|
||||||
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div class="modal fade"
|
||||||
|
id="addModal"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="modalLabel">
|
||||||
|
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog"
|
||||||
|
role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
<span aria-hidden="true">x</span>
|
<span aria-hidden="true">x</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<h4 class="modal-title" id="addModalLabel">添加奖品</h4>
|
<h4 class="modal-title"
|
||||||
|
id="addModalLabel">添加奖品</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="" class="form-horizontal" id="addForm">
|
<form action=""
|
||||||
|
class="form-horizontal"
|
||||||
|
id="addForm">
|
||||||
|
|
||||||
<!-- 选择奖品 -->
|
<!-- 选择奖品 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">选择奖品:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">选择奖品:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="awardType" id="awardType" data-btn-class="btn btn-warning">
|
<select name="awardType"
|
||||||
|
id="awardType"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<!-- <option value=""></option> -->
|
<!-- <option value=""></option> -->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select name="awardChoose" id="awardChoose" data-btn-class="btn btn-warning">
|
<select name="awardChoose"
|
||||||
|
id="awardChoose"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<!-- <option value=""></option> -->
|
<!-- <option value=""></option> -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -97,19 +128,29 @@
|
|||||||
|
|
||||||
<!-- 奖品个数 -->
|
<!-- 奖品个数 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">奖品个数:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">奖品个数:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="jackpotNumber" name="jackpotNumber" class=" validate[required]" placeholder="单行输入">
|
<input type="text"
|
||||||
|
id="jackpotNumber"
|
||||||
|
name="jackpotNumber"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 中奖率 -->
|
<!-- 中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">实际中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">实际中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="winningRate" name="winningRate" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="winningRate"
|
||||||
|
name="winningRate"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -119,10 +160,15 @@
|
|||||||
|
|
||||||
<!-- 展示中奖率 -->
|
<!-- 展示中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">展示中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">展示中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="showRate" name="showRate" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="showRate"
|
||||||
|
name="showRate"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -131,21 +177,41 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">是否默认奖品:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">是否默认奖品:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="itemType" id="itemType" data-btn-class="btn btn-warning">
|
<select name="itemType"
|
||||||
|
id="itemType"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<option value="1"> 默认奖品 </option>
|
<option value="1"> 默认奖品 </option>
|
||||||
<option value="2"> 普通奖品 </option>
|
<option value="2"> 普通奖品 </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 创建者 -->
|
<!-- 分区 -->
|
||||||
<div class="form-group">
|
<div class="form-group awardPartitionId">
|
||||||
<label for="" class="col-sm-3 control-label">创建者:</label>
|
<label for="awardPartitionId"
|
||||||
|
class="col-sm-3 control-label">分区:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="creator" name="creator" class="validate[required]" placeholder="必填项">
|
<select name="awardPartitionId"
|
||||||
|
id="awardPartitionId">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 创建者 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">创建者:</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text"
|
||||||
|
id="creator"
|
||||||
|
name="creator"
|
||||||
|
class="validate[required]"
|
||||||
|
placeholder="必填项">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -153,8 +219,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-default" type="button" id="addReset">重置</button>
|
<button class="btn btn-default"
|
||||||
<button class="btn btn-primary" type="button" id="addSave">保存</button>
|
type="button"
|
||||||
|
id="addReset">重置</button>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
type="button"
|
||||||
|
id="addSave">保存</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -162,35 +232,56 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 编辑弹窗 -->
|
<!-- 编辑弹窗 -->
|
||||||
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div class="modal fade"
|
||||||
<div class="modal-dialog" role="document">
|
id="editModal"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="modalLabel">
|
||||||
|
<div class="modal-dialog"
|
||||||
|
role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
<span aria-hidden="true">x</span>
|
<span aria-hidden="true">x</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="editModalLabel">编辑奖品</h4>
|
<h4 class="modal-title"
|
||||||
|
id="editModalLabel">编辑奖品</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="" class="form-horizontal" id="editForm">
|
<form action=""
|
||||||
<input type="hidden" id="editId">
|
class="form-horizontal"
|
||||||
|
id="editForm">
|
||||||
|
<input type="hidden"
|
||||||
|
id="editId">
|
||||||
<!-- 奖品个数 -->
|
<!-- 奖品个数 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">奖品个数:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">奖品个数:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="jackpotNumber2" name="jackpotNumber2" class=" validate[required]"
|
<input type="text"
|
||||||
placeholder="单行输入">
|
id="jackpotNumber2"
|
||||||
|
name="jackpotNumber2"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 中奖率 -->
|
<!-- 中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">实际中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">实际中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="winningRate2" name="winningRate2" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="winningRate2"
|
||||||
|
name="winningRate2"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -200,10 +291,15 @@
|
|||||||
|
|
||||||
<!-- 展示给用户看的中奖率 -->
|
<!-- 展示给用户看的中奖率 -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">展示中奖率:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">展示中奖率:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="showRate2" name="showRate2" class=" validate[required]" placeholder="单行输入">%
|
<input type="text"
|
||||||
|
id="showRate2"
|
||||||
|
name="showRate2"
|
||||||
|
class=" validate[required]"
|
||||||
|
placeholder="单行输入">%
|
||||||
<br />
|
<br />
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100,当前概率不得超过100
|
||||||
@@ -211,29 +307,52 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="" class="col-sm-3 control-label">是否默认奖品:</label>
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">是否默认奖品:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="itemType" id="itemType2" data-btn-class="btn btn-warning">
|
<select name="itemType"
|
||||||
|
id="itemType2"
|
||||||
|
data-btn-class="btn btn-warning">
|
||||||
<option value="1"> 默认奖品 </option>
|
<option value="1"> 默认奖品 </option>
|
||||||
<option value="2"> 普通奖品 </option>
|
<option value="2"> 普通奖品 </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 创建者 -->
|
<!-- 分区 -->
|
||||||
<div class="form-group">
|
<div class="form-group awardPartitionId">
|
||||||
<label for="" class="col-sm-3 control-label">创建者:</label>
|
<label for="awardPartitionId2"
|
||||||
|
class="col-sm-3 control-label">分区:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" id="creator2" name="creator2" class="validate[required]">
|
<select name="awardPartitionId2"
|
||||||
|
id="awardPartitionId2">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 创建者 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<label for=""
|
||||||
|
class="col-sm-3 control-label">创建者:</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text"
|
||||||
|
id="creator2"
|
||||||
|
name="creator2"
|
||||||
|
class="validate[required]">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-default" type="button" id="editReset">重置</button>
|
<button class="btn btn-default"
|
||||||
<button class="btn btn-primary" type="button" id="editSave">保存</button>
|
type="button"
|
||||||
|
id="editReset">重置</button>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
type="button"
|
||||||
|
id="editSave">保存</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -243,6 +362,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
|
var partitionInfo = {}
|
||||||
var idObj = {};
|
var idObj = {};
|
||||||
var typeObj = {};
|
var typeObj = {};
|
||||||
var pId = '', saveId = '';
|
var pId = '', saveId = '';
|
||||||
@@ -251,32 +371,85 @@ var ACCURACY = 1000; // 小数点精度
|
|||||||
var RATIO_PART = 100000; // 概率换算单位
|
var RATIO_PART = 100000; // 概率换算单位
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeManageAdminView",
|
name: "PrizeManageAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted () {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
var main = {
|
var main = {
|
||||||
init: function () {
|
init: function () {
|
||||||
|
this.initPartitionIdSelect();
|
||||||
|
|
||||||
$('.deviateRange').hide();
|
$('.deviateRange').hide();
|
||||||
$('.chargeDeviateRange').hide();
|
$('.chargeDeviateRange').hide();
|
||||||
$('.diamondDeviateRange').hide();
|
$('.diamondDeviateRange').hide();
|
||||||
|
|
||||||
this.eventRegister();
|
this.eventRegister();
|
||||||
this.getDataFormBack();
|
this.getDataFormBack();
|
||||||
|
|
||||||
this.initDeviateRangeSelect();
|
this.initDeviateRangeSelect();
|
||||||
this.initDiamondDeviateRangeSelect();
|
this.initDiamondDeviateRangeSelect();
|
||||||
//$('#selectReplacePrize').hide();
|
//$('#selectReplacePrize').hide();
|
||||||
//this.initReplacePrizeSelect();
|
//this.initReplacePrizeSelect();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initPartitionIdSelect: function () {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '/partition/listPartitionInfo',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function (json) {
|
||||||
|
if (json.code == 200) {
|
||||||
|
var awardPartitionId = $("#awardPartitionId");
|
||||||
|
awardPartitionId.empty();
|
||||||
|
|
||||||
|
var awardPartitionId2 = $("#awardPartitionId2");
|
||||||
|
awardPartitionId2.empty();
|
||||||
|
|
||||||
|
var partitionId = $("#partitionId");
|
||||||
|
partitionId.empty();
|
||||||
|
|
||||||
|
var defaultOption = $('<option></option>').attr('value', '').text("全部");
|
||||||
|
partitionId.append(defaultOption);
|
||||||
|
|
||||||
|
// 遍历数据并添加 option
|
||||||
|
$.each(json.data, function (index, item) {
|
||||||
|
// 创建新的 option 元素
|
||||||
|
var option = $('<option></option>')
|
||||||
|
.attr('value', item.id) // 设置 value 属性
|
||||||
|
.text(item.desc); // 设置文本内容
|
||||||
|
|
||||||
|
// 追加到 select 元素
|
||||||
|
partitionId.append(option.clone());
|
||||||
|
|
||||||
|
awardPartitionId.append(option.clone());
|
||||||
|
|
||||||
|
awardPartitionId2.append(option.clone());
|
||||||
|
});
|
||||||
|
|
||||||
|
partitionInfo = json.data.reduce((acc, item) => {
|
||||||
|
acc[item.id] = item.desc;
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#partitionId').change(function () {
|
||||||
|
const partitionId = $(this).val();
|
||||||
|
main.initDeviateRangeSelect(partitionId);
|
||||||
|
main.initDiamondDeviateRangeSelect(partitionId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
eventRegister: function () {
|
eventRegister: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -306,36 +479,38 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initDeviateRangeSelect: function () {
|
initDeviateRangeSelect: function (partitionId) {
|
||||||
let options = $('#deviateRange').children();
|
$('#deviateRange').empty();
|
||||||
if (options.length <= 0) {
|
|
||||||
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
|
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
|
||||||
if (res.total > 0) {
|
if (res.total > 0) {
|
||||||
var rows = res.rows;
|
var rows = res.rows;
|
||||||
for (var i = 0; i < rows.length; i++) {
|
for (var i = 0; i < rows.length; i++) {
|
||||||
var deviateRange = rows[i];
|
var deviateRange = rows[i];
|
||||||
var str = '<option value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
if (undefined != partitionId && '' != partitionId && deviateRange.partitionId == partitionId) {
|
||||||
|
var str = '<option partitionId = ' + deviateRange.partitionId + ' value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
||||||
$('#deviateRange').append(str);
|
$('#deviateRange').append(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initDiamondDeviateRangeSelect: function () {
|
initDiamondDeviateRangeSelect: function (partitionId) {
|
||||||
let options = $('#diamondDeviateRange').children();
|
$('#diamondDeviateRange').empty();
|
||||||
if (options.length <= 0) {
|
|
||||||
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
|
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
|
||||||
if (res.total > 0) {
|
if (res.total > 0) {
|
||||||
var rows = res.rows;
|
var rows = res.rows;
|
||||||
for (var i = 0; i < rows.length; i++) {
|
for (var i = 0; i < rows.length; i++) {
|
||||||
var deviateRange = rows[i];
|
var deviateRange = rows[i];
|
||||||
var str = '<option value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
if (undefined != partitionId && '' != partitionId && deviateRange.partitionId == partitionId) {
|
||||||
|
var str = '<option partitionId = ' + deviateRange.partitionId + ' value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
|
||||||
$('#diamondDeviateRange').append(str);
|
$('#diamondDeviateRange').append(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
initReplacePrizeSelect: function () {
|
initReplacePrizeSelect: function () {
|
||||||
@@ -358,7 +533,7 @@ export default {
|
|||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'id', title: '奖品编号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'id', title: '奖品编号', align: 'center', valign: 'middle', width: '3%' },
|
||||||
{
|
{
|
||||||
field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
var key = row.prizeId;
|
var key = row.prizeId;
|
||||||
@@ -448,6 +623,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'usePrizeNum', title: '被抽中数量', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'usePrizeNum', title: '被抽中数量', align: 'center', valign: 'middle', width: '10%' },
|
||||||
|
{
|
||||||
|
field: 'partitionId', title: '分区', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
|
return partitionInfo[val] || val;
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: '', title: '操作', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
field: '', title: '操作', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
var key = row.id;
|
var key = row.id;
|
||||||
@@ -463,13 +643,14 @@ export default {
|
|||||||
pageList: [10, 20, 30, 50],
|
pageList: [10, 20, 30, 50],
|
||||||
sidePagination: 'server',
|
sidePagination: 'server',
|
||||||
queryParamsType: 'undefined',
|
queryParamsType: 'undefined',
|
||||||
queryParams: function queryParams(params) {
|
queryParams: function queryParams (params) {
|
||||||
|
|
||||||
var param = {
|
var param = {
|
||||||
pageSize: params.pageSize,
|
pageSize: params.pageSize,
|
||||||
pageNumber: params.pageNumber,
|
pageNumber: params.pageNumber,
|
||||||
poolType: parseInt($('#jackpotType').val()),
|
poolType: parseInt($('#jackpotType').val()),
|
||||||
deviateRangeId: getDeviateRangeId()
|
deviateRangeId: getDeviateRangeId(),
|
||||||
|
partitionId: $('#partitionId').val(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return param;
|
return param;
|
||||||
@@ -479,7 +660,6 @@ export default {
|
|||||||
url: '/admin/prizePoolItem/list',
|
url: '/admin/prizePoolItem/list',
|
||||||
onLoadSuccess: function (res) {
|
onLoadSuccess: function (res) {
|
||||||
console.log('load success');
|
console.log('load success');
|
||||||
console.log(res.rows);
|
|
||||||
var arr = [];
|
var arr = [];
|
||||||
var Num = 0;
|
var Num = 0;
|
||||||
var expectNum = 0;
|
var expectNum = 0;
|
||||||
@@ -587,7 +767,6 @@ export default {
|
|||||||
$('#addModal').find('#awardType').on('change', function () {
|
$('#addModal').find('#awardType').on('change', function () {
|
||||||
$('#awardChoose').find('option').remove();
|
$('#awardChoose').find('option').remove();
|
||||||
var key = $(this).val();
|
var key = $(this).val();
|
||||||
console.log(key);
|
|
||||||
// var str = '<option></option>';
|
// var str = '<option></option>';
|
||||||
// $('#awardChoose').append(str);
|
// $('#awardChoose').append(str);
|
||||||
var str;
|
var str;
|
||||||
@@ -605,12 +784,12 @@ export default {
|
|||||||
var id = $(this).data('id');
|
var id = $(this).data('id');
|
||||||
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
|
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
$('#editModal').find('#jackpotNumber2').val(data.prizeNum);
|
$('#editModal').find('#jackpotNumber2').val(data.prizeNum);
|
||||||
$('#editModal').find('#winningRate2').val(data.occupationRatio / ACCURACY);
|
$('#editModal').find('#winningRate2').val(data.occupationRatio / ACCURACY);
|
||||||
$('#editModal').find('#showRate2').val(data.showRatio / ACCURACY);
|
$('#editModal').find('#showRate2').val(data.showRatio / ACCURACY);
|
||||||
$('#editModal').find('#creator2').val(data.creator);
|
$('#editModal').find('#creator2').val(data.creator);
|
||||||
$('#editModal').find('#itemType2').val(data.itemType);
|
$('#editModal').find('#itemType2').val(data.itemType);
|
||||||
|
$('#editModal').find('#awardPartitionId2').val(data.partitionId);
|
||||||
pId = data.prizeId;
|
pId = data.prizeId;
|
||||||
saveId = id;
|
saveId = id;
|
||||||
});
|
});
|
||||||
@@ -660,7 +839,8 @@ export default {
|
|||||||
occupationRatio: $('#winningRate').val() * ACCURACY,
|
occupationRatio: $('#winningRate').val() * ACCURACY,
|
||||||
showRatio: $('#showRate').val() * ACCURACY,
|
showRatio: $('#showRate').val() * ACCURACY,
|
||||||
creator: $('#creator').val(),
|
creator: $('#creator').val(),
|
||||||
itemType: $('#itemType').val()
|
itemType: $('#itemType').val(),
|
||||||
|
partitionId: $('#awardPartitionId').val(),
|
||||||
}, function (res) {
|
}, function (res) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
$('#addModal').modal('hide');
|
$('#addModal').modal('hide');
|
||||||
@@ -715,7 +895,8 @@ export default {
|
|||||||
occupationRatio: $('#winningRate2').val() * ACCURACY,
|
occupationRatio: $('#winningRate2').val() * ACCURACY,
|
||||||
showRatio: $('#showRate2').val() * ACCURACY,
|
showRatio: $('#showRate2').val() * ACCURACY,
|
||||||
creator: $('#creator2').val(),
|
creator: $('#creator2').val(),
|
||||||
itemType: $('#itemType2').val()
|
itemType: $('#itemType2').val(),
|
||||||
|
partitionId: $('#awardPartitionId2').val(),
|
||||||
}, function (res) {
|
}, function (res) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
@@ -774,7 +955,7 @@ export default {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function clearModal() {
|
function clearModal () {
|
||||||
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
|
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
|
||||||
$(this).val('');
|
$(this).val('');
|
||||||
});
|
});
|
||||||
@@ -783,7 +964,7 @@ function clearModal() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDeviateRangeId() {
|
function getDeviateRangeId () {
|
||||||
if ($('#deviateRange').val()) {
|
if ($('#deviateRange').val()) {
|
||||||
var jackpotType = $('#jackpotType').val();
|
var jackpotType = $('#jackpotType').val();
|
||||||
if (jackpotType == '4') {
|
if (jackpotType == '4') {
|
||||||
@@ -814,7 +995,7 @@ function getDeviateRangeId() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar>div:first-child {
|
#toolbar > div:first-child {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@@ -1,179 +1,197 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<form action="/admin/box/record/export" id="searchForm" method="POST">
|
<form action="/admin/box/record/export"
|
||||||
平台号:<input type="text" id="msNo" name="msNo" class="input-sm" placeholder="请输入平台号">
|
id="searchForm"
|
||||||
|
method="POST">
|
||||||
|
平台号:<input type="text"
|
||||||
|
id="msNo"
|
||||||
|
name="msNo"
|
||||||
|
class="input-sm"
|
||||||
|
placeholder="请输入平台号">
|
||||||
|
|
||||||
奖品名称:<input type="text" id="prizeName" name="prizeName" class="input-sm"
|
奖品名称:<input type="text"
|
||||||
placeholder="请输入奖品名称">
|
id="prizeName"
|
||||||
|
name="prizeName"
|
||||||
|
class="input-sm"
|
||||||
|
placeholder="请输入奖品名称">
|
||||||
|
|
||||||
日期:<input type="text" name="startDate" id="timeBegin" class="input-sm datetime"
|
日期:<input type="text"
|
||||||
placeholder="起始时间">
|
name="startDate"
|
||||||
- <input type="text" name="endDate" id="timeEnd" class="input-sm datetime"
|
id="timeBegin"
|
||||||
placeholder="结束时间">
|
class="input-sm datetime"
|
||||||
|
placeholder="起始时间">
|
||||||
|
- <input type="text"
|
||||||
|
name="endDate"
|
||||||
|
id="timeEnd"
|
||||||
|
class="input-sm datetime"
|
||||||
|
placeholder="结束时间">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<button id="searchBtn" class="btn btn-primary">筛选</button>
|
<button id="searchBtn"
|
||||||
<button id="exportBtn" class="btn btn-primary">导出</button>
|
class="btn btn-primary">筛选</button>
|
||||||
</div>
|
<button id="exportBtn"
|
||||||
</div>
|
class="btn btn-primary">导出</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeRecordAdminView",
|
name: "PrizeRecordAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData () {
|
||||||
|
$(function () {
|
||||||
|
|
||||||
|
$('.datetime').datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
$('.datetime').datetimepicker({
|
var main = {
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
init: function () {
|
||||||
autoclose: true
|
this.eventRegister();
|
||||||
});
|
this.getDataFromBack();
|
||||||
|
},
|
||||||
|
|
||||||
var main = {
|
eventRegister: function () {
|
||||||
init: function () {
|
|
||||||
this.eventRegister();
|
|
||||||
this.getDataFromBack();
|
|
||||||
},
|
|
||||||
|
|
||||||
eventRegister: function () {
|
},
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
getDataFromBack: function () {
|
getDataFromBack: function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
main.init();
|
main.init();
|
||||||
|
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'id', title: 'id', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'id', title: 'id', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'nick', title: '用户昵称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'nick', title: '用户昵称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'createTime', title: '抽奖时间', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
|
{
|
||||||
if (val) {
|
field: 'createTime', title: '抽奖时间', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
|
||||||
var date = new Date(val);
|
if (val) {
|
||||||
return date.format('yyyy-MM-dd hh:mm:ss');
|
var date = new Date(val);
|
||||||
} else {
|
return date.format('yyyy-MM-dd hh:mm:ss');
|
||||||
return '-';
|
} else {
|
||||||
}
|
return '-';
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{ field: 'platformValue', title: '平台价值', align: 'center', valign: 'middle', width: '10%' },
|
},
|
||||||
{ field: 'actualValue', title: '实际价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'platformValue', title: '平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'actualValue', title: '实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'prizePoolType', title: '转盘类型', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
{
|
||||||
switch (row.prizePoolType) {
|
field: 'prizePoolType', title: '转盘类型', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
case 1:
|
switch (row.prizePoolType) {
|
||||||
return '幸运新人奖池';
|
case 1:
|
||||||
|
return '幸运新人奖池';
|
||||||
case 2:
|
|
||||||
return '幸运普通奖池';
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
return '幸运白名单奖池';
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
return '幸运偏差奖池';
|
|
||||||
|
|
||||||
case 12:
|
|
||||||
return '幸运次数奖池';
|
|
||||||
|
|
||||||
case 7:
|
|
||||||
return '梦幻普通奖池';
|
|
||||||
|
|
||||||
case 9:
|
|
||||||
return '梦幻偏差奖池';
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
return '梦幻新人奖池';
|
|
||||||
|
|
||||||
case 11:
|
|
||||||
return '梦幻白名单奖池';
|
|
||||||
|
|
||||||
case 13:
|
|
||||||
return '普通管理奖池';
|
|
||||||
|
|
||||||
case 14:
|
|
||||||
return '梦幻管理奖池';
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: 'server',
|
|
||||||
queryParamsType: 'undefined',
|
|
||||||
queryParams: function queryParams(params) {
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
startDate: $('#timeBegin').val(),
|
|
||||||
endDate: $('#timeEnd').val(),
|
|
||||||
msNo: $('#msNo').val(),
|
|
||||||
prizeName: $("#prizeName").val()
|
|
||||||
};
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'id',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/box/record/list',
|
|
||||||
onLOadSuccess: function () {
|
|
||||||
console.log('load success');
|
|
||||||
},
|
|
||||||
onLoadError: function () {
|
|
||||||
console.log('load fail');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 筛选按钮点击事件
|
|
||||||
$('#searchBtn').on('click', function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#exportBtn").on('click', function () {
|
case 2:
|
||||||
$("#searchForm").submit();
|
return '幸运普通奖池';
|
||||||
})
|
|
||||||
})
|
case 3:
|
||||||
}
|
return '幸运白名单奖池';
|
||||||
},
|
|
||||||
|
case 4:
|
||||||
|
return '幸运偏差奖池';
|
||||||
|
|
||||||
|
case 12:
|
||||||
|
return '幸运次数奖池';
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
return '梦幻普通奖池';
|
||||||
|
|
||||||
|
case 9:
|
||||||
|
return '梦幻偏差奖池';
|
||||||
|
|
||||||
|
case 10:
|
||||||
|
return '梦幻新人奖池';
|
||||||
|
|
||||||
|
case 11:
|
||||||
|
return '梦幻白名单奖池';
|
||||||
|
|
||||||
|
case 13:
|
||||||
|
return '普通管理奖池';
|
||||||
|
|
||||||
|
case 14:
|
||||||
|
return '梦幻管理奖池';
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: 'server',
|
||||||
|
queryParamsType: 'undefined',
|
||||||
|
queryParams: function queryParams (params) {
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
startDate: $('#timeBegin').val(),
|
||||||
|
endDate: $('#timeEnd').val(),
|
||||||
|
msNo: $('#msNo').val(),
|
||||||
|
prizeName: $("#prizeName").val()
|
||||||
|
};
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'id',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/box/record/list',
|
||||||
|
onLOadSuccess: function () {
|
||||||
|
console.log('load success');
|
||||||
|
},
|
||||||
|
onLoadError: function () {
|
||||||
|
console.log('load fail');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 筛选按钮点击事件
|
||||||
|
$('#searchBtn').on('click', function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#exportBtn").on('click', function () {
|
||||||
|
$("#searchForm").submit();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -1,296 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<label class="source">
|
<label class="source">
|
||||||
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
|
选择时间: <input type="text"
|
||||||
至 <input type="text" id="endTime" name="endTime" class="input-sm">
|
name="startTime"
|
||||||
</label>
|
id="startTime"
|
||||||
<label class="source">
|
class="input-sm">
|
||||||
宝箱类型: <select name="boxType" id="boxType" class="input-sm">
|
至 <input type="text"
|
||||||
<option value="0">全部</option>
|
id="endTime"
|
||||||
<option value="1">幸运许愿池</option>
|
name="endTime"
|
||||||
<option value="2">梦幻许愿池</option>
|
class="input-sm">
|
||||||
</select>
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="source">
|
宝箱类型: <select name="boxType"
|
||||||
查询凭据:<select name="source" id="source" class="input-sm">
|
id="boxType"
|
||||||
<option value="1">平台号</option>
|
class="input-sm">
|
||||||
<option value="2">偏差范围</option>
|
<option value="0">全部</option>
|
||||||
</select>
|
<option value="1">幸运许愿池</option>
|
||||||
</label>
|
<option value="2">梦幻许愿池</option>
|
||||||
<label class="msNo">
|
</select>
|
||||||
平台号:<input type="text" placeholder="请输入草莓号" id="msNo" class="input-sm">
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="deviation">
|
查询凭据:<select name="source"
|
||||||
偏差值: <input type="text" id="minDis" class="input-m"> - <input type="text" id="maxDis"
|
id="source"
|
||||||
class="input-m">
|
class="input-sm">
|
||||||
</label>
|
<option value="1">平台号</option>
|
||||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
<option value="2">偏差范围</option>
|
||||||
</div>
|
</select>
|
||||||
</section>
|
</label>
|
||||||
</div>
|
<label class="msNo">
|
||||||
</div>
|
平台号:<input type="text"
|
||||||
</section>
|
placeholder="请输入草莓号"
|
||||||
|
id="msNo"
|
||||||
|
class="input-sm">
|
||||||
|
</label>
|
||||||
|
<label class="deviation">
|
||||||
|
偏差值: <input type="text"
|
||||||
|
id="minDis"
|
||||||
|
class="input-m"> - <input type="text"
|
||||||
|
id="maxDis"
|
||||||
|
class="input-m">
|
||||||
|
</label>
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-sm btn-primary">查询</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeStatisAdminNewView",
|
name: "PrizeStatisAdminNewView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$(function () {
|
||||||
//searchHistory();
|
//searchHistory();
|
||||||
var whiteList = {};
|
var whiteList = {};
|
||||||
requestWhiteList(searchHistory());
|
requestWhiteList(searchHistory());
|
||||||
function searchHistory() {
|
function searchHistory () {
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
{
|
||||||
if (val > 0) {
|
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
return '<span style="color:red">+' + val + '</span>';
|
if (val > 0) {
|
||||||
} else {
|
return '<span style="color:red">+' + val + '</span>';
|
||||||
return '<span style="color:green">' + val + '</span>';
|
} else {
|
||||||
}
|
return '<span style="color:green">' + val + '</span>';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondUseNum',
|
|
||||||
title: '梦幻白名单次数',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useDiamondNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondWhiteStatus',
|
|
||||||
title: '梦幻白名单状态',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'tmp',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var btnStr = "";
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
|
||||||
}
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
|
||||||
}
|
|
||||||
return btnStr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
msNo: $('#msNo').val(),
|
|
||||||
boxType: $("#boxType").val(),
|
|
||||||
minDis: $('#minDis').val(),
|
|
||||||
maxDis: $('#maxDis').val(),
|
|
||||||
source: $('#source').val(),
|
|
||||||
startTime: $("#startTime").val(),
|
|
||||||
endTime: $("#endTime").val()
|
|
||||||
};
|
|
||||||
console.log(param);
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'uid',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/box/record/statis/list',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
$('#source').on('change', function () {
|
{
|
||||||
var source = parseInt($(this).val());
|
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
if (source == 1) {
|
var uid = row.uid;
|
||||||
$('.msNo').show();
|
if (whiteList[uid]) {
|
||||||
$('.deviation').hide();
|
return whiteList[uid].useNum;
|
||||||
} else {
|
} else {
|
||||||
$('.msNo').hide();
|
return 0;
|
||||||
$('.deviation').show();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 2);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 2);
|
|
||||||
});
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
var source = $('#source').val();
|
|
||||||
var msNo = $('#msNo').val();
|
|
||||||
var minDis = $('#minDis').val();
|
|
||||||
var maxDis = $('#maxDis').val();
|
|
||||||
if (source == 1 && msNo == '') {
|
|
||||||
$("#tipMsg").text("请输入平台号");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
|
||||||
$("#tipMsg").text("请输入偏差值");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
requestWhiteList(searchHistory());
|
|
||||||
});
|
|
||||||
|
|
||||||
function editWhiteList(uid, availableNum, boxType) {
|
|
||||||
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (availableNum > 0) {
|
|
||||||
$("#tipMsg").text("设置成功");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("移除成功");
|
|
||||||
}
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
|
|
||||||
requestWhiteList(function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("设置失败");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
function requestWhiteList(callback) {
|
{
|
||||||
$.ajax({
|
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
url: '/admin/prizeWhiteUser/list',
|
var uid = row.uid;
|
||||||
success: function (res) {
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
console.log(res);
|
return '<span style="color:red">待抽奖</span>';
|
||||||
if (res.code == 200) {
|
} else {
|
||||||
whiteList = res.data;
|
return '<span style="color:green">未设置</span>';
|
||||||
typeof callback === 'function' && callback();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
// 初始化时间选择器
|
{
|
||||||
$('#startTime').datetimepicker({
|
field: 'diamondUseNum',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
title: '梦幻白名单次数',
|
||||||
autoclose: true
|
align: 'center',
|
||||||
})
|
valign: 'middle',
|
||||||
$("#endTime").datetimepicker({
|
width: '5%',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
formatter: function (val, row, index) {
|
||||||
autoclose: true
|
var uid = row.uid;
|
||||||
});
|
if (whiteList[uid]) {
|
||||||
})
|
return whiteList[uid].useDiamondNum;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'diamondWhiteStatus',
|
||||||
|
title: '梦幻白名单状态',
|
||||||
|
align: 'center',
|
||||||
|
valign: 'middle',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
return '<span style="color:red">待抽奖</span>';
|
||||||
|
} else {
|
||||||
|
return '<span style="color:green">未设置</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'tmp',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var btnStr = "";
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
||||||
|
}
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
||||||
|
}
|
||||||
|
return btnStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
msNo: $('#msNo').val(),
|
||||||
|
boxType: $("#boxType").val(),
|
||||||
|
minDis: $('#minDis').val(),
|
||||||
|
maxDis: $('#maxDis').val(),
|
||||||
|
source: $('#source').val(),
|
||||||
|
startTime: $("#startTime").val(),
|
||||||
|
endTime: $("#endTime").val()
|
||||||
|
};
|
||||||
|
console.log(param);
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'uid',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/box/record/statis/list',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
$('#source').on('change', function () {
|
||||||
|
var source = parseInt($(this).val());
|
||||||
|
if (source == 1) {
|
||||||
|
$('.msNo').show();
|
||||||
|
$('.deviation').hide();
|
||||||
|
} else {
|
||||||
|
$('.msNo').hide();
|
||||||
|
$('.deviation').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 2);
|
||||||
|
});
|
||||||
|
$('#btnSearch').on('click', function () {
|
||||||
|
var source = $('#source').val();
|
||||||
|
var msNo = $('#msNo').val();
|
||||||
|
var minDis = $('#minDis').val();
|
||||||
|
var maxDis = $('#maxDis').val();
|
||||||
|
if (source == 1 && msNo == '') {
|
||||||
|
$("#tipMsg").text("请输入平台号");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
||||||
|
$("#tipMsg").text("请输入偏差值");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requestWhiteList(searchHistory());
|
||||||
|
});
|
||||||
|
|
||||||
|
function editWhiteList (uid, availableNum, boxType) {
|
||||||
|
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (availableNum > 0) {
|
||||||
|
$("#tipMsg").text("设置成功");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("移除成功");
|
||||||
|
}
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
|
||||||
|
requestWhiteList(function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("设置失败");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestWhiteList (callback) {
|
||||||
|
$.ajax({
|
||||||
|
url: '/admin/prizeWhiteUser/list',
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
whiteList = res.data;
|
||||||
|
typeof callback === 'function' && callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化时间选择器
|
||||||
|
$('#startTime').datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
})
|
||||||
|
$("#endTime").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.deviation {
|
.deviation {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar label {
|
#toolbar label {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
@@ -1,296 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1 id="itemTitle"></h1>
|
<h1 id="itemTitle"></h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="table"></div>
|
<div id="table"></div>
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<label class="source">
|
<label class="source">
|
||||||
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
|
选择时间: <input type="text"
|
||||||
至 <input type="text" id="endTime" name="endTime" class="input-sm">
|
name="startTime"
|
||||||
</label>
|
id="startTime"
|
||||||
<label class="source">
|
class="input-sm">
|
||||||
宝箱类型: <select name="boxType" id="boxType" class="input-sm">
|
至 <input type="text"
|
||||||
<option value="0">全部</option>
|
id="endTime"
|
||||||
<option value="1">幸运许愿池</option>
|
name="endTime"
|
||||||
<option value="2">梦幻许愿池</option>
|
class="input-sm">
|
||||||
</select>
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="source">
|
宝箱类型: <select name="boxType"
|
||||||
查询凭据:<select name="source" id="source" class="input-sm">
|
id="boxType"
|
||||||
<option value="1">平台号</option>
|
class="input-sm">
|
||||||
<option value="2">偏差范围</option>
|
<option value="0">全部</option>
|
||||||
</select>
|
<option value="1">幸运许愿池</option>
|
||||||
</label>
|
<option value="2">梦幻许愿池</option>
|
||||||
<label class="msNo">
|
</select>
|
||||||
平台号:<input type="text" placeholder="请输入草莓号" id="msNo" class="input-sm">
|
</label>
|
||||||
</label>
|
<label class="source">
|
||||||
<label class="deviation">
|
查询凭据:<select name="source"
|
||||||
偏差值: <input type="text" id="minDis" class="input-m"> - <input type="text" id="maxDis"
|
id="source"
|
||||||
class="input-m">
|
class="input-sm">
|
||||||
</label>
|
<option value="1">平台号</option>
|
||||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
<option value="2">偏差范围</option>
|
||||||
</div>
|
</select>
|
||||||
</section>
|
</label>
|
||||||
</div>
|
<label class="msNo">
|
||||||
</div>
|
平台号:<input type="text"
|
||||||
</section>
|
placeholder="请输入草莓号"
|
||||||
|
id="msNo"
|
||||||
|
class="input-sm">
|
||||||
|
</label>
|
||||||
|
<label class="deviation">
|
||||||
|
偏差值: <input type="text"
|
||||||
|
id="minDis"
|
||||||
|
class="input-m"> - <input type="text"
|
||||||
|
id="maxDis"
|
||||||
|
class="input-m">
|
||||||
|
</label>
|
||||||
|
<button id="btnSearch"
|
||||||
|
class="btn btn-sm btn-primary">查询</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PrizeStatisAdminView",
|
name: "PrizeStatisAdminView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
$(function () {
|
$(function () {
|
||||||
//searchHistory();
|
//searchHistory();
|
||||||
var whiteList = {};
|
var whiteList = {};
|
||||||
requestWhiteList(searchHistory());
|
requestWhiteList(searchHistory());
|
||||||
function searchHistory() {
|
function searchHistory () {
|
||||||
$('#table').bootstrapTable('destroy');
|
$('#table').bootstrapTable('destroy');
|
||||||
$('#table').bootstrapTable({
|
$('#table').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
{
|
{ field: 'totalActualValue', title: '历史获奖实际价值', align: 'center', valign: 'middle', width: '10%' },
|
||||||
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
{
|
||||||
if (val > 0) {
|
field: 'deviation', title: '偏差值', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||||
return '<span style="color:red">+' + val + '</span>';
|
if (val > 0) {
|
||||||
} else {
|
return '<span style="color:red">+' + val + '</span>';
|
||||||
return '<span style="color:green">' + val + '</span>';
|
} else {
|
||||||
}
|
return '<span style="color:green">' + val + '</span>';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondUseNum',
|
|
||||||
title: '梦幻白名单次数',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid]) {
|
|
||||||
return whiteList[uid].useDiamondNum;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'diamondWhiteStatus',
|
|
||||||
title: '梦幻白名单状态',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle',
|
|
||||||
width: '5%',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
return '<span style="color:red">待抽奖</span>';
|
|
||||||
} else {
|
|
||||||
return '<span style="color:green">未设置</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'tmp',
|
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
width: '10%',
|
|
||||||
valign: 'middle',
|
|
||||||
formatter: function (val, row, index) {
|
|
||||||
var btnStr = "";
|
|
||||||
var uid = row.uid;
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
|
||||||
}
|
|
||||||
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
|
||||||
} else {
|
|
||||||
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
|
||||||
}
|
|
||||||
return btnStr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
cache: false,
|
|
||||||
striped: true,
|
|
||||||
showRefresh: false,
|
|
||||||
pageSize: 10,
|
|
||||||
pagination: true,
|
|
||||||
pageList: [10, 20, 30, 50],
|
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
|
||||||
queryParamsType: "undefined",
|
|
||||||
queryParams: function queryParams(params) { //设置查询参数
|
|
||||||
var param = {
|
|
||||||
pageSize: params.pageSize,
|
|
||||||
pageNumber: params.pageNumber,
|
|
||||||
msNo: $('#msNo').val(),
|
|
||||||
boxType: $("#boxType").val(),
|
|
||||||
minDis: $('#minDis').val(),
|
|
||||||
maxDis: $('#maxDis').val(),
|
|
||||||
source: $('#source').val(),
|
|
||||||
startTime: $("#startTime").val(),
|
|
||||||
endTime: $("#endTime").val()
|
|
||||||
};
|
|
||||||
console.log(param);
|
|
||||||
return param;
|
|
||||||
},
|
|
||||||
uniqueId: 'uid',
|
|
||||||
toolbar: '#toolbar',
|
|
||||||
url: '/admin/box/record/statis/list',
|
|
||||||
onLoadSuccess: function () { //加载成功时执行
|
|
||||||
console.log("load success");
|
|
||||||
},
|
|
||||||
onLoadError: function () { //加载失败时执行
|
|
||||||
console.log("load fail");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
$('#source').on('change', function () {
|
{
|
||||||
var source = parseInt($(this).val());
|
field: 'useNum', title: '历史白名单次数', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
if (source == 1) {
|
var uid = row.uid;
|
||||||
$('.msNo').show();
|
if (whiteList[uid]) {
|
||||||
$('.deviation').hide();
|
return whiteList[uid].useNum;
|
||||||
} else {
|
} else {
|
||||||
$('.msNo').hide();
|
return 0;
|
||||||
$('.deviation').show();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-set', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 1, 2);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.normal-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#table').on('click', '.diamond-box-del', function () {
|
|
||||||
var uid = $(this).data('id');
|
|
||||||
editWhiteList(uid, 0, 2);
|
|
||||||
});
|
|
||||||
$('#btnSearch').on('click', function () {
|
|
||||||
var source = $('#source').val();
|
|
||||||
var msNo = $('#msNo').val();
|
|
||||||
var minDis = $('#minDis').val();
|
|
||||||
var maxDis = $('#maxDis').val();
|
|
||||||
if (source == 1 && msNo == '') {
|
|
||||||
$("#tipMsg").text("请输入平台号");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
|
||||||
$("#tipMsg").text("请输入偏差值");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
requestWhiteList(searchHistory());
|
|
||||||
});
|
|
||||||
|
|
||||||
function editWhiteList(uid, availableNum, boxType) {
|
|
||||||
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (availableNum > 0) {
|
|
||||||
$("#tipMsg").text("设置成功");
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("移除成功");
|
|
||||||
}
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
|
|
||||||
requestWhiteList(function () {
|
|
||||||
TableHelper.doRefresh('#table');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$("#tipMsg").text("设置失败");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
function requestWhiteList(callback) {
|
{
|
||||||
$.ajax({
|
field: 'whiteStatus', title: '白名单状态', align: 'center', valign: 'middle', width: '5%', formatter: function (val, row, index) {
|
||||||
url: '/admin/prizeWhiteUser/list',
|
var uid = row.uid;
|
||||||
success: function (res) {
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
console.log(res);
|
return '<span style="color:red">待抽奖</span>';
|
||||||
if (res.code == 200) {
|
} else {
|
||||||
whiteList = res.data;
|
return '<span style="color:green">未设置</span>';
|
||||||
typeof callback === 'function' && callback();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
// 初始化时间选择器
|
{
|
||||||
$('#startTime').datetimepicker({
|
field: 'diamondUseNum',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
title: '梦幻白名单次数',
|
||||||
autoclose: true
|
align: 'center',
|
||||||
})
|
valign: 'middle',
|
||||||
$("#endTime").datetimepicker({
|
width: '5%',
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
formatter: function (val, row, index) {
|
||||||
autoclose: true
|
var uid = row.uid;
|
||||||
});
|
if (whiteList[uid]) {
|
||||||
})
|
return whiteList[uid].useDiamondNum;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'diamondWhiteStatus',
|
||||||
|
title: '梦幻白名单状态',
|
||||||
|
align: 'center',
|
||||||
|
valign: 'middle',
|
||||||
|
width: '5%',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
return '<span style="color:red">待抽奖</span>';
|
||||||
|
} else {
|
||||||
|
return '<span style="color:green">未设置</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'tmp',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
valign: 'middle',
|
||||||
|
formatter: function (val, row, index) {
|
||||||
|
var btnStr = "";
|
||||||
|
var uid = row.uid;
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del normal-box-del' data-id=" + uid + ">移除普通白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set normal-box-set' data-id=" + uid + ">设置普通白名单</button>";
|
||||||
|
}
|
||||||
|
if (whiteList[uid] && whiteList[uid].availableDiamondNum > 0) {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-warning opt-del diamond-box-del' data-id=" + uid + ">移除梦幻白名单</button>";
|
||||||
|
} else {
|
||||||
|
btnStr += "<button class='btn btn-sm btn-success opt-set diamond-box-set' data-id=" + uid + ">设置梦幻白名单</button>";
|
||||||
|
}
|
||||||
|
return btnStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cache: false,
|
||||||
|
striped: true,
|
||||||
|
showRefresh: false,
|
||||||
|
pageSize: 10,
|
||||||
|
pagination: true,
|
||||||
|
pageList: [10, 20, 30, 50],
|
||||||
|
sidePagination: "server", //表示服务端请求
|
||||||
|
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||||
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
|
queryParamsType: "undefined",
|
||||||
|
queryParams: function queryParams (params) { //设置查询参数
|
||||||
|
var param = {
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
pageNumber: params.pageNumber,
|
||||||
|
msNo: $('#msNo').val(),
|
||||||
|
boxType: $("#boxType").val(),
|
||||||
|
minDis: $('#minDis').val(),
|
||||||
|
maxDis: $('#maxDis').val(),
|
||||||
|
source: $('#source').val(),
|
||||||
|
startTime: $("#startTime").val(),
|
||||||
|
endTime: $("#endTime").val()
|
||||||
|
};
|
||||||
|
console.log(param);
|
||||||
|
return param;
|
||||||
|
},
|
||||||
|
uniqueId: 'uid',
|
||||||
|
toolbar: '#toolbar',
|
||||||
|
url: '/admin/box/record/statis/list',
|
||||||
|
onLoadSuccess: function () { //加载成功时执行
|
||||||
|
console.log("load success");
|
||||||
|
},
|
||||||
|
onLoadError: function () { //加载失败时执行
|
||||||
|
console.log("load fail");
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
$('#source').on('change', function () {
|
||||||
|
var source = parseInt($(this).val());
|
||||||
|
if (source == 1) {
|
||||||
|
$('.msNo').show();
|
||||||
|
$('.deviation').hide();
|
||||||
|
} else {
|
||||||
|
$('.msNo').hide();
|
||||||
|
$('.deviation').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-set', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 1, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.normal-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#table').on('click', '.diamond-box-del', function () {
|
||||||
|
var uid = $(this).data('id');
|
||||||
|
editWhiteList(uid, 0, 2);
|
||||||
|
});
|
||||||
|
$('#btnSearch').on('click', function () {
|
||||||
|
var source = $('#source').val();
|
||||||
|
var msNo = $('#msNo').val();
|
||||||
|
var minDis = $('#minDis').val();
|
||||||
|
var maxDis = $('#maxDis').val();
|
||||||
|
if (source == 1 && msNo == '') {
|
||||||
|
$("#tipMsg").text("请输入平台号");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
} else if (source == 2 && (minDis == '' || maxDis == '')) {
|
||||||
|
$("#tipMsg").text("请输入偏差值");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requestWhiteList(searchHistory());
|
||||||
|
});
|
||||||
|
|
||||||
|
function editWhiteList (uid, availableNum, boxType) {
|
||||||
|
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (availableNum > 0) {
|
||||||
|
$("#tipMsg").text("设置成功");
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("移除成功");
|
||||||
|
}
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
|
||||||
|
requestWhiteList(function () {
|
||||||
|
TableHelper.doRefresh('#table');
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$("#tipMsg").text("设置失败");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestWhiteList (callback) {
|
||||||
|
$.ajax({
|
||||||
|
url: '/admin/prizeWhiteUser/list',
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
whiteList = res.data;
|
||||||
|
typeof callback === 'function' && callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化时间选择器
|
||||||
|
$('#startTime').datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
})
|
||||||
|
$("#endTime").datetimepicker({
|
||||||
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.deviation {
|
.deviation {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar label {
|
#toolbar label {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
@@ -33,7 +33,7 @@
|
|||||||
<el-table-column align="center" prop="icon" label="入口icon">
|
<el-table-column align="center" prop="icon" label="入口icon">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
|
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.icon]" fit="cover" preview-teleported="true"
|
:preview-src-list="[scope.row.icon]" fit="scale-down" preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
<el-table-column align="center" prop="icon" label="入口icon">
|
<el-table-column align="center" prop="icon" label="入口icon">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
|
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.icon]" fit="cover" preview-teleported="true"
|
:preview-src-list="[scope.row.icon]" fit="scale-down" preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
<el-table-column align="center" prop="url" label="开屏页" width="200">
|
<el-table-column align="center" prop="url" label="开屏页" width="200">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-image style="width: 100%; height: 100px" :src="scope.row.url" :zoom-rate="1.1"
|
<el-image style="width: 100%; height: 100px" :src="scope.row.url" :zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.url]" fit="cover" preview-teleported="true"
|
:preview-src-list="[scope.row.url]" fit="scale-down" preview-teleported="true"
|
||||||
hide-on-click-modal="true" />
|
hide-on-click-modal="true" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
:src="scope.row.photoUrl"
|
:src="scope.row.photoUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.photoUrl]"
|
:preview-src-list="[scope.row.photoUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/></template>
|
/></template>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
style="width: 30px; height: 30px; vertical-align: middle; margin-right: 6px"
|
style="width: 30px; height: 30px; vertical-align: middle; margin-right: 6px"
|
||||||
:src="scope.row.picUrl"
|
:src="scope.row.picUrl"
|
||||||
:zoom-rate="1"
|
:zoom-rate="1"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -10,15 +10,30 @@
|
|||||||
<div class="big-tips">
|
<div class="big-tips">
|
||||||
数据量过大,不再默认加载所有的数据,请先选择时间后,再点查询按钮
|
数据量过大,不再默认加载所有的数据,请先选择时间后,再点查询按钮
|
||||||
</div>
|
</div>
|
||||||
<form id="searchForm" action="/admin/roomSerial/export" method="POST">
|
<form id="searchForm"
|
||||||
|
action="/admin/roomSerial/export"
|
||||||
|
method="POST">
|
||||||
房主平台号(多个查询以英文逗号分隔):
|
房主平台号(多个查询以英文逗号分隔):
|
||||||
<input type="text" name="erbanNos" id="erbanNos" class="input-sm" style="margin-right: 40px;display: inline-block;"/> 选择时间:
|
<input type="text"
|
||||||
<input type="text" name="startTime" id="startTime" class="input-sm" /> 至
|
name="erbanNos"
|
||||||
<input type="text" id="endTime" name="endTime" class="input-sm" />
|
id="erbanNos"
|
||||||
|
class="input-sm"
|
||||||
|
style="margin-right: 40px;display: inline-block;" /> 选择时间:
|
||||||
|
<input type="text"
|
||||||
|
name="startTime"
|
||||||
|
id="startTime"
|
||||||
|
class="input-sm" /> 至
|
||||||
|
<input type="text"
|
||||||
|
id="endTime"
|
||||||
|
name="endTime"
|
||||||
|
class="input-sm" />
|
||||||
<br />
|
<br />
|
||||||
<div style="width: 60%">
|
<div style="width: 60%">
|
||||||
房间类型:
|
房间类型:
|
||||||
<select name="isPermit" id="isPermit" class="input-sm" style="width: 30%;display: inline-block;">
|
<select name="isPermit"
|
||||||
|
id="isPermit"
|
||||||
|
class="input-sm"
|
||||||
|
style="width: 30%;display: inline-block;">
|
||||||
<option value="0">全部</option>
|
<option value="0">全部</option>
|
||||||
<option value="1">牌照房</option>
|
<option value="1">牌照房</option>
|
||||||
<option value="3">新秀房</option>
|
<option value="3">新秀房</option>
|
||||||
@@ -29,10 +44,12 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<button id="room-serial-refresh" class="btn btn-default">
|
<button id="room-serial-refresh"
|
||||||
|
class="btn btn-default">
|
||||||
<i class="glyphicon glyphicon-wrench"></i>查询
|
<i class="glyphicon glyphicon-wrench"></i>查询
|
||||||
</button>
|
</button>
|
||||||
<button id="room-serial-export" class="btn btn-default">
|
<button id="room-serial-export"
|
||||||
|
class="btn btn-default">
|
||||||
<i class="glyphicon glyphicon-plus"></i>导出
|
<i class="glyphicon glyphicon-plus"></i>导出
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,37 +57,40 @@
|
|||||||
</section>
|
</section>
|
||||||
<!-- .content -->
|
<!-- .content -->
|
||||||
|
|
||||||
<div
|
<div class="modal fade"
|
||||||
class="modal fade"
|
id="tipModal"
|
||||||
id="tipModal"
|
tabindex="-1"
|
||||||
tabindex="-1"
|
role="dialog"
|
||||||
role="dialog"
|
aria-labelledby="modalLabel">
|
||||||
aria-labelledby="modalLabel"
|
<div class="modal-dialog"
|
||||||
>
|
role="document">
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">提示信息</h4>
|
<h4 class="modal-title">提示信息</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="tipMsg"></div>
|
<div class="modal-body"
|
||||||
|
id="tipMsg"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="modal fade"
|
||||||
class="modal fade"
|
id="roomGiftSerialDetailModal"
|
||||||
id="roomGiftSerialDetailModal"
|
tabindex="-1"
|
||||||
tabindex="-1"
|
role="dialog"
|
||||||
role="dialog"
|
aria-labelledby="modalLabel">
|
||||||
aria-labelledby="modalLabel"
|
<div class="modal-dialog"
|
||||||
>
|
role="document">
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title" id="roomGiftSerialDetailModalTitle">房间明细</h4>
|
<h4 class="modal-title"
|
||||||
|
id="roomGiftSerialDetailModalTitle">房间明细</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="summary col-sm-12">
|
<div class="summary col-sm-12">
|
||||||
@@ -95,7 +115,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<h4 id="roundDetailModalFooter"></h4>
|
<h4 id="roundDetailModalFooter"></h4>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
|
<button type="button"
|
||||||
|
class="btn btn-default"
|
||||||
|
data-dismiss="modal">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,16 +131,16 @@ import { serverError } from "@/utils/maintainer";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RoomSerialView",
|
name: "RoomSerialView",
|
||||||
setup() {
|
setup () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData () {
|
||||||
// ComboboxHelper.build(null, '#isPermit');
|
// ComboboxHelper.build(null, '#isPermit');
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#table").bootstrapTable("destroy");
|
$("#table").bootstrapTable("destroy");
|
||||||
@@ -140,11 +162,10 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
},
|
},
|
||||||
{ field: "totalRadish", title: "萝卜流水", align: "center", width: "10%" },
|
// { field: "totalRadish", title: "萝卜流水", align: "center", width: "10%" },
|
||||||
{ field: "roomTitle", title: "房间标题", align: "center", width: "10%" },
|
{ field: "roomTitle", title: "房间标题", align: "center", width: "10%" },
|
||||||
{ field: "clanName", title: "公会名称", align: "center", width: "10%" },
|
{ field: "clanName", title: "公会名称", align: "center", width: "10%" },
|
||||||
{ field: "executionTime", title: "统计时间", align: "center", width: "15%" },
|
{ field: "executionTime", title: "统计时间", align: "center", width: "15%" },
|
||||||
{ field: "executionTime", title: "统计时间", align: "center", width: "15%" },
|
|
||||||
{
|
{
|
||||||
field: "id",
|
field: "id",
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -169,15 +190,11 @@ export default {
|
|||||||
cache: false,
|
cache: false,
|
||||||
striped: true,
|
striped: true,
|
||||||
showRefresh: false,
|
showRefresh: false,
|
||||||
pageSize: 10,
|
pagination: false,
|
||||||
pagination: true,
|
|
||||||
pageList: [1, 10, 20, 30, 50],
|
|
||||||
search: false,
|
search: false,
|
||||||
sidePagination: "server", //表示服务端请求
|
|
||||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
||||||
//设置为limit可以获取limit, offset, search, sort, order
|
//设置为limit可以获取limit, offset, search, sort, order
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams(params) {
|
queryParams: function queryParams (params) {
|
||||||
//设置查询参数
|
//设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
pageNumber: params.pageNumber,
|
pageNumber: params.pageNumber,
|
||||||
@@ -200,6 +217,7 @@ export default {
|
|||||||
onLoadError: function () {
|
onLoadError: function () {
|
||||||
//加载失败时执行
|
//加载失败时执行
|
||||||
console.log("load fail");
|
console.log("load fail");
|
||||||
|
enableRefreshBtn();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -219,7 +237,7 @@ export default {
|
|||||||
|
|
||||||
$("#room-serial-refresh").click(function () {
|
$("#room-serial-refresh").click(function () {
|
||||||
disableRefreshBtn();
|
disableRefreshBtn();
|
||||||
$("#table").bootstrapTable("refresh", { url: "/admin/roomSerial/listByPage" });
|
$("#table").bootstrapTable("refresh", { url: "/admin/roomSerial/list" });
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#room-serial-export").click(function () {
|
$("#room-serial-export").click(function () {
|
||||||
@@ -235,11 +253,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function disableRefreshBtn() {
|
function disableRefreshBtn () {
|
||||||
$("#room-serial-refresh").attr("disabled", "true");
|
$("#room-serial-refresh").attr("disabled", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableRefreshBtn() {
|
function enableRefreshBtn () {
|
||||||
$("#room-serial-refresh").removeAttr("disabled");
|
$("#room-serial-refresh").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +300,7 @@ export default {
|
|||||||
search: false,
|
search: false,
|
||||||
sidePagination: "server", //表示服务端请求
|
sidePagination: "server", //表示服务端请求
|
||||||
queryParamsType: "undefined",
|
queryParamsType: "undefined",
|
||||||
queryParams: function queryParams(params) {
|
queryParams: function queryParams (params) {
|
||||||
//设置查询参数
|
//设置查询参数
|
||||||
var param = {
|
var param = {
|
||||||
page: params.pageNumber,
|
page: params.pageNumber,
|
||||||
@@ -330,7 +348,7 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function apiResult(json) {
|
function apiResult (json) {
|
||||||
if (json.code == 200 && json.message == "success") {
|
if (json.code == 200 && json.message == "success") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
573
src/views/roomBackground/appUiSet.vue
Normal file
573
src/views/roomBackground/appUiSet.vue
Normal file
@@ -0,0 +1,573 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>说明:</span>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>头图尺寸:</span>
|
||||||
|
<div class="text">750*280</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>icon尺寸:</span>
|
||||||
|
<div class="text">80*80</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页头图:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess1"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl1" :src="inquire.imageUrl1" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(1)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页底图:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl2" :src="inquire.imageUrl2" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(2)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess3"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl3" :src="inquire.imageUrl3" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(3)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>首页icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess4"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl4" :src="inquire.imageUrl4" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(4)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>游戏icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess5"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl5" :src="inquire.imageUrl5" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(5)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>游戏icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess6"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl6" :src="inquire.imageUrl6" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(6)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>动态icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess7"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl7" :src="inquire.imageUrl7" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(7)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>动态icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess8"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl8" :src="inquire.imageUrl8" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(8)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>消息icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess9"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img v-if="inquire.imageUrl9" :src="inquire.imageUrl9" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(9)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>消息icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess10"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl10"
|
||||||
|
:src="inquire.imageUrl10"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(10)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>我的icon选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess11"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl11"
|
||||||
|
:src="inquire.imageUrl11"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(11)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>我的icon未选中状态:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess12"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl12"
|
||||||
|
:src="inquire.imageUrl12"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(12)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>横条icon:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess13"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="inquire.imageUrl13"
|
||||||
|
:src="inquire.imageUrl13"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<el-button class="primary but" type="primary" @click="defaultFun(13)"
|
||||||
|
>恢复默认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="inquireBox">
|
||||||
|
<span>背景颜色:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="inquire.color"
|
||||||
|
placeholder="例如:#FFFFFF"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
style="margin-bottom: 20px"
|
||||||
|
class="primary but"
|
||||||
|
type="primary"
|
||||||
|
@click="seave()"
|
||||||
|
>保存设置</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
appUiSetting,
|
||||||
|
appUiSettingSave,
|
||||||
|
} from "@/api/roomBackground/roomBackground";
|
||||||
|
// @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: "appUiSet",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inquire: {
|
||||||
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
|
imageUrl3: "",
|
||||||
|
imageUrl4: "",
|
||||||
|
imageUrl5: "",
|
||||||
|
imageUrl6: "",
|
||||||
|
imageUrl7: "",
|
||||||
|
imageUrl8: "",
|
||||||
|
imageUrl9: "",
|
||||||
|
imageUrl10: "",
|
||||||
|
imageUrl11: "",
|
||||||
|
imageUrl12: "",
|
||||||
|
imageUrl13: "",
|
||||||
|
color: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
appUiSetting().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(res.data);
|
||||||
|
this.inquire.imageUrl1 = res.data.headIcon;
|
||||||
|
this.inquire.imageUrl2 = res.data.navbar;
|
||||||
|
this.inquire.imageUrl3 = res.data.homeSelectIcon;
|
||||||
|
this.inquire.imageUrl4 = res.data.homeUnSelectIcon;
|
||||||
|
this.inquire.imageUrl5 = res.data.gameSelectIcon;
|
||||||
|
this.inquire.imageUrl6 = res.data.gameUnSelectIcon;
|
||||||
|
this.inquire.imageUrl7 = res.data.dynamicSelectIcon;
|
||||||
|
this.inquire.imageUrl8 = res.data.dynamicUnSelectIcon;
|
||||||
|
this.inquire.imageUrl9 = res.data.msgSelectIcon;
|
||||||
|
this.inquire.imageUrl10 = res.data.msgUnSelectIcon;
|
||||||
|
this.inquire.imageUrl11 = res.data.mineSelectIcon;
|
||||||
|
this.inquire.imageUrl12 = res.data.mineUnSelectIcon;
|
||||||
|
this.inquire.imageUrl13 = res.data.selectBar;
|
||||||
|
this.inquire.color = res.data.backgroundColor;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
seave() {
|
||||||
|
var obj = {
|
||||||
|
headIcon: this.inquire.imageUrl1,
|
||||||
|
navbar: this.inquire.imageUrl2,
|
||||||
|
homeSelectIcon: this.inquire.imageUrl3,
|
||||||
|
homeUnSelectIcon: this.inquire.imageUrl4,
|
||||||
|
gameSelectIcon: this.inquire.imageUrl5,
|
||||||
|
gameUnSelectIcon: this.inquire.imageUrl6,
|
||||||
|
dynamicSelectIcon: this.inquire.imageUrl7,
|
||||||
|
dynamicUnSelectIcon: this.inquire.imageUrl8,
|
||||||
|
msgSelectIcon: this.inquire.imageUrl9,
|
||||||
|
msgUnSelectIcon: this.inquire.imageUrl10,
|
||||||
|
mineSelectIcon: this.inquire.imageUrl11,
|
||||||
|
mineUnSelectIcon: this.inquire.imageUrl12,
|
||||||
|
selectBar: this.inquire.imageUrl13,
|
||||||
|
backgroundColor: this.inquire.color,
|
||||||
|
};
|
||||||
|
// obj = JSON.stringify(obj);
|
||||||
|
appUiSettingSave(obj).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
defaultFun(num){
|
||||||
|
console.log(this.inquire);
|
||||||
|
console.log(this.inquire[`imageUrl${num}`]);
|
||||||
|
this.inquire[`imageUrl${num}`] = '';
|
||||||
|
console.log(this.inquire);
|
||||||
|
},
|
||||||
|
handleAvatarSuccess1(res, file) {
|
||||||
|
this.inquire.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
this.inquire.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess3(res, file) {
|
||||||
|
this.inquire.imageUrl3 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess4(res, file) {
|
||||||
|
this.inquire.imageUrl4 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess5(res, file) {
|
||||||
|
this.inquire.imageUrl5 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess6(res, file) {
|
||||||
|
this.inquire.imageUrl6 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess7(res, file) {
|
||||||
|
this.inquire.imageUrl7 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess8(res, file) {
|
||||||
|
this.inquire.imageUrl8 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess9(res, file) {
|
||||||
|
this.inquire.imageUrl9 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess10(res, file) {
|
||||||
|
this.inquire.imageUrl10 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess11(res, file) {
|
||||||
|
this.inquire.imageUrl11 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess12(res, file) {
|
||||||
|
this.inquire.imageUrl12 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess13(res, file) {
|
||||||
|
this.inquire.imageUrl13 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.inquireBox {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-right: 20px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.but {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialogTableVisibleBut {
|
||||||
|
display: block;
|
||||||
|
margin: 30px 0 0 830px;
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.dialogBox {
|
||||||
|
width: 100%;
|
||||||
|
// height: 50px;
|
||||||
|
// line-height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
683
src/views/roomBackground/roomBackground.vue
Normal file
683
src/views/roomBackground/roomBackground.vue
Normal file
@@ -0,0 +1,683 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select v-model="inquire.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 名称 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span class="demonstration">id</span>
|
||||||
|
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 状态 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>状态</span>
|
||||||
|
<el-select v-model="inquire.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.statusArr"
|
||||||
|
:key="item.status"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.status"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
tableData = [];
|
||||||
|
currentPage = 1;
|
||||||
|
isFinished = false;
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<!-- 重置按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.partitionId = '';
|
||||||
|
inquire.id = '';
|
||||||
|
inquire.status = '';
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置按钮</el-button
|
||||||
|
>
|
||||||
|
<!-- 新增按钮 -->
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
dialogVisibleTitle = '新增';
|
||||||
|
dialogVisibleTitleType = 1;
|
||||||
|
dialogObj.checkedArr = [];
|
||||||
|
dialogObj.radio = '0';
|
||||||
|
dialogObj.imageUrl1 = '';
|
||||||
|
dialogObj.imageUrl2 = '';
|
||||||
|
dialogObj.imageUrl3 = '';
|
||||||
|
dialogObj.price = '';
|
||||||
|
dialogObj.renew = '';
|
||||||
|
dialogObj.originalPrice = '';
|
||||||
|
dialogObj.day = '';
|
||||||
|
dialogObj.sort = '';
|
||||||
|
dialogObj.radio2 = '1';
|
||||||
|
dialogVisible = true;
|
||||||
|
"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="id" />
|
||||||
|
<el-table-column prop="type" align="center" label="是否免费">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.type == 0 ? "免费" : scope.row.type == 1 ? "付费" : "自定义"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="buyGoldPrice" align="center" label="购买价格" />
|
||||||
|
<el-table-column prop="renewGoldPrice" align="center" label="续费价格" />
|
||||||
|
<el-table-column prop="originalGoldPrice" align="center" label="原价" />
|
||||||
|
<el-table-column prop="buyHour" align="center" label="有效期" />
|
||||||
|
<el-table-column prop="seq" align="center" label="排序" />
|
||||||
|
<el-table-column prop="status" align="center" label="上架状态">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.status == 1 ? "上架" : "下架"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="url" align="center" label="图片">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.url"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.url]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
<!-- <div
|
||||||
|
v-show="scope.row.url.toLowerCase().endsWith('.svga')"
|
||||||
|
:id="'guide' + scope.row.id"
|
||||||
|
class="game-guide"
|
||||||
|
>
|
||||||
|
{{ guideFn(scope.row.id, scope.row.url) }}
|
||||||
|
</div> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" align="center" label="创建时间" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||||
|
<el-table-column prop="adminUser" align="center" label="操作人" />
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
dialogVisibleTitle = '编辑';
|
||||||
|
dialogVisibleTitleType = 2;
|
||||||
|
dialogObj.checkedArr = checkedArrFun(scope.row.partitionFlag);
|
||||||
|
dialogObj.radio = scope.row.type.toString();
|
||||||
|
dialogObj.price = scope.row.buyGoldPrice;
|
||||||
|
dialogObj.renew = scope.row.renewGoldPrice;
|
||||||
|
dialogObj.originalPrice = scope.row.originalGoldPrice;
|
||||||
|
dialogObj.day = scope.row.buyHour;
|
||||||
|
dialogObj.sort = scope.row.seq;
|
||||||
|
dialogObj.radio2 = scope.row.status.toString();
|
||||||
|
dialogObj.imageUrl2 = scope.row.url;
|
||||||
|
dialogObj.imageUrl1 = '';
|
||||||
|
dialogObj.imageUrl3 = '';
|
||||||
|
dialogObj.id = scope.row.id;
|
||||||
|
dialogVisible = true;
|
||||||
|
"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<!-- <el-button class="primary" type="primary" @click="del(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
> -->
|
||||||
|
<!-- 删除弹出框 -->
|
||||||
|
<!-- <el-popover
|
||||||
|
v-model:visible="scope.row.visible1"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要删除么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible1 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="pass(scope.row.id)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
class="danger"
|
||||||
|
type="danger"
|
||||||
|
@click="scope.row.visible1 = true"
|
||||||
|
>删除</el-button
|
||||||
|
> -->
|
||||||
|
<!-- </template>
|
||||||
|
</el-popover> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
v-model:current-page="currentPage"
|
||||||
|
v-model:page-size="pageSize"
|
||||||
|
:page-sizes="[1, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 新增或编辑 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="dialogVisible"
|
||||||
|
:title="dialogVisibleTitle"
|
||||||
|
center
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>分区:</span>
|
||||||
|
<el-checkbox-group v-model="dialogObj.checkedArr">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="(item, i) in inquire.partitionArr"
|
||||||
|
:key="i"
|
||||||
|
:label="item.id"
|
||||||
|
>{{ item.desc }}</el-checkbox
|
||||||
|
>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>是否免费:</span>
|
||||||
|
<div>
|
||||||
|
<el-radio v-model="dialogObj.radio" label="0">是</el-radio>
|
||||||
|
<el-radio v-model="dialogObj.radio" label="1">否</el-radio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="dialogBox">
|
||||||
|
<span>房内图标:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dialogObj.imageUrl1"
|
||||||
|
:src="dialogObj.imageUrl1"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div> -->
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>购买价格:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.price"
|
||||||
|
placeholder="如果是免费请写0"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>续费价格:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.renew"
|
||||||
|
placeholder="如果是免费请写0"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>原价:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.originalPrice"
|
||||||
|
placeholder="如果是免费请写0"
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>有效天数:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.day"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>排序:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="dialogObj.sort"
|
||||||
|
placeholder=""
|
||||||
|
class="input"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>状态:</span>
|
||||||
|
<div>
|
||||||
|
<el-radio v-model="dialogObj.radio2" label="1">上架</el-radio>
|
||||||
|
<el-radio v-model="dialogObj.radio2" label="-1">下架</el-radio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dialogBox">
|
||||||
|
<span>背景图片:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess2"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<!-- 这里是原来的图片预览 -->
|
||||||
|
<el-image
|
||||||
|
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="dialogObj.imageUrl2"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
<!-- <div
|
||||||
|
v-show="dialogObj.imageUrl2.toLowerCase().endsWith('.svga')"
|
||||||
|
id="guide2"
|
||||||
|
class="game-guide"
|
||||||
|
>
|
||||||
|
{{ guideFn2(dialogObj.imageUrl2) }}
|
||||||
|
</div> -->
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="dialogBox">
|
||||||
|
<span>动效图片:</span>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="/admin/tencent/cos/upload/file"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess3"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:on-error="handleAvatarError"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="dialogObj.imageUrl3"
|
||||||
|
:src="dialogObj.imageUrl3"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</div> -->
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="addNeid(dialogVisibleTitleType)"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listPartitionInfo,
|
||||||
|
page,
|
||||||
|
roomBackgroundAdd,
|
||||||
|
roomBackgroundUpdate,
|
||||||
|
} from "@/api/roomBackground/roomBackground";
|
||||||
|
// @ts-ignore
|
||||||
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
|
// @ts-ignore
|
||||||
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
import { ref, onMounted, nextTick } from "vue";
|
||||||
|
import SVGA from "svgaplayerweb";
|
||||||
|
export default {
|
||||||
|
name: "roomBackground",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
id: "",
|
||||||
|
status: "",
|
||||||
|
statusArr: [
|
||||||
|
{
|
||||||
|
status: "1",
|
||||||
|
desc: "上架",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
status: "-1",
|
||||||
|
desc: "下架",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [],
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
isLoading: false, // 加载状态
|
||||||
|
isFinished: false, // 是否加载完成
|
||||||
|
// 删除相关
|
||||||
|
visible: false,
|
||||||
|
// 编辑新增
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogVisibleTitle: "新增",
|
||||||
|
dialogVisibleTitleType: 1, //1新增2编辑
|
||||||
|
dialogObj: {
|
||||||
|
checkedArr: [],
|
||||||
|
radio: "1",
|
||||||
|
imageUrl1: "",
|
||||||
|
imageUrl2: "",
|
||||||
|
imageUrl3: "",
|
||||||
|
price: "",
|
||||||
|
renew: "",
|
||||||
|
originalPrice: "",
|
||||||
|
day: "",
|
||||||
|
sort: "",
|
||||||
|
radio2: "1",
|
||||||
|
id: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
guideFn(id, url) {
|
||||||
|
// 等待 DOM 渲染完成
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const guideElement = document.getElementById("guide" + id);
|
||||||
|
if (guideElement && url.toLowerCase().endsWith(".svga")) {
|
||||||
|
let player = new SVGA.Player(guideElement);
|
||||||
|
let parser = new SVGA.Parser();
|
||||||
|
parser.load(url, (videoItem) => {
|
||||||
|
// 你的svga文件路径
|
||||||
|
player.setVideoItem(videoItem);
|
||||||
|
player.startAnimation(); // 开始动画
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
guideFn2(url) {
|
||||||
|
// 等待 DOM 渲染完成
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const guideElement = document.getElementById("guide2");
|
||||||
|
if (guideElement && url.toLowerCase().endsWith(".svga")) {
|
||||||
|
let player = new SVGA.Player(guideElement);
|
||||||
|
let parser = new SVGA.Parser();
|
||||||
|
parser.load(url, (videoItem) => {
|
||||||
|
// 你的 svga 文件路径
|
||||||
|
player.setVideoItem(videoItem);
|
||||||
|
player.startAnimation(); // 开始动画
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.isLoading = true;
|
||||||
|
this.loading = true;
|
||||||
|
let time = this.inquire.time;
|
||||||
|
let startTime = "";
|
||||||
|
let endTime = "";
|
||||||
|
if (time && time.length > 0) {
|
||||||
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
}
|
||||||
|
page({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
id: this.inquire.id,
|
||||||
|
status: this.inquire.status,
|
||||||
|
page: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认新增/确认编辑
|
||||||
|
addNeid(type) {
|
||||||
|
if (type == 1) {
|
||||||
|
var partitionIdNum = this.dialogObj.checkedArr.reduce(
|
||||||
|
(accumulator, currentValue) => {
|
||||||
|
return accumulator + currentValue;
|
||||||
|
},
|
||||||
|
0
|
||||||
|
);
|
||||||
|
roomBackgroundAdd({
|
||||||
|
partitionId: partitionIdNum,
|
||||||
|
type: this.dialogObj.radio,
|
||||||
|
buyGoldPrice: this.dialogObj.price,
|
||||||
|
renewGoldPrice: this.dialogObj.renew,
|
||||||
|
originalGoldPrice: this.dialogObj.originalPrice,
|
||||||
|
buyHour: this.dialogObj.day,
|
||||||
|
seq: this.dialogObj.sort,
|
||||||
|
status: this.dialogObj.radio2,
|
||||||
|
url: this.dialogObj.imageUrl2,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var partitionIdNumEid = this.dialogObj.checkedArr.reduce(
|
||||||
|
(accumulator, currentValue) => {
|
||||||
|
return accumulator + currentValue;
|
||||||
|
},
|
||||||
|
0
|
||||||
|
);
|
||||||
|
roomBackgroundUpdate({
|
||||||
|
partitionId: partitionIdNumEid,
|
||||||
|
type: this.dialogObj.radio,
|
||||||
|
buyGoldPrice: this.dialogObj.price,
|
||||||
|
renewGoldPrice: this.dialogObj.renew,
|
||||||
|
originalGoldPrice: this.dialogObj.originalPrice,
|
||||||
|
buyHour: this.dialogObj.day,
|
||||||
|
seq: this.dialogObj.sort,
|
||||||
|
status: this.dialogObj.radio2,
|
||||||
|
url: this.dialogObj.imageUrl2,
|
||||||
|
id: this.dialogObj.id,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkedArrFun(num) {
|
||||||
|
const arr = this.inquire.partitionArr
|
||||||
|
.filter((p) => {
|
||||||
|
return num == 0 || p.id == (p.id & num);
|
||||||
|
})
|
||||||
|
.map((p) => p.id);
|
||||||
|
return arr;
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess3(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl3 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传失败!",
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页导航
|
||||||
|
handleSizeChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.box {
|
||||||
|
padding-top: 20px;
|
||||||
|
background: #ecf0f5;
|
||||||
|
.inquire {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20px;
|
||||||
|
span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
width: 180px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialogTableVisibleBut {
|
||||||
|
display: block;
|
||||||
|
margin: 30px 0 0 830px;
|
||||||
|
}
|
||||||
|
.paginationClass {
|
||||||
|
margin: 15px 0 5px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.dialogBox {
|
||||||
|
width: 100%;
|
||||||
|
// height: 50px;
|
||||||
|
// line-height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.game-guide {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
// left: 50%;
|
||||||
|
// top: 50%;
|
||||||
|
// transform: translate(-50%,-50%);
|
||||||
|
canvas {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
425
src/views/roomBackground/roomBackgroundCustom.vue
Normal file
425
src/views/roomBackground/roomBackgroundCustom.vue
Normal file
@@ -0,0 +1,425 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<!-- 查询 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<el-select v-model="inquire.partitionId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in inquire.partitionArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.desc"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<!-- 名称 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span class="demonstration">用户ID</span>
|
||||||
|
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||||
|
</div>
|
||||||
|
<!-- 查询按钮 -->
|
||||||
|
<el-button class="primary" type="primary" @click="getData()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
inquire.partitionId = null;
|
||||||
|
inquire.id = null;
|
||||||
|
getData();
|
||||||
|
"
|
||||||
|
>重置搜索</el-button
|
||||||
|
>
|
||||||
|
<!-- 表格 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
ref="multipleTable"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
border
|
||||||
|
style="width: 100%; margin-top: 25px"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" align="center" label="数字" />
|
||||||
|
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||||
|
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="所在区" />
|
||||||
|
<el-table-column prop="createTime" align="center" label="申请时间" />
|
||||||
|
<el-table-column prop="url" align="center" label="图片">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-image
|
||||||
|
v-if="scope.row.url"
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.url"
|
||||||
|
:zoom-rate="1.1"
|
||||||
|
:preview-src-list="[scope.row.url]"
|
||||||
|
fit="scale-down"
|
||||||
|
preview-teleported="true"
|
||||||
|
hide-on-click-modal="true"
|
||||||
|
/>
|
||||||
|
<div v-else>/</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" align="center" label="状态">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.status < 0
|
||||||
|
? "过期"
|
||||||
|
: scope.row.status == 0
|
||||||
|
? "审核中"
|
||||||
|
: scope.row.status == 1
|
||||||
|
? "通过"
|
||||||
|
: "不通过"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="updateTime" align="center" label="审核时间" />
|
||||||
|
<el-table-column prop="adminUser" align="center" label="操作人">
|
||||||
|
<template v-slot="scope">{{
|
||||||
|
scope.row.adminUser ? scope.row.adminUser : "-"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="300">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<!-- 通过弹出框 -->
|
||||||
|
<el-popover
|
||||||
|
v-model:visible="scope.row.visible1"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要通过么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible1 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="pass(scope.row.id)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
v-show="scope.row.status == 0"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="scope.row.visible1 = true"
|
||||||
|
>通过</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
|
<!-- 拒绝弹出框 -->
|
||||||
|
<el-popover
|
||||||
|
v-model:visible="scope.row.visible2"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要拒绝么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible2 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="reject(scope.row.id)"
|
||||||
|
>
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
v-show="scope.row.status == 0"
|
||||||
|
class="primary"
|
||||||
|
type="primary"
|
||||||
|
@click="scope.row.visible2 = true"
|
||||||
|
>拒绝</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
|
<!-- 删除弹出框 -->
|
||||||
|
<el-popover
|
||||||
|
v-model:visible="scope.row.visible3"
|
||||||
|
placement="top"
|
||||||
|
:width="160"
|
||||||
|
>
|
||||||
|
<p>确定要删除么?</p>
|
||||||
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" @click="scope.row.visible3 = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" type="primary" @click="del(scope.row.id)">
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button
|
||||||
|
class="danger"
|
||||||
|
type="danger"
|
||||||
|
@click="scope.row.visible3 = true"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popover></template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
style="margin-top: 10px"
|
||||||
|
class="paginationClass"
|
||||||
|
v-model:current-page="currentPage"
|
||||||
|
v-model:page-size="pageSize"
|
||||||
|
:page-sizes="[1, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listPartitionInfo,
|
||||||
|
customPage,
|
||||||
|
customPass,
|
||||||
|
customReject,
|
||||||
|
customDel,
|
||||||
|
} from "@/api/roomBackground/roomBackground";
|
||||||
|
// @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: "roomBackgroundCustom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//查询所需条件对象
|
||||||
|
inquire: {
|
||||||
|
partitionId: "",
|
||||||
|
partitionArr: [],
|
||||||
|
id: "",
|
||||||
|
},
|
||||||
|
// 表格
|
||||||
|
tableData: [{ x: "x" }],
|
||||||
|
// 分页
|
||||||
|
total: 0, //总页数
|
||||||
|
currentPage: 1, //页码
|
||||||
|
pageSize: 10, //条数
|
||||||
|
// 删除相关
|
||||||
|
// visible1: false,
|
||||||
|
// visible2: false,
|
||||||
|
// visible3: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loading = true;
|
||||||
|
listPartitionInfo().then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.inquire.partitionArr = res.data;
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询接口
|
||||||
|
getData() {
|
||||||
|
this.loading = true;
|
||||||
|
customPage({
|
||||||
|
partitionId: this.inquire.partitionId,
|
||||||
|
erbanNo: this.inquire.id,
|
||||||
|
pageNum: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.tableData = res.data.rows;
|
||||||
|
this.total = res.data.total;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 通过
|
||||||
|
pass(id) {
|
||||||
|
customPass({ id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 拒绝
|
||||||
|
reject(id) {
|
||||||
|
customReject({ id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
del(id) {
|
||||||
|
customDel({ id }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl1 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess2(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl2 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess3(res, file) {
|
||||||
|
console.log(file);
|
||||||
|
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||||
|
this.dialogObj.imageUrl3 = file.response.data;
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功!",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeAvatarUpload() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传中~",
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarError() {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.pagination {
|
||||||
|
margin: 10px auto 10px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pagination_in {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.dialogBox {
|
||||||
|
width: 100%;
|
||||||
|
// height: 50px;
|
||||||
|
// line-height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
.input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.selectBox {
|
||||||
|
display: flex;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@@ -24,6 +24,7 @@
|
|||||||
<option value="">请选择...</option>
|
<option value="">请选择...</option>
|
||||||
<option value="0">金币</option>
|
<option value="0">金币</option>
|
||||||
<option value="1">背包礼物</option>
|
<option value="1">背包礼物</option>
|
||||||
|
<option value="2">web-api金币</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -163,6 +164,8 @@ export default {
|
|||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
if (row.type == 0) {
|
if (row.type == 0) {
|
||||||
return '金币'
|
return '金币'
|
||||||
|
}else if(row.type == 2){
|
||||||
|
return 'web-api金币';
|
||||||
} else {
|
} else {
|
||||||
return '背包礼物';
|
return '背包礼物';
|
||||||
}
|
}
|
||||||
|
@@ -69,7 +69,7 @@
|
|||||||
:src="scope.row.screenUrl"
|
:src="scope.row.screenUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="scope.row.screenUrl"
|
:preview-src-list="scope.row.screenUrl"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
:src="scope.row.giftUrl"
|
:src="scope.row.giftUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.giftUrl]"
|
:preview-src-list="[scope.row.giftUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
:src="scope.row.giftUrl"
|
:src="scope.row.giftUrl"
|
||||||
:zoom-rate="1.1"
|
:zoom-rate="1.1"
|
||||||
:preview-src-list="[scope.row.giftUrl]"
|
:preview-src-list="[scope.row.giftUrl]"
|
||||||
fit="cover"
|
fit="scale-down"
|
||||||
preview-teleported="true"
|
preview-teleported="true"
|
||||||
hide-on-click-modal="true"
|
hide-on-click-modal="true"
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user