新增大R用户列表和移除大R列表
This commit is contained in:
25
src/api/listLargeRUsers/listLargeRUsers.js
Normal file
25
src/api/listLargeRUsers/listLargeRUsers.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request';
|
||||
// 获取大R列表
|
||||
export const getHighRechargeUserList = query => {
|
||||
return request({
|
||||
url: '/admin/recharge/highRechargeUser/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 移除大R
|
||||
export const delHighRechargeUser = query => {
|
||||
return request({
|
||||
url: '/admin/recharge/highRechargeUser/del',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 添加大R
|
||||
export const addHighRechargeUser = query => {
|
||||
return request({
|
||||
url: '/admin/recharge/highRechargeUser/add',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
199
src/views/users/listLargeRUsers.vue
Normal file
199
src/views/users/listLargeRUsers.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>平台ID:</span>
|
||||
<el-input v-model="formData.erbanNo" placeholder="" class="input" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>分区</span>
|
||||
<partition-select v-model:partition-id="formData.partitionId" />
|
||||
</div>
|
||||
<el-button style="" type="primary" @click="addDialog = true">新增</el-button>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button style="" type="primary" @click="resetFormData()">重置</el-button>
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="tableData.loading" :data="tableData.data" ref="multipleTable"
|
||||
@selection-change="handleSelectionChange" 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="partitionDesc" align="center" label="分区" />
|
||||
<el-table-column prop="regionDesc" align="center" label="国家" />
|
||||
<el-table-column prop="totalGold" align="center" label="总充值金额" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button class="primary" type="primary" @click="
|
||||
detailPageFun(scope.row);
|
||||
" size="default">移除大R</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adminUserName" align="center" label="操作人" />
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination style="margin-top: 10px" class="paginationClass" :current-page="formData.page"
|
||||
:page-size="formData.pageSize" :page-sizes="[10, 20, 50, 100, 200]" layout="sizes, prev, pager, next"
|
||||
:total="tableData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||
|
||||
<el-dialog v-model="addDialog" title="新增" width="28%" center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">平台ID</span>
|
||||
<el-input v-model="addFormData.erbanNo" style="width: 50%" class="input"></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addFun()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, onMounted, reactive } from 'vue'
|
||||
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||
import { getHighRechargeUserList, delHighRechargeUser, addHighRechargeUser } from '@/api/listLargeRUsers/listLargeRUsers'
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: 'listLargeRUsers',
|
||||
components: {
|
||||
PartitionSelect
|
||||
},
|
||||
setup() {
|
||||
const formData = reactive({
|
||||
partitionId: undefined,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: '',
|
||||
type: 1
|
||||
})
|
||||
const addFormData = reactive({
|
||||
erbanNo: '',
|
||||
type: 1
|
||||
})
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
})
|
||||
const addDialog = ref(false)
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
getHighRechargeUserList(formData).then(res => {
|
||||
if (res.code == 200) {
|
||||
tableData.data = res.data.rows
|
||||
tableData.loading = false;
|
||||
tableData.total = res.data.total
|
||||
|
||||
} else {
|
||||
tableData.loading = false;
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
})
|
||||
};
|
||||
// 增加
|
||||
const addFun = () => {
|
||||
addHighRechargeUser(addFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('添加成功');
|
||||
addDialog.value = false
|
||||
addFormData.erbanNo = ''
|
||||
getData()
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
addDialog.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 移除
|
||||
const detailPageFun = (rows) => {
|
||||
ElMessageBox.confirm("确定要移出吗", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
delHighRechargeUser({
|
||||
uid: rows.uid
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
getData();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: "warning ",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
}
|
||||
//重置
|
||||
const resetFormData = () => {
|
||||
Object.assign(formData, {
|
||||
partitionId: 1,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: '',
|
||||
});
|
||||
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.page = val;
|
||||
getData();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
return {
|
||||
formData,
|
||||
getData,
|
||||
addDialog,
|
||||
addFormData,
|
||||
addFun,
|
||||
tableData,
|
||||
resetFormData,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
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;
|
||||
}
|
||||
}
|
||||
</style>
|
199
src/views/users/removeListLargeRUsers.vue
Normal file
199
src/views/users/removeListLargeRUsers.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>平台ID:</span>
|
||||
<el-input v-model="formData.erbanNo" placeholder="" class="input" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>分区</span>
|
||||
<partition-select v-model:partition-id="formData.partitionId" />
|
||||
</div>
|
||||
<el-button style="" type="primary" @click="addDialog = true">新增</el-button>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button style="" type="primary" @click="resetFormData()">重置</el-button>
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="tableData.loading" :data="tableData.data" ref="multipleTable"
|
||||
@selection-change="handleSelectionChange" 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="partitionDesc" align="center" label="分区" />
|
||||
<el-table-column prop="regionDesc" align="center" label="国家" />
|
||||
<el-table-column prop="totalGold" align="center" label="总充值金额" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button class="primary" type="primary" @click="
|
||||
detailPageFun(scope.row);
|
||||
" size="default">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adminUserName" align="center" label="操作人" />
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination style="margin-top: 10px" class="paginationClass" :current-page="formData.page"
|
||||
:page-size="formData.pageSize" :page-sizes="[10, 20, 50, 100, 200]" layout="sizes, prev, pager, next"
|
||||
:total="tableData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||
|
||||
<el-dialog v-model="addDialog" title="新增" width="28%" center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">平台ID</span>
|
||||
<el-input v-model="addFormData.erbanNo" style="width: 50%" class="input"></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addFun()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, onMounted, reactive } from 'vue'
|
||||
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||
import { getHighRechargeUserList, delHighRechargeUser, addHighRechargeUser } from '@/api/listLargeRUsers/listLargeRUsers'
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: 'removeListLargeRUsers',
|
||||
components: {
|
||||
PartitionSelect
|
||||
},
|
||||
setup() {
|
||||
const formData = reactive({
|
||||
partitionId: undefined,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: '',
|
||||
type: -1
|
||||
})
|
||||
const addFormData = reactive({
|
||||
erbanNo: '',
|
||||
type: -1
|
||||
})
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
})
|
||||
const addDialog = ref(false)
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
getHighRechargeUserList(formData).then(res => {
|
||||
if (res.code == 200) {
|
||||
tableData.data = res.data.rows
|
||||
tableData.loading = false;
|
||||
tableData.total = res.data.total
|
||||
|
||||
} else {
|
||||
tableData.loading = false;
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
})
|
||||
};
|
||||
// 增加
|
||||
const addFun = () => {
|
||||
addHighRechargeUser(addFormData).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('添加成功');
|
||||
addDialog.value = false
|
||||
addFormData.erbanNo = ''
|
||||
getData()
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
addDialog.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 移除
|
||||
const detailPageFun = (rows) => {
|
||||
ElMessageBox.confirm("确定要移出吗", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
delHighRechargeUser({
|
||||
uid: rows.uid
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
getData();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage({
|
||||
type: "warning ",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
}
|
||||
//重置
|
||||
const resetFormData = () => {
|
||||
Object.assign(formData, {
|
||||
partitionId: 1,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: '',
|
||||
});
|
||||
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.page = val;
|
||||
getData();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
return {
|
||||
formData,
|
||||
getData,
|
||||
addDialog,
|
||||
addFormData,
|
||||
addFun,
|
||||
tableData,
|
||||
resetFormData,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
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;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user