This commit is contained in:
张良(004796)
2024-03-04 18:57:53 +08:00
commit ca842d24f3
491 changed files with 53313 additions and 0 deletions

View File

@@ -0,0 +1,152 @@
<template>
<el-dialog title="账户明细" :close-on-click-modal="false" :visible.sync="open" width="1000px" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="账户类型" prop="accountType">
<el-select v-model="queryParams.accountType" placeholder="账户类型" clearable size="small">
<el-option
v-for="dict in accountTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="业务操作" prop="cateId">
<el-select v-model="queryParams.cateId" placeholder="业务操作" clearable size="small">
<el-option
v-for="dict in changeTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountChangeLogList" >
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="账户类型" align="center" prop="accountType" >
<template v-slot="scope">
<cai-dict-tag :options="accountTypeList" :value="scope.row.accountType"/>
</template>
</el-table-column>
<el-table-column label="业务操作" align="center" prop="cateAdminName" />
<el-table-column label="变动" align="center" prop="changeValue" />
<el-table-column label="说明" align="center" prop="remark" min-width="200">
<template v-slot="scope">
<div class="context-avatar-center">
<span>{{scope.row.showMessage}}</span><image-preview v-if="scope.row.tarImg" :src="scope.row.tarImg" :width="32" :height="32"/>
</div>
</template>
</el-table-column>
<el-table-column label="后台操作" align="center" prop="isAdmin" >
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.isAdmin"/>
</template>
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" min-width="120" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
</template>
</el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
import { listMemberPrice } from '@/api/cai/memberPrice'
import { addUserMember } from '@/api/cai/userMember'
import {updateAccountCoin} from "@/api/cai/account";
import {listGoods} from "@/api/cai/goods";
import {accountTypeList, yesOrNoList} from "@/constant/statusMap";
import {listAccountChangeLog, listChangeType} from "@/api/cai/accountChangeLog";
export default {
components: {
},
data () {
return {
accountTypeList,yesOrNoList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 账户明细表格数据
accountChangeLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
accountType: undefined,
cateId: undefined
},
changeTypeList:[],
}
},
created() {
},
methods: {
init (id) {
this.open = true;
this.queryParams.userId = id
this.getList();
listChangeType().then(res => {
this.changeTypeList = res.data
})
},
/** 查询账户明细列表 */
getList() {
this.loading = true;
listAccountChangeLog(this.queryParams).then(response => {
this.accountChangeLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
}
}
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="调整账户" prop="rechargeType">
<el-radio-group v-model="form.rechargeType">
<el-radio :label="1">余额调整</el-radio>
<el-radio :label="2">收益调整</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="调整金额" prop="rechargeCoin">
<el-input v-model="form.rechargeCoin" placeholder="请输入" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入" />
</el-form-item>
<el-form-item :label="systemName+'号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="昵称" v-if="info.nickname">
{{ info.nickname }} {{ info.usercode }}
</el-form-item>
<el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/>
</el-form-item>
<el-form-item>
注意调整金额为负减余额正则加余额 请保证余额不能减为负数
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
import { listMemberPrice } from '@/api/cai/memberPrice'
import { addUserMember } from '@/api/cai/userMember'
import {updateAccountCoin} from "@/api/cai/account";
import {listGoods} from "@/api/cai/goods";
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
usercode: undefined,
rechargeType: undefined,
rechargeCoin: undefined,
remark: undefined
},
info:{
},
// 表单校验
rules: {
usercode: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
rechargeType: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
rechargeCoin: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
remark: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init () {
this.open = true;
this.title = "调整用户账号"
this.info = {};
this.form.usercode = undefined
this.form.rechargeCoin = undefined
this.form.remark = undefined
},
querySearch(querySearch,cb){
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal,
};
}))
})
},
handleSelect(item){
getUserByUsercode(item.value).then(res => {
this.info = res.data
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateAccountCoin(this.form).then(data => {
this.$modal.msgSuccess("操作成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,179 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:account:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="余额" align="center" prop="coin"/>
<el-table-column label="收益" align="center" prop="incomeCoin"/>
<el-table-column label="充值总额" align="center" prop="totalBuyMoney"/>
<el-table-column label="充值总紫贝" align="center" prop="totalBuyCoin"/>
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="userStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleInfo(scope.row)"
>账户明细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<add-account-dialog v-if="addAccountDialogVisible" ref="addAccountDialog" @refreshDataList="getList"/>
<account-change-info v-if="accountChangeInfoVisible" ref="accountChangeInfo" />
</div>
</template>
<script>
import {listAccount} from "@/api/cai/account";
import {genderList, isAnchorList, userStatusList, yesOrNoList} from "@/constant/statusMap";
import AddAccountDialog from "@/views/cai/account/add-account-dialog";
import AccountChangeInfo from "@/views/cai/account/account-change-info";
export default {
name: "Account",
components:{
AccountChangeInfo,
AddAccountDialog
},
data() {
return {
genderList, userStatusList, yesOrNoList, isAnchorList,
addAccountDialogVisible: false,
accountChangeInfoVisible: false,
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户账户表格数据
accountList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined
},
};
},
created() {
this.getList();
},
methods: {
handleInfo(row){
this.accountChangeInfoVisible = true
this.$nextTick(() => {
this.$refs.accountChangeInfo.init(row.userId)
})
},
/** 查询用户账户列表 */
getList() {
this.loading = true;
listAccount(this.queryParams).then(response => {
this.accountList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleAdd(row) {
this.addAccountDialogVisible = true
this.$nextTick(() => {
this.$refs.addAccountDialog.init(row?.usercode)
})
},
}
};
</script>

View File

@@ -0,0 +1,349 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="银行编码" prop="bankCode">
<el-input
v-model="queryParams.bankCode"
placeholder="请输入银行编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="银行名称" prop="bank">
<el-input
v-model="queryParams.bank"
placeholder="请输入银行名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="持卡人姓名" prop="cardName">
<el-input
v-model="queryParams.cardName"
placeholder="请输入持卡人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="卡号" prop="cardAccount">
<el-input
v-model="queryParams.cardAccount"
placeholder="请输入卡号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:accountBankcard:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['cai:accountBankcard:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['cai:accountBankcard:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['cai:accountBankcard:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountBankcardList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="" align="center" prop="userId" />
<el-table-column label="账户类型 1 支付宝 2 微信 3 银行卡" align="center" prop="type" />
<el-table-column label="银行编码" align="center" prop="bankCode" />
<el-table-column label="银行名称" align="center" prop="bank" />
<el-table-column label="持卡人姓名" align="center" prop="cardName" />
<el-table-column label="卡号" align="center" prop="cardAccount" />
<el-table-column label="0 可用 1 不可用" align="center" prop="status" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:accountBankcard:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:accountBankcard:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改用户银行卡对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="" prop="userId">
<el-input v-model="form.userId" placeholder="请输入" />
</el-form-item>
<el-form-item label="银行编码" prop="bankCode">
<el-input v-model="form.bankCode" placeholder="请输入银行编码" />
</el-form-item>
<el-form-item label="银行名称" prop="bank">
<el-input v-model="form.bank" placeholder="请输入银行名称" />
</el-form-item>
<el-form-item label="持卡人姓名" prop="cardName">
<el-input v-model="form.cardName" placeholder="请输入持卡人姓名" />
</el-form-item>
<el-form-item label="卡号" prop="cardAccount">
<el-input v-model="form.cardAccount" placeholder="请输入卡号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listAccountBankcard, getAccountBankcard, delAccountBankcard, addAccountBankcard, updateAccountBankcard } from "@/api/cai/accountBankcard";
export default {
name: "AccountBankcard",
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户银行卡表格数据
accountBankcardList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
type: undefined,
bankCode: undefined,
bank: undefined,
cardName: undefined,
cardAccount: undefined,
status: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "不能为空", trigger: "blur" }
],
type: [
{ required: true, message: "账户类型 1 支付宝 2 微信 3 银行卡不能为空", trigger: "change" }
],
bankCode: [
{ required: true, message: "银行编码不能为空", trigger: "blur" }
],
bank: [
{ required: true, message: "银行名称不能为空", trigger: "blur" }
],
cardName: [
{ required: true, message: "持卡人姓名不能为空", trigger: "blur" }
],
cardAccount: [
{ required: true, message: "卡号不能为空", trigger: "blur" }
],
status: [
{ required: true, message: "0 可用 1 不可用不能为空", trigger: "change" }
],
createTime: [
{ required: true, message: "创建时间不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询用户银行卡列表 */
getList() {
this.loading = true;
listAccountBankcard(this.queryParams).then(response => {
this.accountBankcardList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
userId: undefined,
type: undefined,
bankCode: undefined,
bank: undefined,
cardName: undefined,
cardAccount: undefined,
status: undefined,
createTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加用户银行卡";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getAccountBankcard(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改用户银行卡";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateAccountBankcard(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addAccountBankcard(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除用户银行卡编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delAccountBankcard(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('cai/accountBankcard/export', {
...this.queryParams
}, `accountBankcard_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@@ -0,0 +1,82 @@
<template>
<el-dialog title="批量审核通过" :visible.sync="open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="headers"
:action="url"
:disabled="isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<p style="color: red">使用方法</p>
<p style="color: #00afff">1数据导出成excel</p>
<p style="color: #00afff">2根据excel中的数据进行手工打款</p>
<p style="color: #00afff">3将excel中的数据导回系统即可自动对excel中的数据自动审核通过</p>
<p style="color: red">删除excel中的数据可选择性的过滤掉数据不进行审核通过</p>
</div>
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitFileForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getToken } from '@/utils/auth'
export default {
components: {
},
data () {
return {
open: false,
headers: { Authorization: "Bearer " + getToken() },
isUploading: false,
url: process.env.VUE_APP_BASE_API + "/cai/accountCash/importAudit",
buttonLoading: false,
}
},
created() {
},
methods: {
init () {
this.open = true;
this.$nextTick(() => {
})
},
submitFileForm() {
this.$refs.upload.submit();
},
handleFileSuccess(response, file, fileList) {
this.open = false;
this.isUploading = false;
this.$refs.upload.clearFiles();
let resData = response.data
let message =
`<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>
<span>总数据量:`+resData.allNum+`</span> <br/>
<span style="color: #888a8e">无效数量:`+resData.ignoreNum+`</span> <br/>
<span style="color: blue">成功数量:`+resData.successNum+`</span> <br/>
<span style="color: red">失败数量:`+resData.failNum+`</span> <br/>
</div>
`
this.$alert(message, "导入结果", { dangerouslyUseHTMLString: true });
this.$emit('refreshDataList')
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.isUploading = true;
},
}
}
</script>

View File

@@ -0,0 +1,298 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="ID" prop="id">
<el-input
v-model="queryParams.id"
:placeholder="'请输入ID'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账户名称" prop="cardName">
<el-input
v-model="queryParams.cardName"
placeholder="请输入账户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账户" prop="cardAccount">
<el-input
v-model="queryParams.cardAccount"
placeholder="请输入账户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in cashStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-check"
size="mini"
:disabled="multiple"
v-hasPermi="['cai:accountCash:edit']"
@click="handleBatchSuccess"
>批量通过</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['cai:accountCash:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-upload"
size="mini"
@click="handleImport"
v-hasPermi="['cai:accountCash:edit']"
>导入(批量通过)</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountCashList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" width="60" />
<el-table-column label="订单号" align="center" prop="orderNo" show-overflow-tooltip/>
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="提现紫贝" align="center" prop="withdrawCoin" />
<el-table-column label="提现金额" align="center" prop="cashMoney" />
<el-table-column label="银行名称" align="center" prop="bank" />
<el-table-column label="账户名称" align="center" prop="cardName" />
<el-table-column label="账户" align="center" prop="cardAccount" />
<el-table-column label="状态" align="center" prop="status" >
<template v-slot="scope">
<cai-dict-tag :options="cashStatusList" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="createTime" width="140"/>
<el-table-column label="审核人IP" align="center" prop="operateIp" />
<el-table-column label="审核时间" align="center" prop="verifyTime" show-overflow-tooltip />
<el-table-column label="审核备注" align="center" prop="verifyRemark" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
@click="handleSuccess(scope.row)"
v-if="scope.row.status === 1"
v-hasPermi="['cai:accountCash:edit']"
>通过</el-button>
<el-button
size="mini"
type="text"
@click="handleFail(scope.row)"
v-if="scope.row.status === 1"
v-hasPermi="['cai:accountCash:edit']"
>不通过</el-button>
<el-button
size="mini"
type="text"
@click="handleClose(scope.row)"
v-if="scope.row.status === 1"
v-hasPermi="['cai:accountCash:edit']"
>取消</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<import-audit-account-cash-dialog v-if="importAuditAccountCashVisible" ref="importAuditAccountCash" @refreshDataList="getList" />
</div>
</template>
<script>
import {
accountCashBatchSuccess,
accountCashClose,
accountCashFail,
accountCashSuccess,
listAccountCash
} from '@/api/cai/accountCash'
import {cashStatusList} from '@/constant/statusMap'
import ImportAuditAccountCashDialog from '@/views/cai/accountCash/import-audit-account-cash-dialog.vue'
export default {
name: "AccountCash",
components:{
ImportAuditAccountCashDialog
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
cashStatusList,
importAuditAccountCashVisible:false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户提现记录表格数据
accountCashList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
orderNo: undefined,
cardName: undefined,
cardAccount: undefined,
status: 1,
id: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询用户提现记录列表 */
getList() {
this.loading = true;
listAccountCash(this.queryParams).then(response => {
this.accountCashList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleImport(){
this.importAuditAccountCashVisible = true
this.$nextTick(() => {
this.$refs.importAuditAccountCash.init()
})
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleSuccess(row) {
const id = row.id
this.$modal.confirm('是否确认通过该提现?').then(() => {
this.loading = true;
return accountCashSuccess(id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleFail(row) {
const id = row.id
this.$prompt('请输入拒绝理由', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^.{1,100}$/,
inputErrorMessage: '理由必填不超过100个字符'
}).then(({value}) => {
this.loading = true;
return accountCashFail(id,value);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleClose(row) {
const id = row.id
this.$modal.confirm('是否取消该提现?').then(() => {
this.loading = true;
return accountCashClose(id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleBatchSuccess() {
const ids = this.ids.split(",");
this.$modal.confirm('是否批量确认通过该提现?').then(() => {
this.loading = true;
return accountCashBatchSuccess(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('cai/accountCash/export', {
...this.queryParams
}, `提现记录_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@@ -0,0 +1,257 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账户类型" prop="accountType">
<el-select v-model="queryParams.accountType" placeholder="账户类型" clearable size="small">
<el-option
v-for="dict in accountTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="业务操作" prop="cateId">
<el-select v-model="queryParams.cateId" placeholder="业务操作" clearable size="small">
<el-option
v-for="dict in changeTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="accountChangeLogList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="账户类型" align="center" prop="accountType" >
<template v-slot="scope">
<cai-dict-tag :options="accountTypeList" :value="scope.row.accountType"/>
</template>
</el-table-column>
<el-table-column label="变动" align="center" prop="changeValue" >
<template v-slot="scope" >
<span :class="scope.row.changeValue >= 0 ?'font-red':'font-green'">{{scope.row.changeValue}}</span>
</template>
</el-table-column>
<el-table-column label="业务操作" align="center" prop="cateAdminName" />
<el-table-column label="说明" align="center" prop="cateAdminName" min-width="200">
<template v-slot="scope">
<div class="context-avatar-center">
<span>{{scope.row.showMessage}}</span><image-preview v-if="scope.row.tarImg" :src="scope.row.tarImg" :width="32" :height="32"/>
</div>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="后台操作" align="center" prop="isAdmin" >
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.isAdmin"/>
</template>
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" width="160" />
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
v-if="scope.row.traceId"
@click="handleInfo(scope.row)"
>关联业务</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<recharge-order-info v-if="rechargeOrderInfoVisible" ref="rechargeOrderInfo" />
<user-gift-info v-if="userGiftInfoVisible" ref="userGiftInfo" />
<guard-log-info v-if="guardLogInfoVisible" ref="guardLogInfo"/>
<user-call-info v-if="userCallInfoVisible" ref="userCallInfo" />
</div>
</template>
<script>
import {listAccountChangeLog, listChangeType} from "@/api/cai/accountChangeLog";
import {accountTypeList, yesOrNoList} from "@/constant/statusMap";
import RechargeOrderInfo from "@/views/cai/rechargeOrder/recharge-order-info";
import UserGiftInfo from "@/views/cai/userGift/user-gift-info";
import GuardLogInfo from "@/views/cai/guardLog/guard-log-info";
import UserCallInfo from "@/views/cai/userCall/user-call-info";
export default {
name: "AccountChangeLog",
components: {
RechargeOrderInfo,UserGiftInfo,GuardLogInfo,UserCallInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
accountTypeList,yesOrNoList,
userCallInfoVisible: false,
rechargeOrderInfoVisible: false,
userGiftInfoVisible: false,
guardLogInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 账户明细表格数据
accountChangeLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
accountType: undefined,
cateId: undefined,
traceId:undefined
},
changeTypeList:[],
};
},
created() {
this.getList();
listChangeType().then(res => {
this.changeTypeList = res.data
})
},
methods: {
/** 查询账户明细列表 */
getList() {
this.loading = true;
listAccountChangeLog(this.queryParams).then(response => {
this.accountChangeLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleInfo(row){
const command = row.traceLinkType
switch (command) {
case "RECHARGE":
this.rechargeOrderInfoVisible = true
this.$nextTick(() => {
this.$refs.rechargeOrderInfo.traceIdInit(row.traceId)
})
break;
case "SYSTEM_TRANS":
this.rechargeOrderInfoVisible = true
this.$nextTick(() => {
this.$refs.rechargeOrderInfo.traceIdInit(row.traceId)
})
break;
case "GIFT":
this.userGiftInfoVisible = true
this.$nextTick(() => {
this.$refs.userGiftInfo.traceIdInit(row.traceId)
})
break;
case "GUARD":
this.guardLogInfoVisible = true
this.$nextTick(() => {
this.$refs.guardLogInfo.traceIdInit(row.traceId)
})
break;
case "VIDEO":
this.userCallInfoVisible = true
this.$nextTick(() => {
this.$refs.userCallInfo.traceIdInit(row.traceId)
})
break;
case "WITHDRAW":
/*this.rechargeOrderInfoVisible = true
this.$nextTick(() => {
this.$refs.rechargeOrderInfo.traceIdInit(row.traceId)
})*/
this.$modal.msgWarning("无关联记录");
break;
case "SYSTEM":
if(row.changeType === 501){
this.rechargeOrderInfoVisible = true
this.$nextTick(() => {
this.$refs.rechargeOrderInfo.traceIdInit(row.traceId)
})
}else {
this.$modal.msgWarning("无关联记录");
}
break;
default:
this.$modal.msgSuccess("无关联记录");
break;
}
}
}
};
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
.font-red {
color: red;
}
.font-green {
color: green;
}
.font-blue {
color: blue;
}
</style>

View File

@@ -0,0 +1,117 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountDetailList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户ID" align="center" prop="userId" />
<!-- ID 1 充值的金额 2 收益的金额 3 充值的彩币 4 收益的彩币-->
<el-table-column label="账户类型" align="center" prop="accountType" />
<el-table-column label="类别" align="center" prop="cateId" />
<el-table-column label="业务码" align="center" prop="businessCode" />
<el-table-column label="原有紫贝" align="center" prop="beforeAmount" />
<el-table-column label="变化值" align="center" prop="changeValue" />
<el-table-column label="变化后紫贝" align="center" prop="afterAmount" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
<el-table-column label="关键字" align="center" prop="trackParam" />
<el-table-column label="备注" align="center" prop="remark" width="400" show-overflow-tooltip/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listAccountDetail } from '@/api/cai/accountDetail'
export default {
name: "AccountDetail",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 账户明细表格数据
accountDetailList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
accountType: undefined,
cateId: undefined,
businessCode: undefined,
orderNo: undefined,
beforeAmount: undefined,
afterAmount: undefined,
changeValue: undefined,
createTime1: undefined,
trackUserId: undefined,
trackParam: undefined,
operateIp: undefined,
isAdmin: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询账户明细列表 */
getList() {
this.loading = true;
listAccountDetail(this.queryParams).then(response => {
this.accountDetailList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
},
/** 修改按钮操作 */
handleUpdate(row) {
},
}
};
</script>

View File

@@ -0,0 +1,131 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="accountRechargeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户ID" align="center" prop="userId" />
<el-table-column label="商品ID" align="center" prop="goodsId" />
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="订单名" align="center" prop="orderName" />
<!-- 1 金额 2 彩币-->
<el-table-column label="账户" align="center" prop="accountType" />
<el-table-column label="充值类型 0 手工充值 1 线上充值" align="center" prop="rechargeType" />
<el-table-column label="充值金额" align="center" prop="rechargeMoney" />
<el-table-column label="状态 1 申请 2 审核通过 3审核不通过" align="center" prop="status" />
<el-table-column label="充值平台类型" align="center" prop="platformType" />
<el-table-column label="充值平台名称" align="center" prop="platformName" />
<el-table-column label="" align="center" prop="payNo" />
<el-table-column label="" align="center" prop="rechargeReward" />
<el-table-column label="" align="center" prop="verifyTime" width="180" />
<el-table-column label="" align="center" prop="operateIp" />
<el-table-column label="类型: 0积分(默认)1会员" align="center" prop="type" />
<el-table-column label="" align="center" prop="appid" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listAccountRecharge, getAccountRecharge, delAccountRecharge, addAccountRecharge, updateAccountRecharge } from "@/api/cai/accountRecharge";
export default {
name: "AccountRecharge",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 充值记录表格数据
accountRechargeList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
goodsId: undefined,
orderNo: undefined,
orderName: undefined,
accountType: undefined,
rechargeType: undefined,
rechargeMoney: undefined,
status: undefined,
platformType: undefined,
platformName: undefined,
payNo: undefined,
returnContent: undefined,
rechargeReward: undefined,
verifyTime: undefined,
operateIp: undefined,
type: undefined,
appid: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询充值记录列表 */
getList() {
this.loading = true;
listAccountRecharge(this.queryParams).then(response => {
this.accountRechargeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
},
/** 修改按钮操作 */
handleUpdate(row) {
},
/** 提交按钮 */
submitForm() {
},
}
};
</script>

View File

@@ -0,0 +1,84 @@
<template>
<div class="app-container">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="用户协议" name="loansAgreement">
<el-button type="primary" size="mini" v-hasPermi="['cai:agreementSetting:edit']" v-if="!userAgreement" @click="showEdit('userAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="userAgreement" type="primary" size="mini" @click="submitForm2('userAgreement')">保存</el-button>
<div v-if="!userAgreement" v-html="form.userAgreement" style="width: 98%" />
<wang-edit v-if="userAgreement" v-model="form.userAgreement" :min-height="800" />
</el-tab-pane>
<el-tab-pane label="主播入驻协议" name="anchorJoinAgreement">
<el-button type="primary" size="mini" v-hasPermi="['cai:agreementSetting:edit']" v-if="!anchorJoinAgreement" @click="showEdit('anchorJoinAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="anchorJoinAgreement" type="primary" size="mini" @click="submitForm2('anchorJoinAgreement')">保存</el-button>
<div v-if="!anchorJoinAgreement" v-html="form.anchorJoinAgreement" style="width: 98%" />
<editor v-if="anchorJoinAgreement" v-model="form.anchorJoinAgreement" :min-height="192"></editor>
</el-tab-pane>
<el-tab-pane label="隐私协议" name="privacyAgreement">
<el-button type="primary" size="mini" v-hasPermi="['cai:agreementSetting:edit']" v-if="!privacyAgreement" @click="showEdit('privacyAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="privacyAgreement" type="primary" size="mini" @click="submitForm2('privacyAgreement')">保存</el-button>
<div v-if="!privacyAgreement" v-html="form.privacyAgreement" style="width: 98%" />
<editor v-if="privacyAgreement" v-model="form.privacyAgreement" :min-height="192"></editor>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Editor from '@/components/Editor'
import WangEdit from '@/components/WangEdit'
import {getAgreementSetting, updateAgreementSetting} from "@/api/cai/agreementSetting";
export default {
name: "AgreementSetting",
components: {
Editor,WangEdit
},
data() {
return {
//按钮loading
buttonLoading: false,
form: {
id: undefined,
userAgreement:undefined,
anchorJoinAgreement:undefined,
privacyAgreement: undefined,
},
activeName:'loansAgreement',
// 表单校验
rules: {
},
formDisable:true,
userAgreement:false,
anchorJoinAgreement:false,
privacyAgreement: false,
};
},
created() {
this.init();
},
methods: {
init(){
getAgreementSetting().then(response => {
this.form = response.data;
})
},
showEdit(key){
this[key] = true;
},
submitForm2(key){
const params = {
id: this.form.id,
[key]: this.form[key],
};
this.buttonLoading = true;
updateAgreementSetting(params).then(response => {
this.buttonLoading = false;
this[key] = false;
this.msgSuccess("修改成功");
}).catch(() => {
this.buttonLoading = false;
});
}
}
};
</script>

View File

@@ -0,0 +1,104 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="昵称" v-if="info.nickname">
{{ info.nickname }} {{ info.usercode }}
</el-form-item>
<el-form-item label="性别" v-if="info.gender">
<cai-dict-tag :options="genderList" :value="info.gender" />
</el-form-item>
<el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/>
</el-form-item>
<el-form-item>
注意只有女用户可以成为主播
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
import {addAnchor} from "@/api/cai/anchor";
import {genderList} from "@/constant/statusMap";
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,
open: false,
title: '',
form:{
usercode: undefined,
},
info:{
},
memberPriceList:[],
// 表单校验
rules: {
usercode: [
{ required: true, message: "数据不能为空", trigger: "blur" }
]
},
buttonLoading: false,
}
},
created() {
},
methods: {
init () {
this.open = true;
this.title = "新增主播"
this.info = {};
this.form.usercode = undefined
},
querySearch(querySearch,cb){
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal,
};
}))
})
},
handleSelect(item){
getUserByUsercode(item.value).then(res => {
this.info = res.data
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addAnchor(this.form).then(data => {
this.$modal.msgSuccess("新增工会成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,208 @@
<template>
<el-dialog title="主播信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-collapse v-model="activeName" >
<el-collapse-item title="基本信息" name="base">
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="id">
{{info.user.id}}
</el-descriptions-item>
<el-descriptions-item :label="systemName+'号'">
{{info.user.usercode}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{info.user.mobile}}
</el-descriptions-item>
<el-descriptions-item label="头像">
<image-avatar :src="info.user.avatar" />
</el-descriptions-item>
<el-descriptions-item label="性别">
<cai-dict-tag :options="genderList" :value="info.user.gender" />
</el-descriptions-item>
<el-descriptions-item label="年龄">
{{info.user.age}}
</el-descriptions-item>
<el-descriptions-item label="生日">
{{info.user.birthday}}
</el-descriptions-item>
<el-descriptions-item label="城市">
{{info.user.city}}
</el-descriptions-item>
<el-descriptions-item label="昵称">
{{info.user.nickname}}
</el-descriptions-item>
<el-descriptions-item label="相册" :span="3" v-if="info.userAlbums">
<span v-for='val in info.userAlbums'>
<image-preview :src="val.url" height="45px" width="45px" /> &nbsp;&nbsp;
</span>
</el-descriptions-item>
<el-descriptions-item label="资料完成">
<cai-dict-tag :options="authList" :value="info.user.finishStatus" />
</el-descriptions-item>
<el-descriptions-item label="自定义头像">
<cai-dict-tag :options="authList" :value="info.user.avatarState" />
</el-descriptions-item>
<el-descriptions-item label="自拍认证">
<cai-dict-tag :options="authList" :value="info.user.cameraStatus" />
</el-descriptions-item>
<el-descriptions-item label="是否同意协议">
<cai-dict-tag :options="authList" :value="info.user.agreeProtocol" />
</el-descriptions-item>
<el-descriptions-item label="视频状态">
<cai-dict-tag :options="videoStatusList" :value="info.user.videoStatus" />
</el-descriptions-item>
<el-descriptions-item label="状态">
<cai-dict-tag :options="userStatusList" :value="info.user.status" />
</el-descriptions-item>
<el-descriptions-item label="工会">
<cai-dict-tag :options="isAnchorList" :value="info.user.isUnion" />
</el-descriptions-item>
<el-descriptions-item label="最后登录IP">
{{info.userInfo.lastLoginIp}}
</el-descriptions-item>
<el-descriptions-item label="最后登录时间">
{{info.userInfo.lastLoginTime}}
</el-descriptions-item>
<el-descriptions-item label="视频分成">
{{info.anchor.videoRate}}
</el-descriptions-item>
<el-descriptions-item label="守护分成">
{{info.anchor.guardRate}}
</el-descriptions-item>
<el-descriptions-item label="礼物分成">
{{info.anchor.giftRate}}
</el-descriptions-item>
<el-descriptions-item label="最后登录位置">
{{info.userInfo.lastLocation}}
</el-descriptions-item>
<el-descriptions-item label="注册IP">
{{info.userInfo.regIp}}
</el-descriptions-item>
<el-descriptions-item label="注册时间">
{{info.userInfo.regTime}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="主播" name="anchor" v-if="info.anchor">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="价格">
{{info.anchor.price}}
</el-descriptions-item>
<el-descriptions-item label="开启视频接听">
<cai-dict-tag :options="openVideoStatusList" :value="info.anchor.openVideoStatus" />
</el-descriptions-item>
<el-descriptions-item label="视频状态">
<cai-dict-tag :options="videoStatusList" :value="info.anchor.videoStatus" />
</el-descriptions-item>
<el-descriptions-item label="隐藏接单">
<cai-dict-tag :options="orderSwitchList" :value="info.anchor.orderSwitch" />
</el-descriptions-item>
<el-descriptions-item label="首页展示">
<cai-dict-tag :options="indexDisplayList" :value="info.anchor.indexDisplay" />
</el-descriptions-item>
<el-descriptions-item label="用户评分">
{{info.anchor.giveScore}}
</el-descriptions-item>
<el-descriptions-item label="服务总次数">
{{info.anchor.serviceCount}}
</el-descriptions-item>
<el-descriptions-item label="服务总时长">
{{info.anchor.serviceTime}}
</el-descriptions-item>
<el-descriptions-item label="视频分成比例">
{{info.anchor.videoRate}}
</el-descriptions-item>
<el-descriptions-item label="守护分成比例">
{{info.anchor.guardRate}}
</el-descriptions-item>
<el-descriptions-item label="礼物分成比列">
{{info.anchor.giftRate}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="在线状态" name="userOnline" v-if="info.userOnline">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="2" size="medium" border>
<el-descriptions-item label="在线状态">
<cai-dict-tag :options="onlineStatusList" :value="info.userOnline.status" />
</el-descriptions-item>
<el-descriptions-item label="最后在线时间">
{{info.userOnline.lastLiveTime}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
</el-collapse>
</el-dialog>
</template>
<script>
import {
authList,
genderList,
userStatusList,
isAnchorList,
videoStatusList,
onlineStatusList,
memberTypeList,
memberStatusList,
openVideoStatusList,
orderSwitchList,
indexDisplayList,
booleanList
} from '@/constant/statusMap'
import {getFullAnchor} from "@/api/cai/anchor";
export default {
name: "UserInfo",
data() {
return {
genderList,userStatusList,isAnchorList,authList,videoStatusList,onlineStatusList,memberTypeList,
memberStatusList,openVideoStatusList,orderSwitchList,indexDisplayList,booleanList,
activeName:['base','anchor','userOnline'],
systemName: process.env.VUE_APP_SYSTEM_HOME,
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
userId: this.$route.query.id,
};
},
created() {
},
methods: {
init(userId){
this.open = true;
this.userId = userId;
getFullAnchor(this.userId).then(response => {
this.info = response.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,291 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:anchor:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="anchorList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机" align="center" prop="mobile" width="120"/>
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="age" />
<el-table-column label="所在城市" align="center" prop="city" />
<el-table-column label="开启视频" align="center" prop="openVideoStatus" >
<template v-slot="scope">
<el-switch
v-model="scope.row.openVideoStatus"
:active-value="1"
:inactive-value="0"
@change="handleOpenVideoStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="视频状态" align="center" prop="videoStatus" >
<template v-slot="scope">
<cai-dict-tag :options="videoStatusList" :value="scope.row.videoStatus" />
</template>
</el-table-column>
<el-table-column label="首页展示" align="center" prop="indexDisplay" >
<template v-slot="scope">
<el-switch
v-model="scope.row.indexDisplay"
:active-value="1"
:inactive-value="0"
@change="handleIndexDisplayChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="推荐" align="center" prop="recommendStatus" >
<template v-slot="scope">
<el-switch
v-model="scope.row.recommendStatus"
:active-value="1"
:inactive-value="0"
@change="handleRecommendStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="评分" align="center" prop="giveScore" />
<!-- <el-table-column label="视频分成" align="center" prop="videoRate" />
<el-table-column label="守护分成" align="center" prop="guardRate" />
<el-table-column label="礼物分成" align="center" prop="giftRate" />-->
<el-table-column label="服务总次数" align="center" prop="serviceCount" />
<el-table-column label="服务总时长" align="center" prop="serviceTime" />
<el-table-column label="状态" align="center" prop="status" >
<template v-slot="scope">
<cai-dict-tag :options="userStatusList" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleAnchorInfo(scope.row)"
v-hasPermi="['cai:anchor:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:anchor:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:anchor:remove']"
>取消</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<add-anchor-dialog v-if="addAnchorDialogVisible" ref="addAnchorDialog" @refreshDataList="getList" />
<update-anchor-dialog v-if="updateAnchorDialogVisible" ref="updateAnchorDialog" @refreshDataList="getList" />
<anchor-info-dialog v-if="anchorInfoDialogVisible" ref="anchorInfoDialog" />
</div>
</template>
<script>
import {delAnchor, listAnchor, updateAnchor} from '@/api/cai/anchor'
import {genderList, userStatusList, videoStatusList} from '@/constant/statusMap'
import AddAnchorDialog from "@/views/cai/anchor/add-anchor-dialog";
import UpdateAnchorDialog from "@/views/cai/anchor/update-anchor-dialog";
import AnchorInfoDialog from "@/views/cai/anchor/anchor-info-dialog";
export default {
name: "Anchor",
components:{
AddAnchorDialog,UpdateAnchorDialog,AnchorInfoDialog
},
data() {
return {
genderList,userStatusList,videoStatusList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
addAnchorDialogVisible: false,
updateAnchorDialogVisible: false,
anchorInfoDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 女神列表表格数据
anchorList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询女神列表列表 */
getList() {
this.loading = true;
listAnchor(this.queryParams).then(response => {
this.anchorList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleAdd(row) {
this.addAnchorDialogVisible = true
this.$nextTick(() => {
this.$refs.addAnchorDialog.init(row?.usercode)
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.updateAnchorDialogVisible = true
this.$nextTick(() => {
this.$refs.updateAnchorDialog.init(row)
})
},
handleAnchorInfo(row){
this.anchorInfoDialogVisible = true
this.$nextTick(() => {
this.$refs.anchorInfoDialog.init(row.userId)
})
},
handleOpenVideoStatusChange(row){
let text = row.openVideoStatus === 0 ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.nickname + ']开启视频吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateAnchor({ id: row.id, openVideoStatus: row.openVideoStatus })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.openVideoStatus = row.openVideoStatus === 1 ? 0 : 1
})
},
handleIndexDisplayChange(row){
let text = row.indexDisplay === 0 ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.nickname + ']首页展示吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateAnchor({ id: row.id, indexDisplay: row.indexDisplay })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.indexDisplay = row.indexDisplay === 1 ? 0 : 1
})
},
handleRecommendStatusChange(row){
let text = row.recommendStatus === 0 ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.nickname + ']是否被推荐吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateAnchor({ id: row.id, recommendStatus: row.recommendStatus })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.recommendStatus = row.recommendStatus === 1 ? 0 : 1
})
},
handleDelete(row) {
this.$modal.confirm('是否确认取消"' + row.nickname + '"的主播?').then(() => {
this.loading = true;
return delAnchor(row.userId);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("取消成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,98 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input v-model="form.usercode" disabled />
</el-form-item>
<el-form-item label="守护分成" prop="guardRate">
<el-input-number v-model="form.guardRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
<el-form-item label="礼物分成" prop="giftRate">
<el-input-number v-model="form.giftRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
<el-form-item label="视频分成" prop="videoRate">
<el-input-number v-model="form.videoRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import {getAnchor, updateAnchor} from "@/api/cai/anchor";
export default {
components: {
ImageUpload,
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
id: undefined,
usercode: undefined,
guardRate: undefined,
giftRate: undefined,
videoRate: undefined,
},
// 表单校验
rules: {
guardRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
giftRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
videoRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (row) {
let id = row.id
this.form.id = id || undefined;
this.title = "修改主播";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getAnchor(id).then(response => {
this.form = response.data;
this.form.usercode = row.usercode
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateAnchor({
id: this.form.id,
guardRate: this.form.guardRate,
giftRate: this.form.giftRate,
videoRate: this.form.videoRate,
}).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,230 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in auditStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="anchorApplyList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="审核状态" align="center" prop="auditStatus">
<template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="手机" align="center" prop="mobile"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="createTime" width="180"/>
<el-table-column label="审核时间" align="center" prop="auditTime" width="180"/>
<!-- <el-table-column label="审核备注" align="center" prop="auditRemark"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleAnchorInfo(scope.row)"
v-hasPermi="['cai:anchor:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.auditStatus === 1"
@click="handleAuditSuccess(scope.row)"
v-hasPermi="['cai:anchorApply:edit']"
>通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.auditStatus === 1"
@click="handleAuditFail(scope.row)"
v-hasPermi="['cai:anchorApply:edit']"
>不通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:anchorApply:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<anchor-info-dialog v-if="anchorInfoDialogVisible" ref="anchorInfoDialog" />
</div>
</template>
<script>
import {auditAnchorFail, auditAnchorSuccess, delAnchorApply, listAnchorApply} from '@/api/cai/anchorApply'
import {auditStatusList, genderList} from '@/constant/statusMap'
import AnchorInfoDialog from "@/views/cai/anchor/anchor-info-dialog";
export default {
name: "AnchorApply",
components:{
AnchorInfoDialog
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList, auditStatusList,
anchorInfoDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 播主申请管理表格数据
anchorApplyList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined,
auditStatus: 1,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询播主申请管理列表 */
getList() {
this.loading = true;
listAnchorApply(this.queryParams).then(response => {
this.anchorApplyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleAuditSuccess(row) {
this.$modal.confirm('是否确认通过用户"' + row.nickname + '"主播审核?').then(() => {
this.loading = true;
return auditAnchorSuccess({
id: row.id,
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleAuditFail(row) {
this.$modal.confirm('是否不确认通过用户"' + row.nickname + '"主播审核?').then(() => {
this.loading = true;
return auditAnchorFail({
id: row.id,
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除用户"' + row.nickname + '"的主播审核?').then(() => {
this.loading = true;
return delAnchorApply(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleAnchorInfo(row){
this.anchorInfoDialogVisible = true
this.$nextTick(() => {
this.$refs.anchorInfoDialog.init(row.userId)
})
},
}
};
</script>

View File

@@ -0,0 +1,115 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请输入标题" />
</el-form-item>
<el-form-item label="轮播图" prop="image">
<image-upload2 v-model="form.image"/>
</el-form-item>
<el-form-item label="链接地址" prop="linkUrl">
<el-input v-model="form.linkUrl" placeholder="请输入链接地址" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="图片地址" prop="imageDetails">
<el-input v-model="form.imageDetails" placeholder="请输入图片地址" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addBanner, getBanner, updateBanner } from '@/api/cai/banner'
export default {
components: {
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
type: 1,
cid: 1,
title: undefined,
image: undefined,
linkType: undefined,
linkUrl: undefined,
sort: undefined,
imageDetails: undefined
},
// 表单校验
rules: {
title: [
{ required: true, message: "标题不能为空", trigger: "blur" }
],
image: [
{ required: true, message: "图片不能为空", trigger: "blur" }
],
linkType: [
{ required: true, message: "链接类", trigger: "change" }
],
linkUrl: [
{ required: true, message: "链接地址不能为空", trigger: "blur" }
],
sort: [
{ required: true, message: "排序不能为空", trigger: "blur" }
]
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.title = (id ? "修改" : "新增") + "轮播";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
if(this.form.id){
getBanner(id).then(response => {
this.form = response.data;
});
}
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateBanner(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.$modal.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
addBanner(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
}
})
},
}
}
</script>

View File

@@ -0,0 +1,217 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:banner:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['cai:banner:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['cai:banner:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="bannerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="标题" align="center" prop="title" />
<el-table-column label="轮播图" align="center" prop="image" width="100">
<template v-slot="scope">
<image-preview :src="scope.row.image" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="链接类型" align="center" prop="linkType">
<template v-slot="scope">
<cai-dict-tag :options="bannerLinkTypeList" :value="scope.row.linkType" />
</template>
</el-table-column>
<el-table-column label="链接地址" align="center" prop="linkUrl" />
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<el-switch
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="图片地址" align="center" prop="imageDetails" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:banner:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:banner:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改轮播对话框 -->
<banner-add-update-dialog v-if="bannerAddOrUpdateDialogVisible" ref="bannerAddOrUpdateDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import { delBanner, listBanner, updateBanner } from '@/api/cai/banner'
import { bannerLinkTypeList, bannerStatusList } from '@/constant/statusMap'
import BannerAddUpdateDialog from '@/views/cai/banner/banner-add-update-dialog.vue'
export default {
name: "Banner",
components: {
BannerAddUpdateDialog
},
data() {
return {
bannerLinkTypeList,bannerStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 轮播表格数据
bannerList: [],
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
},
bannerAddOrUpdateDialogVisible: false,
};
},
created() {
this.getList();
},
methods: {
/** 查询轮播列表 */
getList() {
this.loading = true;
listBanner(this.queryParams).then(response => {
this.bannerList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.bannerAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.bannerAddOrUpdateDialog.init()
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.bannerAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.bannerAddOrUpdateDialog.init(row.id)
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除轮播编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delBanner(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleStatusChange(row){
let text = row.status === 1 ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.title + ']轮播吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateBanner({ id: row.id, status: row.status })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
console.log("操作失败")
row.status = row.status === 0 ? 1 : 0
})
}
}
};
</script>

View File

@@ -0,0 +1,175 @@
<template>
<el-dialog title="分销详情" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-collapse v-model="activeName" >
<el-collapse-item title="基本信息" name="base">
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="id">
{{info.id}}
</el-descriptions-item>
<el-descriptions-item label="类型">
<cai-dict-tag :options="consumeLogTypeList" :value="info.type" />
</el-descriptions-item>
<el-descriptions-item label="是否计算">
<cai-dict-tag :options="consumeLogCalculateStatusList" :value="info.calculateStatus" />
</el-descriptions-item>
<el-descriptions-item label="类型">
<cai-dict-tag :options="consumeLogStatusList" :value="info.status" />
</el-descriptions-item>
<el-descriptions-item label="后台操作?">
<cai-dict-tag :options="booleanList" :value="info.admin" />
</el-descriptions-item>
<el-descriptions-item label="分销时间">
{{info.opCreate}}
</el-descriptions-item>
<el-descriptions-item label="创建时间">
{{info.createTime}}
</el-descriptions-item>
<el-descriptions-item label="链路号">
{{info.traceId}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="消费方" name="source">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="2" size="medium" border>
<el-descriptions-item label="发生金额">
{{info.amount}}
</el-descriptions-item>
<el-descriptions-item :label="systemName+'号'">
{{info.sourceUsercode}}
</el-descriptions-item>
<el-descriptions-item label="手机">
{{info.sourcePhone}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="接收方" name="target">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="接收方金额">
{{info.anchorAmount}}
</el-descriptions-item>
<el-descriptions-item :label="systemName+'号'">
{{info.targetUsercode}}
</el-descriptions-item>
<el-descriptions-item label="手机">
{{info.targetPhone}}
</el-descriptions-item>
<el-descriptions-item label="费率">
{{info.targetRate}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="邀请方" name="one">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="是否参与分销">
<cai-dict-tag :options="booleanList" :value="info.oneJoin" />
</el-descriptions-item>
<el-descriptions-item label="是否为会长">
<cai-dict-tag :options="isAnchorList" :value="info.oneIsUnion" />
</el-descriptions-item>
<el-descriptions-item label="邀请方金额">
{{info.oneAmount}}
</el-descriptions-item>
<el-descriptions-item :label="systemName+'号'">
{{info.oneUsercode}}
</el-descriptions-item>
<el-descriptions-item label="手机">
{{info.onePhone}}
</el-descriptions-item>
<el-descriptions-item label="费率">
{{info.oneRate}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="工会" name="union">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="2" size="medium" border>
<el-descriptions-item label="是否参与分销">
<cai-dict-tag :options="booleanList" :value="info.unionJoin" />
</el-descriptions-item>
<el-descriptions-item label="工会金额">
{{info.unionAmount}}
</el-descriptions-item>
<el-descriptions-item :label="systemName+'号'">
{{info.unionUsercode}}
</el-descriptions-item>
<el-descriptions-item label="手机">
{{info.unionPhone}}
</el-descriptions-item>
<el-descriptions-item label="费率">
{{info.unionRate}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
</el-collapse>
</el-dialog>
</template>
<script>
import {
booleanList,
consumeLogCalculateStatusList,
consumeLogStatusList,
consumeLogTypeList,
isAnchorList
} from '@/constant/statusMap'
import {getConsumeLog, getConsumeLogTraceId} from "@/api/cai/consumeLog";
export default {
name: "UserInfo",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
consumeLogTypeList,consumeLogStatusList,consumeLogCalculateStatusList,booleanList,isAnchorList,
activeName:['base','source'],
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
id: undefined,
};
},
created() {
},
methods: {
init(id){
this.open = true;
this.id = id;
getConsumeLog(this.id).then(response => {
this.info = response.data?response.data:{};
});
},
traceIdInit(traceId){
this.open = true;
getConsumeLogTraceId(traceId).then(response => {
this.info = response.data?response.data:{};
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,273 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'消费方'+systemName+'号'" prop="sourceUsercode">
<el-input
v-model="queryParams.sourceUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'主播'+systemName+'号'" prop="targetUsercode">
<el-input
v-model="queryParams.targetUsercode"
:placeholder="'请输入主播'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'邀请方'+systemName+'号'" prop="oneUsercode">
<el-input
v-model="queryParams.oneUsercode"
:placeholder="'请输入邀请方'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'会长'+systemName+'号'" prop="unionUsercode">
<el-input
v-model="queryParams.unionUsercode"
:placeholder="'请输入会长'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分销" prop="status">
<el-select v-model="queryParams.status" clearable size="small">
<el-option
v-for="dict in consumeLogStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="consumeLogList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="类型" align="center" prop="type" width="50">
<template v-slot="scope">
<cai-dict-tag :options="consumeLogTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="80" >
<template v-slot="scope">
<cai-dict-tag :options="consumeLogStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="消费方" align="center" prop="amount" width="200">
<template v-slot="scope">
<span style="font-weight: bold">{{systemName}}:</span><span>{{scope.row.sourceUsercode}}</span> <br>
<span style="font-weight: bold">手机号:</span><span>{{scope.row.sourcePhone}}</span><br>
</template>
</el-table-column>
<el-table-column label="发生金额" align="center" prop="amount" width="80" />
<el-table-column label="主播" align="center" prop="anchor" min-width="200" >
<template v-slot="scope">
<div v-if="scope.row.targetUsercode">
<span style="font-weight: bold">主播:</span><span>{{scope.row.targetUsercode}}({{scope.row.targetPhone}})</span><br>
<span style="font-weight: bold">费率/金额:</span>
<span>
<span class="font-green">{{scope.row.targetRate}}</span>
/
<span class="font-red">{{scope.row.anchorAmount}}</span>
</span>
<br>
</div>
<span v-if="!scope.row.targetUsercode">-</span>
</template>
</el-table-column>
<el-table-column label="邀请方" align="center" prop="invite" min-width="200" >
<template v-slot="scope">
<div v-if="scope.row.oneUsercode">
<span style="font-weight: bold">邀请人:</span><span>{{scope.row.oneUsercode}}({{scope.row.onePhone}})</span> <br>
<span style="font-weight: bold">分销:</span><span :class="joinColor(scope.row.oneJoin)">{{scope.row.oneJoin ? '参与' : '不参与'}}</span><br>
<span style="font-weight: bold">费率/金额:</span>
<span>
<span class="font-green">{{scope.row.oneRate}}</span>
/
<span class="font-red">{{scope.row.oneAmount}}</span>
</span> <br>
</div>
<span v-if="!scope.row.oneUsercode">-</span>
</template>
</el-table-column>
<el-table-column label="工会" align="center" prop="union" min-width="200" >
<template v-slot="scope">
<div v-if="scope.row.unionUsercode">
<span style="font-weight: bold">会长:</span><span>{{scope.row.unionUsercode}}({{scope.row.unionPhone}})</span> <br>
<span style="font-weight: bold">分销:</span><span :class="joinColor(scope.row.oneJoin)">{{scope.row.unionJoin ? '参与' : '不参与'}}</span><br>
<span style="font-weight: bold">费率/金额:</span>
<span>
<span class="font-green">{{scope.row.unionRate}}</span>
/
<span class="font-red">{{scope.row.unionAmount}}</span>
</span> <br>
</div>
<span v-if="!scope.row.unionUsercode">-</span>
</template>
</el-table-column>
<el-table-column label="是否计算" align="center" prop="calculateStatus">
<template v-slot="scope">
<cai-dict-tag :options="consumeLogCalculateStatusList" :value="scope.row.calculateStatus"/>
</template>
</el-table-column>
<el-table-column label="创建/分销时间" align="center" prop="opCreate" width="180" >
<template v-slot="scope">
<span>{{scope.row.createTime}}</span><br/>
<span>{{scope.row.opCreate}}</span>
</template>
</el-table-column>
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="80" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
@click="handleInfo(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status === 0"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:consumeLog:edit']"
>分销</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<consume-log-info v-if="consumeLogInfoVisible" ref="consumeLogInfo" />
</div>
</template>
<script>
import {fenxiaoConsumeLog, listConsumeLog} from "@/api/cai/consumeLog";
import {consumeLogCalculateStatusList, consumeLogStatusList, consumeLogTypeList} from "@/constant/statusMap";
import ConsumeLogInfo from "@/views/cai/consumeLog/consume-log-info";
export default {
name: "ConsumeLog",
components: {
ConsumeLogInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
consumeLogTypeList,consumeLogStatusList,consumeLogCalculateStatusList,
consumeLogInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 分销记录表格数据
consumeLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
unionUsercode: undefined,
oneUsercode: undefined,
targetUsercode: undefined,
sourceUsercode: undefined,
traceId: undefined,
status: undefined
},
};
},
created() {
this.getList();
},
methods: {
joinColor(join){
return join ? 'font-blue' : 'font-red'
},
/** 查询分销记录列表 */
getList() {
this.loading = true;
listConsumeLog(this.queryParams).then(response => {
this.consumeLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleInfo(row) {
this.consumeLogInfoVisible = true
this.$nextTick(() => {
this.$refs.consumeLogInfo.init(row.id)
})
},
handleUpdate(row){
this.$modal.confirm('确定要分销该数据项?').then(() => {
this.loading = true;
return fenxiaoConsumeLog(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
}
}
};
</script>
<style lang="scss" scoped>
.font-red {
color: red;
}
.font-green {
color: green;
}
.font-blue {
color: blue;
}
</style>

View File

@@ -0,0 +1,195 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="date">
<el-date-picker clearable
v-model="queryParams.date"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-refresh"
size="mini"
@click="handleRefreshToday"
v-hasPermi="['cai:dayIncomeStatistics:edit']"
>重新统计当天数据</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-refresh"
size="mini"
@click="handleRefreshLastday"
v-hasPermi="['cai:dayIncomeStatistics:edit']"
>重新统计昨天数据</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dayIncomeStatisticsList" @selection-change="handleSelectionChange">
<el-table-column label="日期" align="center" prop="date" width="90" />
<el-table-column label="充值金额" align="center" prop="expInMoney" />
<el-table-column label="充值笔数" align="center" prop="orderCount" />
<el-table-column label="提现金额" align="center" prop="outMoney" />
<el-table-column label="打款笔数" align="center" prop="cashCount" />
<el-table-column label="vip收入" align="center" prop="vipInMoney" />
<el-table-column label="vip笔数" align="center" prop="vipCount" />
<el-table-column label="当日差额" align="center" prop="diff">
<template v-slot="scope">
<span :class="scope.row.diff >= 0 ? 'font-red': 'font-green' ">{{ scope.row.diff }}</span>
</template>
</el-table-column>
<el-table-column label="手动加余额" align="center" prop="modifyCoinAdd" />
<el-table-column label="手动减余额" align="center" prop="modifyCoinSub" />
<el-table-column label="手动加收益" align="center" prop="modifyIncomeAdd" />
<el-table-column label="手动减收益" align="center" prop="modifyIncomeSub" />
<el-table-column label="最近更新时间" align="center" prop="updateTime" width="160"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>修改</el-button>
</template>
</el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listDayIncomeStatistics,
refreshLastDayDayIncomeStatistics,
refreshTodayDayIncomeStatistics
} from '@/api/cai/dayIncomeStatistics'
export default {
name: "DayIncomeStatistics",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 每日账单统计表格数据
dayIncomeStatisticsList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
date: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询每日账单统计列表 */
getList() {
this.loading = true;
listDayIncomeStatistics(this.queryParams).then(response => {
response.rows.forEach((value,index) => {
value.diff = parseInt(value.expInMoney) + parseInt(value.vipInMoney) - parseInt(value.outMoney)
value.modifyCoinAdd = value.modifyCoinAdd / 100
value.modifyCoinSub = value.modifyCoinSub / 100
value.modifyIncomeAdd = value.modifyIncomeAdd / 100
value.modifyIncomeSub = value.modifyIncomeSub / 100
})
this.dayIncomeStatisticsList = response.rows
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleRefreshToday() {
this.$modal.confirm('是否重新统计当天统计数据?').then(() => {
this.loading = true;
return refreshTodayDayIncomeStatistics();
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("刷新当天统计成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 修改按钮操作 */
handleRefreshLastday(row) {
this.$modal.confirm('是否重新统计昨天统计数据?').then(() => {
this.loading = true;
return refreshLastDayDayIncomeStatistics();
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("刷新昨天统计成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
.font-red {
color: red;
}
.font-green {
color: green;
}
.font-blue {
color: blue;
}
</style>

View File

@@ -0,0 +1,254 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in auditStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleBatchAudit"
v-hasPermi="['cai:dynamic:edit']"
>批量审核通过
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dynamicList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id"/>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="auditStatus">
<template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column label="图片" align="center" prop="content" >
<template v-slot="scope">
<span v-for='val in scope.row.dynamicImageList'>
<image-preview :src="val.url" height="40px" width="40px" /> &nbsp;
<!-- <el-divider direction="vertical"></el-divider>-->
</span>
</template>
</el-table-column>
<el-table-column label="内容" align="center" prop="content" show-overflow-tooltip/>
<el-table-column label="提交时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.auditStatus === 1"
@click="handleAuditSuccess(scope.row,2)"
v-hasPermi="['cai:dynamic:edit']"
>通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.auditStatus === 1"
@click="handleAuditFail(scope.row)"
v-hasPermi="['cai:dynamic:edit']"
>不通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:dynamic:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
auditFailDynamic,
auditSuccessDynamic,
batchAuditDynamic,
delDynamic,
listDynamic,
updateDynamic
} from "@/api/cai/dynamic";
import {auditStatusList} from "@/constant/statusMap";
export default {
name: "Dynamic",
data() {
return {
auditStatusList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 主播动态表格数据
dynamicList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
auditStatus: 1,
mobile: undefined,
usercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询主播动态列表 */
getList() {
this.loading = true;
listDynamic(this.queryParams).then(response => {
this.dynamicList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleAuditFail(row){
this.$modal.confirm('是否确认不通过动态编号为"' + row.id + '"的数据项?').then(() => {
this.loading = true;
return auditFailDynamic({
id: row.id,
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleAuditSuccess(row){
this.$modal.confirm('是否确认通过动态编号为"' + row.id + '"的数据项?').then(() => {
this.loading = true;
return auditSuccessDynamic({
id: row.id,
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleBatchAudit(){
const ids = this.ids;
this.$modal.confirm('是否确认批量审核通过动态编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return batchAuditDynamic({
"ids": ids
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除主播动态编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delDynamic(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,228 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dynamicList" @selection-change="handleSelectionChange">
<el-table-column label="ID" align="center" prop="id"/>
<el-table-column label="置顶" align="center" prop="sort">
<template v-slot="scope">
<el-button v-if="scope.row.sort === 1" size="mini" type="warning" @click="handleUnTop(scope.row)">取消置顶</el-button>
<el-button v-else-if="!haveTop && scope.row.sort !== 1" size="mini" type="primary" @click="handleTop(scope.row)" >置顶</el-button>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="城市" align="center" prop="city"/>
<el-table-column label="图片" align="center" prop="content" >
<template v-slot="scope">
<span v-for='val in scope.row.dynamicImageList'>
<image-preview :src="val.url" height="40px" width="40px" /> &nbsp;
</span>
</template>
</el-table-column>
<el-table-column label="内容" align="center" prop="content" show-overflow-tooltip/>
<el-table-column label="发布时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:dynamic:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
batchAuditDynamic,
delDynamic,
dynamicSelectTop,
dynamicTop,
dynamicUnTop,
listDynamic,
updateDynamic
} from "@/api/cai/dynamic";
import {auditStatusList} from "@/constant/statusMap";
export default {
name: "Dynamic",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
auditStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 主播动态表格数据
dynamicList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
auditStatus: 2,
mobile: undefined,
usercode: undefined,
},
haveTop: true,
};
},
created() {
this.getList();
this.getSelectTop();
},
methods: {
/** 查询主播动态列表 */
getList() {
this.loading = true;
listDynamic(this.queryParams).then(response => {
this.dynamicList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleAudit(row,auditStatus){
let message = auditStatus === 3 ? "通过" : "不通过";
this.$modal.confirm('是否确认'+message+'动态编号为"' + row.id + '"的数据项?').then(() => {
this.loading = true;
return updateDynamic({
id: row.id,
auditStatus: auditStatus
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleBatchAudit(auditStatus){
const ids = this.ids;
this.$modal.confirm('是否确认批量审核通过动态编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return batchAuditDynamic({
"ids": ids,
auditStatus: auditStatus
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除主播动态编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delDynamic(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleTop(row){
this.loading = true;
dynamicTop(row.id).then(res => {
this.loading = false;
this.getSelectTop();
this.getList();
this.$modal.msgSuccess("置顶成功");
}).finally(() => {
this.loading = false;
})
},
handleUnTop(row){
this.loading = true;
dynamicUnTop(row.id).then(res => {
this.loading = false;
this.getSelectTop();
this.getList();
this.$modal.msgSuccess("取消置顶成功");
}).finally(() => {
this.loading = false;
})
},
getSelectTop(){
dynamicSelectTop().then(res => {
this.haveTop = res.data.exists
})
}
}
};
</script>

View File

@@ -0,0 +1,171 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="拦截手机号" prop="userMobile">
<el-input
v-model="queryParams.userMobile"
placeholder="请输入拦截用户手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'拦截'+systemName+'号'" prop="userUsercode">
<el-input
v-model="queryParams.userUsercode"
:placeholder="'请输入拦截用户'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="拦截对象" prop="member">
<el-input
v-model="queryParams.member"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="拦截编号" prop="traceNo">
<el-input
v-model="queryParams.traceNo"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="拦截类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in forbidTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="forbidFilterList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="类型" align="center" prop="type">
<template v-slot="scope">
<cai-dict-tag :options="forbidTypeList" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="拦截对象" align="center" prop="member">
<template v-slot="scope">
<div class="context-avatar-center" v-if="scope.row.type === 1">
{{scope.row.memberNickname}}{{scope.row.member}}<image-avatar :src="scope.row.memberAvatar"/>
</div>
<span v-if="scope.row.type !== 1">
{{scope.row.member}}
</span>
</template>
</el-table-column>
<el-table-column label="拦截用户手机号" align="center" prop="userMobile"/>
<el-table-column :label="'拦截用户'+systemName+'号'" align="center" prop="userUsercode"/>
<el-table-column label="拦截编号" align="center" prop="traceNo"/>
<el-table-column label="理由" align="center" prop="filterReason"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listForbidFilter} from "@/api/cai/forbidFilter";
import {forbidStatusList, forbidTimeList, forbidTypeList} from "@/constant/statusMap";
export default {
name: "ForbidFilter",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
forbidTimeList, forbidTypeList, forbidStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 登陆拦截记录表格数据
forbidFilterList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
member: undefined,
traceNo: undefined,
userMobile: undefined,
userUsercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询登陆拦截记录列表 */
getList() {
this.loading = true;
listForbidFilter(this.queryParams).then(response => {
this.forbidFilterList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
},
/** 修改按钮操作 */
handleUpdate(row) {
},
/** 提交按钮 */
submitForm() {
},
/** 删除按钮操作 */
handleDelete(row) {
},
}
};
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
</style>

View File

@@ -0,0 +1,126 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="礼物名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入礼物名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="giftList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="礼物ID" align="center" prop="id" v-if="true"/>
<el-table-column label="礼物名称" align="center" prop="name"/>
<el-table-column label="礼物价格" align="center" prop="price"/>
<el-table-column label="礼物图片" align="center" prop="img">
<template v-slot="scope">
<image-preview :src="scope.row.img" :width="34" :height="34"/>
</template>
</el-table-column>
<el-table-column label="礼物描述" align="center" prop="desc"/>
<!-- <el-table-column label="排序" align="center" prop="sort"/>-->
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<el-switch
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listGift, updateGift} from "@/api/cai/gift";
export default {
name: "Gift",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 礼物表格数据
giftList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询礼物列表 */
getList() {
this.loading = true;
listGift(this.queryParams).then(response => {
this.giftList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleStatusChange(row) {
let text = row.status === 0 ? '开启' : '取消'
this.$confirm('确认要' + text + '[' + row.name + ']吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateGift({ id: row.id, status: row.status })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.status = row.status === 1 ? 0 : 1
})
},
}
};
</script>

View File

@@ -0,0 +1,104 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入标题" />
</el-form-item>
<el-form-item label="充值金额" prop="price">
<el-input v-model="form.price" placeholder="请输入充值金额" />
</el-form-item>
<el-form-item label="云贝数量" prop="amount">
<el-input v-model="form.amount" placeholder="请输入云贝数量" />
</el-form-item>
<el-form-item label="说明" prop="remark">
<el-input v-model="form.remark" placeholder="请输入说明" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addGoods, getGoods, updateGoods } from '@/api/cai/goods'
export default {
components: {
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
name: undefined,
price: undefined,
amount: undefined,
remark: undefined,
},
// 表单校验
rules: {
amount: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
price: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
name: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.title = (id ? "修改" : "新增") + "充值配置";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
if(this.form.id){
getGoods(id).then(response => {
this.form = response.data;
});
}
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateGoods(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.$modal.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
addGoods(this.form).then(data => {
this.$modal.msgSuccess("新增成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
}
})
},
}
}
</script>

View File

@@ -0,0 +1,184 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:goods:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
<el-table-column label="ID" align="center" prop="id"/>
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="充值金额" align="center" prop="price" />
<el-table-column label="云贝数量" align="center" prop="amount" />
<el-table-column label="状态" align="center" prop="status" >
<template v-slot="scope">
<el-switch
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="说明" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:goods:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:goods:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<goods-add-or-update-dialog v-if="goodsAddOrUpdateDialogVisible" ref="goodsAddOrUpdateDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import { delGoods, listGoods, updateGoods } from '@/api/cai/goods'
import GoodsAddOrUpdateDialog from '@/views/cai/goods/goods-add-or-update-dialog.vue'
export default {
name: "Goods",
components: {
GoodsAddOrUpdateDialog
},
data() {
return {
goodsAddOrUpdateDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 充值配置表格数据
goodsList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询充值配置列表 */
getList() {
this.loading = true;
listGoods(this.queryParams).then(response => {
this.goodsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleStatusChange(row) {
let text = row.status === 0 ? '开启' : '取消'
this.$confirm('确认要' + text + '[' + row.name + ']吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateGoods({ id: row.id, status: row.status })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.status = row.status === 1 ? 0 : 1
})
},
handleAdd(){
this.goodsAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.goodsAddOrUpdateDialog.init()
})
},
handleUpdate(row){
this.goodsAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.goodsAddOrUpdateDialog.init(row.id)
})
},
handleDelete(row){
this.$modal.confirm('是否确认删除充值配置为"' + row.name + '"的数据项?').then(() => {
this.loading = true;
return delGoods(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
}
}
};
</script>

View File

@@ -0,0 +1,95 @@
<template>
<el-dialog title="守护流水详情" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item :label="'赠送'+systemName+'号'">
{{info.fromUsercode}}
</el-descriptions-item>
<el-descriptions-item label="赠送手机号" :span="2">
{{info.fromMobile}}
</el-descriptions-item>
<el-descriptions-item :label="'接受'+systemName+'号'">
{{info.toUsercode}}
</el-descriptions-item>
<el-descriptions-item label="接受手机号" :span="2">
{{info.toMobile}}
</el-descriptions-item>
<el-descriptions-item label="发生时间">
{{info.createTime}}
</el-descriptions-item>
<el-descriptions-item label="个数">
{{info.guardNum}}
</el-descriptions-item>
<el-descriptions-item label="守护值">
{{info.guardValue}}
</el-descriptions-item>
<el-descriptions-item label="单价">
{{info.guardPrice}}
</el-descriptions-item>
<el-descriptions-item label="链路号">
{{info.traceId}}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</template>
<script>
import {userGiftTypeList} from '@/constant/statusMap'
import {getGuardLog, getGuardLogByTraceId} from "@/api/cai/guardLog";
export default {
name: "UserInfo",
data() {
return {
userGiftTypeList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
};
},
created() {
},
methods: {
init(id){
this.open = true;
getGuardLog(id).then(response => {
this.info = response.data;
});
},
traceIdInit(traceId){
this.open = true;
getGuardLogByTraceId(traceId).then(response => {
this.info = response.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,175 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'赠送者'+systemName+'号'" prop="fromUsercode">
<el-input
v-model="queryParams.fromUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="赠送者手机号" prop="fromMobile">
<el-input
v-model="queryParams.fromMobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'接收者'+systemName+'号'" prop="toUsercode">
<el-input
v-model="queryParams.toUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="接收者手机号" prop="toMobile">
<el-input
v-model="queryParams.toMobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="guardLogList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="发生时间" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column :label="'赠送'+systemName+'号'" align="center" prop="fromUsercode"/>
<el-table-column label="赠送手机号" align="center" prop="fromMobile"/>
<el-table-column :label="'接受'+systemName+'号'" align="center" prop="toUsercode"/>
<el-table-column label="接受手机号" align="center" prop="toMobile"/>
<el-table-column label="个数" align="center" prop="guardNum" />
<el-table-column label="守护值" align="center" prop="guardValue" />
<el-table-column label="单价" align="center" prop="guardPrice" />
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
v-if="scope.row.traceId"
@click="handleConsumerLog(scope.row)"
>分销记录
</el-button>
<el-button
size="mini"
type="text"
@click="handleInfo(scope.row)"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<consume-log-info v-if="consumeLogInfoVisible" ref="consumeLogInfo" />
<guard-log-info v-if="guardLogInfoVisible" ref="guardLogInfo"/>
</div>
</template>
<script>
import {listGuardLog} from "@/api/cai/guardLog";
import ConsumeLogInfo from "@/views/cai/consumeLog/consume-log-info";
import GuardLogInfo from "@/views/cai/guardLog/guard-log-info";
export default {
name: "GuardLog",
components: {
ConsumeLogInfo,GuardLogInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
consumeLogInfoVisible: false,
guardLogInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 守护赠送流水表格数据
guardLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
toUsercode: undefined,
toMobile: undefined,
fromUsercode: undefined,
fromMobile: undefined,
traceId:undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询守护赠送流水列表 */
getList() {
this.loading = true;
listGuardLog(this.queryParams).then(response => {
this.guardLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleConsumerLog(row) {
this.consumeLogInfoVisible = true
this.$nextTick(() => {
this.$refs.consumeLogInfo.traceIdInit(row.traceId)
})
},
handleInfo(row){
this.guardLogInfoVisible = true
this.$nextTick(() => {
this.$refs.guardLogInfo.init(row.id)
})
}
}
};
</script>

View File

@@ -0,0 +1,131 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'赠送者'+systemName+'号'" prop="fromUsercode">
<el-input
v-model="queryParams.fromUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="赠送者手机号" prop="fromMobile">
<el-input
v-model="queryParams.fromMobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'接收者'+systemName+'号'" prop="toUsercode">
<el-input
v-model="queryParams.toUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="接收者手机号" prop="toMobile">
<el-input
v-model="queryParams.toMobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="guardTotalList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="发生时间" align="center" prop="createTime"/>
<el-table-column :label="'赠送'+systemName+'号'" align="center" prop="fromUsercode"/>
<el-table-column label="赠送手机号" align="center" prop="fromMobile"/>
<el-table-column :label="'接受'+systemName+'号'" align="center" prop="toUsercode"/>
<el-table-column label="接受手机号" align="center" prop="toMobile"/>
<el-table-column label="累计守护符个数" align="center" prop="guardNum" />
<el-table-column label="守护值" align="center" prop="guardValue" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template v-slot="scope">-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listGuardTotal} from "@/api/cai/guardTotal";
export default {
name: "GuardTotal",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户守护累计表格数据
guardTotalList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
toUsercode: undefined,
toMobile: undefined,
fromUsercode: undefined,
fromMobile: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询用户守护累计列表 */
getList() {
this.loading = true;
listGuardTotal(this.queryParams).then(response => {
this.guardTotalList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>

View File

@@ -0,0 +1,184 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="lowHeightRiskList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机" align="center" prop="mobile" />
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="截图次数" align="center" prop="screenshotNum" />
<el-table-column label="录屏次数" align="center" prop="screenRecordingNum" />
<el-table-column label="登陆IP" align="center" prop="lastLoginIp" width="125"/>
<!-- <el-table-column label="违规权重" align="center" prop="state" >
<template v-slot="scope">
<cai-dict-tag :options="userRiskLowList" :value="scope.row.state" />
</template>
</el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:lowHeightRisk:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-logs"
@click="handleUserErrorLog(scope.row)"
>记录</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-lock"
@click="handleUserForbid(scope.row)"
v-hasPermi="['cai:user:lock']"
>封号</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<user-error-list-info-dialog v-if="userErrorListInfoDialogVisible" ref="userErrorListInfoDialog"/>
<user-forbid-dialog v-if="userForbidVisible" ref="userForbid" @refreshDataList="getList" />
</div>
</template>
<script>
import { delLowHeightRisk, listLowHeightRisk } from '@/api/cai/lowHeightRisk'
import { genderList, userRiskLowList } from '@/constant/statusMap'
import UserErrorListInfoDialog from '@/views/cai/userErrorLog/user-error-list-info-dialog.vue'
import UserForbidDialog from "@/views/cai/user/user-forbid-dialog";
export default {
name: "LowHeightRisk",
components: {
UserErrorListInfoDialog,UserForbidDialog
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,userRiskLowList,
userErrorListInfoDialogVisible: false,
userForbidVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 高风险用户记录表格数据
lowHeightRiskList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询高风险用户记录列表 */
getList() {
this.loading = true;
listLowHeightRisk(this.queryParams).then(response => {
this.lowHeightRiskList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleUserErrorLog(row){
this.userErrorListInfoDialogVisible = true
this.$nextTick(() => {
this.$refs.userErrorListInfoDialog.init(row.userId)
})
},
handleUserForbid(row){
this.userForbidVisible = true
this.$nextTick(() => {
this.$refs.userForbid.init(row.userId)
})
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除高风险用户"' + row.nickname + '"的数据项?').then(() => {
this.loading = true;
return delLowHeightRisk(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,196 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:payConfig:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['cai:payConfig:edit']"
>修改</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="payConfigList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="支付方式" align="center" prop="payType" >
<template v-slot="scope">
<cai-dict-tag :options="payConfigTypeList" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="支付宝AppId" align="center" prop="appid" />
<el-table-column label="微信商户号" align="center" prop="wxMcid" />
<el-table-column label="回调域名" align="center" prop="notifyUrl" show-overflow-tooltip/>
<el-table-column label="开启状态" align="center" prop="enableStatus">
<template v-slot="scope">
<el-switch
v-model="scope.row.enableStatus"
:active-value="1"
:inactive-value="0"
@change="handleEnableStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:payConfig:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:payConfig:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pay-config-add-or-update-dialog v-if="payConfigAddOrUpdateDialogVisible" ref="payConfigAddOrUpdateDialog" @refreshDataList="getList"/>
</div>
</template>
<script>
import {delPayConfig, listPayConfig, updatePayConfig} from "@/api/cai/payConfig";
import {payConfigTypeList} from "@/constant/statusMap";
import PayConfigAddOrUpdateDialog from "@/views/cai/payConfig/pay-config-add-or-update-dialog";
export default {
name: "PayConfig",
components: {
PayConfigAddOrUpdateDialog
},
data() {
return {
payConfigTypeList,
payConfigAddOrUpdateDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 支付配置表格数据
payConfigList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询支付配置列表 */
getList() {
this.loading = true;
listPayConfig(this.queryParams).then(response => {
this.payConfigList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.payConfigAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.payConfigAddOrUpdateDialog.init()
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.payConfigAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.payConfigAddOrUpdateDialog.init(row.id)
})
},
handleEnableStatusChange(row){
let text = row.enableStatus === 0 ? '关闭' : '开启'
this.$confirm('确认要' + text + '[' + row.name + ']的支付配置吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updatePayConfig({ id: row.id, enableStatus: row.enableStatus })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.enableStatus = row.enableStatus === 0 ? 1 : 0
})
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除支付配置名称为"' + row.name + '"的数据项?').then(() => {
this.loading = true;
return delPayConfig(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,139 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="支付方式" prop="payType">
<el-select :disabled="form.id" v-model="form.payType" placeholder="支付方式" clearable size="small" style="width: 99%">
<el-option
v-for="dict in payConfigTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="商户号" prop="wxMcid" v-if="form.payType === 2">
<el-input v-model="form.wxMcid" placeholder="请输入商户号" />
</el-form-item>
<el-form-item label="微信key" prop="wxKey" v-if="form.payType === 2">
<el-input v-model="form.wxKey" placeholder="请输入微信key" />
</el-form-item>
<el-form-item label="支付宝AppId" prop="appid" v-if="form.payType === 1">
<el-input v-model="form.appid" placeholder="请输入AppId" />
</el-form-item>
<el-form-item label="私钥" prop="privateKey" v-if="form.payType === 1">
<el-input v-model="form.privateKey" placeholder="请输入秘钥" type="textarea" :rows="5"/>
</el-form-item>
<el-form-item label="公钥" prop="publicKey" v-if="form.payType === 1">
<el-input v-model="form.publicKey" placeholder="请输入公钥" type="textarea" :rows="3" />
</el-form-item>
<el-form-item label="回调域名" prop="notifyUrl" >
<el-input v-model="form.notifyUrl" placeholder="请输入回调域名" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {payConfigTypeList} from "@/constant/statusMap";
import {addPayConfig, getPayConfig, updatePayConfig} from "@/api/cai/payConfig";
export default {
components: {
},
data () {
return {
payConfigTypeList,
open: false,
title: '',
form:{
id: undefined,
name: undefined,
payType: 1,
appid: undefined,
wxMcid: undefined,
wxKey: undefined,
privateKey: undefined,
publicKey: undefined,
notifyUrl: undefined
},
// 表单校验
rules: {
name: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
payType: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
appid: [
{ required: true, message: "回调地址不能为空", trigger: "blur" }
],
wxMcid: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
wxKey: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
privateKey: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
publicKey: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.title = (id ? "修改" : "新增") + "支付配置";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
if(this.form.id){
getPayConfig(id).then(response => {
this.form = response.data;
});
}
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updatePayConfig(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.$modal.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
addPayConfig(this.form).then(data => {
this.$modal.msgSuccess("新增成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
}
})
},
}
}
</script>

View File

@@ -0,0 +1,123 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="商户号/AppId" prop="payId" label-width="100px">
<el-input
v-model="queryParams.payId"
placeholder="请输入商户号/AppId"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时间" prop="date">
<el-date-picker clearable
v-model="queryParams.date"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<el-form-item label="平台" prop="payType">
<el-select v-model="queryParams.payType" clearable size="small">
<el-option
v-for="dict in payConfigTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="payTotalList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="支付平台" align="center" prop="payType">
<template v-slot="scope">
<cai-dict-tag :options="payConfigTypeList" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="name"/>
<el-table-column label="商户号/AppId" align="center" prop="payId"/>
<el-table-column label="时间" align="center" prop="date" width="180"/>
<el-table-column label="金额" align="center" prop="money"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listPayTotal} from "@/api/cai/payTotal";
import {payConfigTypeList} from "@/constant/statusMap";
export default {
name: "PayTotal",
data() {
return {
payConfigTypeList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 支付统计表格数据
payTotalList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
payId: undefined,
payType: undefined,
date: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询支付统计列表 */
getList() {
this.loading = true;
listPayTotal(this.queryParams).then(response => {
this.payTotalList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
}
};
</script>

View File

@@ -0,0 +1,181 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in rankTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="日期类型" prop="dataType">
<el-select v-model="queryParams.dataType" clearable size="small">
<el-option
v-for="dict in rankDataTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="榜单开始时间" prop="rankBeginTime" label-width="100px">
<el-date-picker
v-model="queryParams.rankBeginTime"
type="date"
placeholder="选择榜单开始时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<span style="color: red">提示本页面只展示历史排行榜单日本周本月排行榜不展示</span>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="rankList" @selection-change="handleSelectionChange">
<el-table-column label="类型" align="center" prop="type" >
<template v-slot="scope">
<cai-dict-tag :options="rankTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="日期类型" align="center" prop="dataType" >
<template v-slot="scope">
<cai-dict-tag :options="rankDataTypeList" :value="scope.row.dataType"/>
</template>
</el-table-column>
<el-table-column label="榜单开始时间" align="center" prop="rankBeginTime" />
<el-table-column label="榜单结束时间" align="center" prop="rankEndTime" />
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<!-- <el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>-->
<el-table-column label="排名" align="center" prop="orderRank" />
<el-table-column label="数值" align="center" prop="num" />
<el-table-column label="是否领奖" align="center" prop="draw" >
<template v-slot="scope">
<span v-if="scope.row.dataType === 3">-</span>
<cai-dict-tag v-else :options="rankDrawList" :value="scope.row.draw"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listRank} from "@/api/cai/rank";
import {genderList, isAnchorList, rankDataTypeList, rankDrawList, rankTypeList} from "@/constant/statusMap";
export default {
name: "Rank",
data() {
return {
rankTypeList,rankDataTypeList,genderList,isAnchorList,rankDrawList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 榜单表格数据
rankList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
mobile: undefined,
usercode: undefined,
dataType: undefined,
type: undefined,
rankBeginTime: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询榜单列表 */
getList() {
this.loading = true;
listRank(this.queryParams).then(response => {
this.rankList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>

View File

@@ -0,0 +1,216 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付状态" prop="payStatus">
<el-select v-model="queryParams.payStatus" placeholder="支付状态" clearable size="small">
<el-option
v-for="dict in payStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="rechargeOrderList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="订单号" align="center" prop="orderNo" show-overflow-tooltip/>
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机" align="center" prop="mobile" />
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" prop="rechargeName" />
<el-table-column label="充值紫贝" align="center" prop="rechargeCoin" />
<el-table-column label="价格" align="center" prop="price" />
<el-table-column label="平台" align="center" prop="platformType">
<template v-slot="scope">
<cai-dict-tag :options="platformTypeList" :value="scope.row.platformType" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="payStatus" >
<template v-slot="scope">
<cai-dict-tag :options="payStatusList" :value="scope.row.payStatus" />
</template>
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" width="160"/>
<el-table-column label="后台新增" align="center" prop="admin" >
<template v-slot="scope">
<cai-dict-tag :options="booleanList" :value="scope.row.admin" />
</template>
</el-table-column>
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="140">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
v-if="scope.row.traceId && scope.row.admin===false"
@click="handleConsumerLog(scope.row)"
>分销记录
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleInfo(scope.row)"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<consume-log-info v-if="consumeLogInfoVisible" ref="consumeLogInfo" />
<recharge-order-info v-if="rechargeOrderInfoVisible" ref="rechargeOrderInfo" />
</div>
</template>
<script>
import {listRechargeOrder} from "@/api/cai/rechargeOrder";
import {
booleanList,
genderList,
memberStatusList,
memberTypeList,
payStatusList,
platformTypeList,
yesOrNoList
} from '@/constant/statusMap'
import RechargeOrderInfo from "@/views/cai/rechargeOrder/recharge-order-info";
import ConsumeLogInfo from "@/views/cai/consumeLog/consume-log-info";
export default {
name: "RechargeOrder",
components:{
RechargeOrderInfo,ConsumeLogInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,memberTypeList,yesOrNoList,memberStatusList,booleanList,platformTypeList,
payStatusList,
rechargeOrderInfoVisible: false,
consumeLogInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 充值订单表格数据
rechargeOrderList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
payStatus: 1,
usercode: undefined,
mobile: undefined,
orderNo: undefined,
traceId: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询充值订单列表 */
getList() {
this.loading = true;
listRechargeOrder(this.queryParams).then(response => {
this.rechargeOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleConsumerLog(row) {
this.consumeLogInfoVisible = true
this.$nextTick(() => {
this.$refs.consumeLogInfo.traceIdInit(row.traceId)
})
},
handleInfo(row) {
this.rechargeOrderInfoVisible = true
this.$nextTick(() => {
this.$refs.rechargeOrderInfo.init(row.id)
})
}
}
};
</script>

View File

@@ -0,0 +1,129 @@
<template>
<el-dialog title="充值订单信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item :label="systemName+'号'">
{{info.usercode}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{info.mobile}}
</el-descriptions-item>
<el-descriptions-item label="头像">
<image-avatar :src="info.avatar" />
</el-descriptions-item>
<el-descriptions-item label="性别">
<cai-dict-tag :options="genderList" :value="info.gender" />
</el-descriptions-item>
<el-descriptions-item label="昵称">
{{info.nickname}}
</el-descriptions-item>
<el-descriptions-item label="商品名称">
{{info.rechargeName}}
</el-descriptions-item>
<el-descriptions-item label="充值紫贝">
{{info.rechargeCoin}}
</el-descriptions-item>
<el-descriptions-item label="价格">
{{info.price}}
</el-descriptions-item>
<el-descriptions-item label="平台">
<cai-dict-tag :options="platformTypeList" :value="info.platformType" />
</el-descriptions-item>
<el-descriptions-item label="状态">
<cai-dict-tag :options="payStatusList" :value="info.payStatus" />
</el-descriptions-item>
<el-descriptions-item label="操作时间">
{{info.createTime}}
</el-descriptions-item>
<el-descriptions-item label="后台新增">
<cai-dict-tag :options="booleanList" :value="info.admin" />
</el-descriptions-item>
<el-descriptions-item label="后台ID">
{{info.adminId}}
</el-descriptions-item>
<el-descriptions-item label="操作IP">
{{info.operateIp}}
</el-descriptions-item>
<el-descriptions-item label="appid">
{{info.appid}}
</el-descriptions-item>
<el-descriptions-item label="链路号">
{{info.traceId}}
</el-descriptions-item>
<el-descriptions-item label="第三方回调数据" :span="3">
{{info.returnContent}}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</template>
<script>
import {
booleanList,
genderList,
memberStatusList,
memberTypeList,
payStatusList,
platformTypeList,
yesOrNoList
} from '@/constant/statusMap'
import {getRechargeOrder, getRechargeOrderByTraceId} from '@/api/cai/rechargeOrder'
export default {
name: "UserInfo",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,memberTypeList,yesOrNoList,memberStatusList,booleanList,platformTypeList,
payStatusList,
activeName:['base','account','userAlbums'],
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
};
},
created() {
},
methods: {
init(id){
this.open = true;
getRechargeOrder(id).then(response => {
this.info = response.data;
});
},
traceIdInit(traceId){
this.open = true;
getRechargeOrderByTraceId(traceId).then(response => {
this.info = response.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,235 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
<el-form-item :label="'举报人'+systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'举报对象'+systemName+'号'" prop="reportUsercode">
<el-input
v-model="queryParams.reportUsercode"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
<el-option
v-for="dict in reportStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['cai:report:remove']"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="举报页面" align="center" prop="type">
<template v-slot="scope">
<cai-dict-tag :options="reportTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="举报分类" align="center" prop="cateName"/>
<el-table-column label="举报人" align="center">
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :value="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
</el-table-column>
<el-table-column label="举报对象" align="center">
<el-table-column label="头像" align="center" prop="reportAvatar">
<template v-slot="scope">
<image-avatar :value="scope.row.reportAvatar"/>
</template>
</el-table-column>
<el-table-column label="昵称" align="center" prop="reportNickname"/>
<el-table-column :label="systemName+'号'" align="center" prop="reportUsercode"/>
</el-table-column>
<el-table-column label="举报内容" align="center" prop="content"/>
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="reportStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="举报时间" align="center" prop="createTime" width="160"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="160">
<template v-slot="scope">
<el-button
size="mini"
type="text"
@click="handleUserForbid(scope.row)"
v-hasPermi="['cai:user:lock']"
>封号
</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status === 0"
@click="handleStatus(scope.row)"
v-hasPermi="['cai:report:edit']"
>处理
</el-button>
<el-button
size="mini"
type="text"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:report:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<user-forbid-dialog v-if="userForbidVisible" ref="userForbid" @refreshDataList="getList" />
</div>
</template>
<script>
import { delReport, listReport, updateReport } from '@/api/cai/report'
import { reportStatusList, reportTypeList } from '@/constant/statusMap'
import UserForbidDialog from "@/views/cai/user/user-forbid-dialog";
export default {
name: 'Report',
components: {
UserForbidDialog
},
data() {
return {
reportTypeList, reportStatusList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
userForbidVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 举报表格数据
reportList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
reportUsercode: undefined,
status: 0
}
}
},
created() {
this.getList()
},
methods: {
/** 查询举报列表 */
getList() {
this.loading = true
listReport(this.queryParams).then(response => {
this.reportList = response.rows
this.total = response.total
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加举报'
},
/** 修改按钮操作 */
handleStatus(row) {
this.buttonLoading = true
updateReport({
id: row.id
}).then(response => {
this.$modal.msgSuccess('处理成功')
this.open = false
this.getList()
}).finally(() => {
this.buttonLoading = false
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除举报编号为"' + ids + '"的数据项?').then(() => {
this.loading = true
return delReport(ids)
}).then(() => {
this.loading = false
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
}).finally(() => {
this.loading = false
})
},
handleUserForbid(row){
this.userForbidVisible = true
this.$nextTick(() => {
this.$refs.userForbid.init(row.reportUid)
})
},
}
}
</script>

View File

@@ -0,0 +1,106 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="接收号码" prop="receivePhone">
<el-input
v-model="queryParams.receivePhone"
placeholder="请输入接收号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="smsVerifyList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="状态" align="center" prop="status" />-->
<el-table-column label="类型" align="center" prop="type" >
<template v-slot="scope">
<cai-dict-tag :options="smsTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="接收号码" align="center" prop="receivePhone" />
<el-table-column label="验证码" align="center" prop="verifyCode" />
<el-table-column label="发送平台" align="center" prop="sendInterface" />
<el-table-column label="操作IP" align="center" prop="operateIp" />
<el-table-column label="过期时间" align="center" prop="overTime" width="180" />
<el-table-column label="发送时间" align="center" prop="createTime" width="180" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listSmsVerify} from "@/api/cai/smsVerify";
import {smsTypeList} from "@/constant/statusMap";
export default {
name: "SmsVerify",
data() {
return {
smsTypeList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 短信验证码表格数据
smsVerifyList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
receivePhone: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询短信验证码列表 */
getList() {
this.loading = true;
listSmsVerify(this.queryParams).then(response => {
this.smsVerifyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>

View File

@@ -0,0 +1,508 @@
<template>
<el-dialog title="新增系统推送" :close-on-click-modal="false" :visible.sync="open" width="900px" append-to-body>
<el-row :gutter="10">
<el-col style="width: 550px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="群体类型" prop="groupId">
<el-select v-model="form.groupId" size="small" style="width: 100%">
<el-option
v-for="dict in systemPushGroupIdList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.groupId === 0" :label="systemName+'号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
style="width: 100%"
></el-autocomplete>
</el-form-item>
<el-form-item label="昵称" v-if="form.groupId === 0 && userInfo.nickname">
{{ userInfo.nickname }} {{ userInfo.usercode }}
</el-form-item>
<el-form-item label="头像" v-if="form.groupId === 0 && userInfo.avatar">
<image-avatar :src="userInfo.avatar"/>
</el-form-item>
<el-form-item label="发送类型" prop="sendTimeType">
<el-select v-model="form.sendTimeType" size="small" style="width: 100%">
<el-option
v-for="dict in systemPushSendTimeTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发送时间" prop="sendTime" v-if="form.sendTimeType === 1">
<el-date-picker
:picker-options="pickerAfterOptions"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.sendTime"
type="datetime"
placeholder="选择发送时间">
</el-date-picker>
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" placeholder="请输入标题"/>
</el-form-item>
<el-form-item label="消息类型" prop="type">
<el-select v-model="form.type" size="small" @change="typeSelectHandle" style="width: 100%">
<el-option
v-for="dict in systemPushTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="消息内容" prop="onlyText" v-if="form.type === 0">
<el-input v-model="form.onlyText" placeholder="请输入消息内容" type="textarea" :rows="2"/>
</el-form-item>
<el-form-item label="文本一" prop="textText1" v-if="form.type === 1">
<el-input v-model="form.textText1" placeholder="请输入第一段文本" type="textarea" :rows="2"/>
</el-form-item>
<el-form-item label="内容" prop="textContext" v-show="form.type === 1">
<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="textContextAddHandle">追加
</el-button>
<el-table
:data="textContext"
ref="textContextRef"
style="width: 100%"
:row-key="(row) => {return row.id}"
>
<el-table-column align="center" prop="n" label="字段" min-width="180">
<template v-slot="scope">
<el-input v-model="scope.row.n" placeholder="字段"/>
</template>
</el-table-column>
<el-table-column align="center" prop="v" label="" min-width="180">
<template v-slot="scope">
<el-input v-model="scope.row.v" placeholder=""/>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button size="mini" type="text" @click="textContextRemoveHandle(scope.row)" icon="el-icon-delete"/>
<el-button size="mini" type="text" icon="el-icon-rank"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="文本二" prop="textText2" v-if="form.type === 1">
<el-input v-model="form.textText2" placeholder="请输入第二段文本" type="textarea" :rows="2"/>
</el-form-item>
<el-form-item label="链接类型" prop="textLinkType" v-if="form.type === 1">
<el-select v-model="form.textLinkType" size="small">
<el-option :key="0" label="不可点击" :value="0"/>
<el-option :key="1" label="打开H5" :value="1"/>
</el-select>
</el-form-item>
<el-form-item label="链接地址" prop="textLinkUrl" v-if="form.type === 1 && form.textLinkType === 1">
<el-input v-model="form.textLinkUrl" placeholder="请输入链接地址" type="textarea" :rows="2"/>
</el-form-item>
<el-form-item label="标题类型" prop="oneImageTitleType" v-if="form.type === 2">
<el-select v-model="form.oneImageTitleType" size="small">
<el-option :key="2" label="普通标题" :value="2"/>
<el-option :key="1" label="水印标题" :value="1"/>
</el-select>
</el-form-item>
<el-form-item label="图片" prop="oneImageImage" v-if="form.type === 2">
<image-upload2 v-model="form.oneImageImage" custom-tip="建议图片比例16:9"/>
</el-form-item>
<el-form-item label="文本" prop="oneImageText" v-if="form.type === 2 && form.oneImageTitleType === 2">
<el-input v-model="form.oneImageText" placeholder="请输入消息文本" type="textarea" :rows="2"/>
</el-form-item>
<el-form-item label="链接类型" prop="oneImageLinkType" v-if="form.type === 2">
<el-select v-model="form.oneImageLinkType" size="small">
<el-option :key="0" label="不可点击" :value="0"/>
<el-option :key="1" label="打开H5" :value="1"/>
</el-select>
</el-form-item>
<el-form-item label="链接地址" prop="oneImageLinkUrl" v-if="form.type === 2 && form.oneImageLinkType === 1">
<el-input v-model="form.oneImageLinkUrl" placeholder="请输入链接地址" type="textarea" :rows="2"/>
</el-form-item>
<el-form-item label="内容" prop="imageContext" v-show="form.type === 3">
<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="imageContextAddHandle">新增</el-button>
<span style="color: red">  建议第一张图片比例16:9其他图片正方形。</span>
<el-table
:data="imageContext"
ref="imageContextRef"
style="width: 100%"
:row-key="(row) => {return row.id}"
>
<el-table-column align="center" prop="title" label="图片标题" min-width="60" show-overflow-tooltip/>
<el-table-column align="center" prop="image" label="图片" min-width="60">
<template v-slot="scope">
<image-preview :src="scope.row.image" :width="60" :height="40"/>
</template>
</el-table-column>
<el-table-column align="center" prop="linkType" label="链接类型" min-width="60">
<template v-slot="scope">
<span v-if="scope.row.linkType === 0">不可点击</span>
<span v-if="scope.row.linkType === 1">打开H5</span>
</template>
</el-table-column>
<el-table-column align="center" prop="linkUrl" label="链接" min-width="100" show-overflow-tooltip/>
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button size="mini" type="text" @click="imageContextUpdateHandle(scope.row)" icon="el-icon-edit"/>
<el-button size="mini" type="text" @click="imageContextRemoveHandle(scope.row)" icon="el-icon-delete"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="图片" prop="onlyImage" v-if="form.type === 4">
<image-upload2 v-model="form.onlyImage"/>
</el-form-item>
<el-form-item label="备注说明" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注说明" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
</el-col>
<el-col style="width: 200px;">
<preview-client :data="form" :textContext="textContext" :imageContext="imageContext"></preview-client>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="open = false">取 消</el-button>
</div>
<el-dialog :title="imageTitle" :close-on-click-modal="false" :visible.sync="imageOpen" width="500px" append-to-body>
<el-form ref="imageForm" :model="imageForm" :rules="imageRules" label-width="80px">
<el-form-item label="图片标题" prop="title">
<el-input v-model="imageForm.title" placeholder="请输入图片标题" />
</el-form-item>
<el-form-item label="图片" prop="image">
<image-upload2 v-model="imageForm.image"/>
</el-form-item>
<el-form-item label="链接类型" prop="linkType">
<el-select v-model="imageForm.linkType" size="small">
<el-option :key="0" label="不可点击" :value="0"/>
<el-option :key="1" label="打开H5" :value="1"/>
</el-select>
</el-form-item>
<el-form-item label="链接地址" prop="linkUrl" v-if="this.imageForm.linkType === 1">
<el-input v-model="imageForm.linkUrl" placeholder="请输入链接地址" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="imageSubmitForm">确 定</el-button>
<el-button @click="imageOpen = false">取 消</el-button>
</div>
</el-dialog>
</el-dialog>
</template>
<script>
import {
systemPushGroupIdList,
systemPushLogStatus,
systemPushSendTimeTypeList,
systemPushStatusList,
systemPushTypeList
} from '@/constant/statusMap'
import { getUserByUsercode, listUserByUserCode } from '@/api/cai/user'
import Sortable from 'sortablejs'
import PreviewClient from '@/components/PreviewInMobileClient/index.vue'
import {addSysPush, updateSysPush} from "@/api/cai/sysPush";
export default {
components: {
PreviewClient
},
data() {
return {
systemPushGroupIdList, systemPushLogStatus, systemPushSendTimeTypeList, systemPushStatusList, systemPushTypeList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
form: {
id: undefined,
groupId: 0,
usercode: undefined,
onlyText: undefined,
textText1: undefined,
textText2: undefined,
textLinkType: 0,
textLinkUrl: undefined,
oneImageTitleType:2,
oneImageImage:undefined,
oneImageText:undefined,
oneImageLinkType: 0,
oneImageLinkUrl: undefined,
onlyImage:undefined,
sendTimeType: 0,
sendTime: undefined,
title: undefined,
type: 0,
remark: undefined
},
imageForm:{
title: undefined,
image: undefined,
linkType: undefined,
linkUrl: undefined
},
imageOpen: false,
imageTitle: '',
textContext: [],
imageContext:[],
userInfo: {},
// 表单校验
rules: {
groupId: [
{ required: true, message: '群体类型不能为空', trigger: 'blur' }
],
sendTimeType: [
{ required: true, message: '发送类型不能为空', trigger: 'blur' }
],
sendTime: [
{ required: true, message: '发送时间不能为空', trigger: 'blur' }
],
title: [
{ required: true, message: '标题不能为空', trigger: 'blur' }
],
type: [
{ required: true, message: '消息类型不能为空', trigger: 'blur' }
],
onlyText: [
{ required: true, message: '文本消息不能为空', trigger: 'blur' }
],
textLinkUrl: [
{ required: true, message: '链接地址不能为空', trigger: 'blur' }
],
oneImageLinkUrl: [
{ required: true, message: '链接地址不能为空', trigger: 'blur' }
],
oneImageImage: [
{ required: true, message: '图片不能为空', trigger: 'blur' }
],
onlyImage: [
{ required: true, message: '图片不能为空', trigger: 'blur' }
],
},
imageRules:{
image: [
{ required: true, message: '图片不能为空', trigger: 'blur' }
],
linkType: [
{ required: true, message: '链接类型不能为空', trigger: 'blur' }
],
linkUrl: [
{ required: true, message: '链接不能为空', trigger: 'blur' }
],
},
buttonLoading: false,
pickerAfterOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
}
},
mounted() {
},
created() {
},
methods: {
init(id) {
this.form.id = id || undefined
this.open = true
this.$nextTick(() => {
// this.$refs['form'].resetFields()
this.form = {
id: undefined,
groupId: 0,
usercode: undefined,
onlyText: undefined,
textText1: undefined,
textText2: undefined,
textLinkType: 0,
textLinkUrl: undefined,
oneImageTitleType:2,
oneImageImage:undefined,
oneImageText:undefined,
oneImageLinkType: 0,
oneImageLinkUrl: undefined,
onlyImage:undefined,
sendTimeType: 0,
sendTime: undefined,
title: undefined,
type: 0,
remark: undefined
}
this.userInfo = {}
this.textContext = []
this.imageContext = []
})
},
rowDrop() {
const tbody = this.$refs.textContextRef.$el.querySelector(
".el-table__body > tbody"
);
console.log(tbody)
const _this = this
Sortable.create(tbody, {
animation: 180,
delay: 0,
onEnd({ newIndex, oldIndex }) {
const currRow = _this.textContext.splice(oldIndex, 1)[0]
_this.textContext.splice(newIndex, 0, currRow)
}
})
},
typeSelectHandle(value){
if(value === 1){
this.$nextTick(() => {
this.rowDrop()
})
}
},
querySearch(querySearch, cb) {
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal
}
}))
})
},
handleSelect(item) {
getUserByUsercode(item.value).then(res => {
this.userInfo = res.data
})
},
textContextRemoveHandle(row) {
const index = this.textContext.findIndex((item) => {
return item.id === row.id
})
// 根据索引删除数据
this.textContext.splice(index, 1)
},
imageContextAddHandle(){
this.imageOpen = true;
this.imageTitle = "添加多图文信息";
this.$nextTick(() => {
this.$refs['imageForm'].resetFields()
this.imageForm.id = undefined
})
},
imageContextRemoveHandle(row){
const index = this.imageContext.findIndex((item) => {
return item.id === row.id
})
// 根据索引删除数据
this.imageContext.splice(index, 1)
},
imageContextUpdateHandle(row){
this.imageOpen = true;
this.imageTitle = "编辑多图文信息";
this.$nextTick(() => {
this.$refs['imageForm'].resetFields()
let copy = {}
Object.assign(copy,row)
this.imageForm = copy;
})
},
imageSubmitForm(){
this.$refs["imageForm"].validate(valid => {
if (valid) {
if (this.imageForm.id != null) {
const index = this.imageContext.findIndex((item) => {
return item.id === this.imageForm.id
})
this.imageContext[index].image = this.imageForm.image
this.imageContext[index].title = this.imageForm.title
this.imageContext[index].linkType = this.imageForm.linkType
this.imageContext[index].linkUrl = this.imageForm.linkUrl
this.imageOpen = false
console.log(this.imageContext)
} else {
this.imageContext.push({
id: this.genNonDuplicateID(),
image: this.imageForm.image,
linkType: this.imageForm.linkType,
linkUrl: this.imageForm.linkUrl,
title: this.imageForm.title
})
this.imageOpen = false
console.log(this.imageContext)
}
}
});
},
textContextAddHandle() {
let b = false;
if(this.textContext.length === 0){
b = true;
}
this.textContext.push({
id: this.genNonDuplicateID(),
n: undefined,
v: undefined
})
if(b){
this.rowDrop()
}
},
/**
* 生成一个用不重复的ID
*/
genNonDuplicateID(randomLength) {
if (randomLength) {
randomLength = 8
}
return Number(Math.random().toString().substr(3, randomLength) + Date.now()).toString(36)
},
// 表单提交
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true
if (this.form.id != null) {
updateSysPush(this.form).then(data => {
this.$modal.msgSuccess('修改成功')
this.$modal.buttonLoading = false
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false
})
} else {
addSysPush({
master: this.form,
textContext: this.textContext,
imageContext: this.imageContext
}).then(data => {
this.$modal.msgSuccess('新增成功')
this.buttonLoading = false
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false
})
}
}
})
}
}
}
</script>

View File

@@ -0,0 +1,282 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="群体类型" prop="groupId">
<el-select v-model="queryParams.groupId" clearable size="small">
<el-option
v-for="dict in systemPushGroupIdList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" clearable size="small">
<el-option
v-for="dict in systemPushStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:sysPush:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="sysPushList" @selection-change="handleSelectionChange">
<el-table-column label="id" align="center" prop="id" width="50"/>
<el-table-column label="群体类型" align="center" prop="groupId" >
<template v-slot="scope">
<cai-dict-tag :options="systemPushGroupIdList" :value="scope.row.groupId"/>
</template>
</el-table-column>
<el-table-column label="消息类型" align="center" prop="type" >
<template v-slot="scope">
<cai-dict-tag :options="systemPushTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="用户" align="center" prop="usercode" />
<el-table-column label="标题" align="center" prop="title" show-overflow-tooltip/>
<!-- <el-table-column label="内容" align="center" prop="content" />-->
<!-- <el-table-column label="前端参数" align="center" prop="params" />-->
<el-table-column label="备注说明" align="center" prop="remark" show-overflow-tooltip/>
<el-table-column label="发送类型" align="center" prop="sendTimeType" >
<template v-slot="scope">
<cai-dict-tag :options="systemPushSendTimeTypeList" :value="scope.row.sendTimeType"/>
</template>
</el-table-column>
<el-table-column label="发送时间" align="center" prop="sendTime" width="180" />
<!-- <el-table-column label="已推送人数" align="center" prop="num" />-->
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="systemPushStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<!-- <el-table-column label="完成时间" align="center" prop="endtime" width="180" />-->
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100">
<template v-slot="scope">
<el-button
size="mini"
type="text"
v-if="scope.row.status === 0"
@click="handleRun(scope.row)"
v-hasPermi="['cai:sysPush:run']"
>执行</el-button>
<el-button
size="mini"
type="text"
@click="handleInfo(scope.row)"
v-hasPermi="['cai:sysPush:edit']"
>预览</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status === 0 && scope.row.sendTimeType === 1"
@click="handleClose(scope.row)"
v-hasPermi="['cai:sysPush:close']"
>取消</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:sysPush:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<add-sys-push-dialog v-if="addSysPushDialogVisible" ref="addSysPushDialog" @refreshDataList="getList" />
<el-dialog title="系统消息查看" :close-on-click-modal="false" :visible.sync="infoOpen" width="350px" append-to-body>
<preview-client :data="infoData.form" :textContext="infoData.textContext" :imageContext="infoData.imageContext"></preview-client>
<div slot="footer" class="dialog-footer">
<el-button @click="infoOpen = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { closeSysPush, delSysPush, listSysPush, runSysPush } from '@/api/cai/sysPush'
import {
systemPushGroupIdList,
systemPushLogStatus,
systemPushSendTimeTypeList,
systemPushStatusList,
systemPushTypeList
} from '@/constant/statusMap'
import AddSysPushDialog from '@/views/cai/sysPush/add-sys-push-dialog.vue'
import PreviewClient from '@/components/PreviewInMobileClient/index.vue'
export default {
name: "SysPush",
components: {
AddSysPushDialog,PreviewClient
},
data() {
return {
systemPushGroupIdList,systemPushLogStatus,systemPushSendTimeTypeList,systemPushStatusList,systemPushTypeList,
addSysPushDialogVisible: false,
infoOpen: false,
infoData:{
form:{},
textContext:[],
imageContext:[]
},
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 推送系统消息表格数据
sysPushList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
groupId: undefined,
type: undefined,
title: undefined,
content: undefined,
params: undefined,
sendTimeType: undefined,
status: undefined,
},
};
},
created() {
this.getList();
},
methods: {
handleInfo(row){
let parse = JSON.parse(row.params);
this.$set(this.infoData,'form',parse.master)
this.$set(this.infoData,'textContext',parse.textContext)
this.$set(this.infoData,'imageContext',parse.imageContext)
console.log(this.infoData)
this.infoOpen = true;
},
/** 查询推送系统消息列表 */
getList() {
this.loading = true;
listSysPush(this.queryParams).then(response => {
this.sysPushList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.addSysPushDialogVisible = true
this.$nextTick(() => {
this.$refs.addSysPushDialog.init()
})
},
handleClose(row){
this.$modal.confirm('是否确定取消定时推送系统【"' + row.title + '"】的数据项?').then(() => {
this.loading = true;
return closeSysPush(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("取消成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleRun(row){
this.$modal.confirm('是否确认执行推送系统【"' + row.title + '"】的数据项?').then(() => {
this.loading = true;
return runSysPush(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("执行成功,请等待执行结果");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除推送系统消息编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delSysPush(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,200 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="系统推送ID" prop="sysPushId" label-width="100px">
<el-input
v-model="queryParams.sysPushId"
placeholder="请输入系统推送ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="sysPushLogList" @selection-change="handleSelectionChange">
<el-table-column label="系统推送id" align="center" prop="sysPushId" />
<el-table-column label="推送到的用户id" align="center" prop="userJson" >
<template v-slot="scope">
<el-button size="mini" type="text" @click="handleShowUser(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="推送人数" align="center" prop="num" />
<el-table-column label="推送状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="systemPushLogStatus" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="推送返回的结果" align="center" prop="result" show-overflow-tooltip/>
<el-table-column label="创建时间" align="center" prop="createTime" width="160" fixed="right"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog title="推送名单" :close-on-click-modal="false" :visible.sync="showUserOpen" width="700px" append-to-body>
<el-form :model="userForm" ref="userForm" size="small" :inline="true" label-width="68px">
<el-form-item :label="systemName+'号'" prop="name">
<el-input
v-model="userForm.name"
:placeholder="'请输入'+systemName+'号'"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleUserQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetUserQuery">重置</el-button>
</el-form-item>
</el-form>
<div class="people_list" >
<div class="people_list-item" v-for="value in userList">
<!-- <el-tag
class="people_list-item_name"
:key="value.usercode"
type="info"
effect="plain">
{{ value.usercode }}
</el-tag>-->
<el-tooltip class="item" effect="dark" :content="value.nickname+'('+value.usercode+')'" placement="top-start">
<div class="people_list-item_name">{{value.nickname}}({{ value.usercode }})</div>
</el-tooltip>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { listSysPushLog } from '@/api/cai/sysPushLog'
import {
systemPushGroupIdList,
systemPushLogStatus,
systemPushSendTimeTypeList,
systemPushStatusList,
systemPushTypeList
} from '@/constant/statusMap'
export default {
name: "SysPushLog",
data() {
return {
systemPushGroupIdList,systemPushLogStatus,systemPushSendTimeTypeList,systemPushStatusList,systemPushTypeList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 推送系统消息记录表格数据
sysPushLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
sysPushId: undefined,
status: undefined,
},
sourceUserList:[],
userList: [],
showUserOpen: false,
userForm:{
name: undefined
}
};
},
created() {
this.getList();
},
methods: {
/** 查询推送系统消息记录列表 */
getList() {
this.loading = true;
listSysPushLog(this.queryParams).then(response => {
this.sysPushLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
handleShowUser(row){
this.userList = JSON.parse(row.userJson);
this.sourceUserList = JSON.parse(row.userJson);
this.showUserOpen = true
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleUserQuery(){
let name = this.userForm.name
console.log(name)
if(name){
let list = []
this.sourceUserList.forEach(value => {
console.log(value)
if(value.usercode == name){
list.push(value)
}
})
this.userList = list
}
},
resetUserQuery(){
this.userForm.name = undefined
this.userList = this.sourceUserList
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>
<style lang="scss" scoped>
.people_list {
width: 100%;
border: 1px solid #ccc;
overflow: auto;
padding: 5px;
height: 500px;
}
.people_list-item {
width: 16.5%;
height: 22px;
padding: 2px 4px;
box-sizing: border-box;
float: left;
margin-bottom: 5px;
}
.people_list-item_name {
box-sizing: border-box;
border-radius: 2px;
border: 1px solid #ccc;
padding: 0 2px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
</style>

View File

@@ -0,0 +1,190 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="unionUserList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="工会名" align="center" prop="unionName"/>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="视频分成比例" align="center" prop="videoDivide"/>
<el-table-column label="礼物分成比例" align="center" prop="giftDivide"/>
<el-table-column label="开启提成" align="center" prop="enableRate" width="80">
<template v-slot="scope">
<cai-dict-tag :options="booleanList" :value="scope.row.enableRate"/>
</template>
</el-table-column>
<el-table-column label="入会时间" align="center" prop="createTime" width="150"/>
<!-- <el-table-column label="vip分成" align="center" prop="vipDivide" />-->
<!-- <el-table-column label="收益" align="center" prop="unionEarning" />-->
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="userStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:unionUser:edit']"
>修改
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<union-user-update-dialog v-if="unionUserUpdateDialogVisible" ref="unionUserUpdateDialog" @refreshDataList="getList"/>
</div>
</template>
<script>
import {delUnionUser, listUnionUser} from "@/api/cai/unionUser";
import {booleanList, genderList, isAnchorList, userStatusList, yesOrNoList} from "@/constant/statusMap";
import UnionUserUpdateDialog from "@/views/cai/unionUser/union-user-update-dialog";
export default {
name: "UnionUser",
components: {
UnionUserUpdateDialog
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList, booleanList, userStatusList, yesOrNoList,isAnchorList,
unionUserUpdateDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工会成员表格数据
unionUserList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
unionId: undefined,
userId: undefined,
videoDivide: undefined,
giftDivide: undefined,
vipDivide: undefined,
type: undefined,
unionEarning: undefined,
isInitiative: undefined
},
};
},
created() {
this.queryParams.unionId = this.$route.query.unionId
this.getList();
},
methods: {
/** 查询工会成员列表 */
getList() {
this.loading = true;
listUnionUser(this.queryParams).then(response => {
this.unionUserList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.unionUserUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.unionUserUpdateDialog.init(row)
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除工会成员编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUnionUser(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,104 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="昵称" prop="nickname">
<el-input v-model="form.nickname" placeholder="" disabled />
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="form.mobile" placeholder="" disabled />
</el-form-item>
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input v-model="form.usercode" placeholder="" disabled />
</el-form-item>
<el-form-item label="开启提成" prop="enableRate">
<el-radio-group v-model="form.enableRate">
<el-radio :label="true">开启</el-radio>
<el-radio :label="false">关闭</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="视频提成" prop="videoDivide">
<el-input v-model="form.videoDivide" />
</el-form-item>
<el-form-item label="礼物提成" prop="giftDivide">
<el-input v-model="form.giftDivide" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUnionUser, updateUnionUser} from "@/api/cai/unionUser";
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
id: undefined,
nickname: undefined,
mobile: undefined,
usercode: undefined,
videoDivide: undefined,
giftDivide: undefined,
enableRate: undefined,
},
// 表单校验
rules: {
enableRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
giftDivide: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
videoDivide: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (row) {
let id = row.id;
this.form.id = id || undefined;
this.title = "修改工会成员配置";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getUnionUser(id).then(response => {
this.form = response.data;
this.form.nickname = row.nickname;
this.form.usercode = row.usercode;
this.form.mobile = row.mobile;
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateUnionUser(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,102 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="昵称" v-if="info.nickname">
{{ info.nickname }} {{ info.usercode }}
</el-form-item>
<el-form-item label="性别" v-if="info.gender">
<cai-dict-tag :options="genderList" :value="info.gender" />
</el-form-item>
<el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getUserByUsercode, listUserByUserCode, userBindInvite } from '@/api/cai/user'
import { genderList } from '@/constant/statusMap'
export default {
components: {
ImageUpload,
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,
open: false,
title: '',
form:{
id: undefined,
usercode: undefined,
},
info:{},
// 表单校验
rules: {
usercode: [
{ required: true, message: "数据不能为空", trigger: "blur" }
]
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.open = true;
this.title = "设置用户邀请人"
this.info = {};
this.form.id = id
this.form.usercode = undefined
},
querySearch(querySearch,cb){
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal,
};
}))
})
},
handleSelect(item){
getUserByUsercode(item.value).then(res => {
this.info = res.data
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
userBindInvite(this.form.id,this.form.usercode).then(data => {
this.$modal.msgSuccess("绑定成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,428 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="昵称" prop="nickname">
<el-input
v-model="queryParams.nickname"
placeholder="请输入昵称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-select v-model="queryParams.gender" placeholder="性别" clearable size="small">
<el-option
v-for="dict in genderList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="城市" prop="city">
<el-input
v-model="queryParams.city"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['cai:user:edit']"
>修改</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机号" align="center" prop="mobile" width="120"/>
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="邀请人" align="center" prop="inviteId" show-overflow-tooltip width="60">
<template v-slot="scope">
<span v-if="!scope.row.inviteId">-</span>
<span v-if="scope.row.inviteId">{{scope.row.inviteNickname}}({{scope.row.inviteUsercode}})</span>
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="age" />
<el-table-column label="所在城市" align="center" prop="city" />
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="会长" align="center" prop="isUnion">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="自拍认证" align="center" prop="cameraStatus">
<template v-slot="scope">
<cai-dict-tag :options="authList" :value="scope.row.cameraStatus" />
</template>
</el-table-column>
<el-table-column label="最后登陆时间" align="center" prop="lastLoginTime" width="150"/>
<el-table-column label="登陆IP" align="center" prop="lastLoginIp" width="125"/>
<el-table-column label="注册时间" align="center" prop="regTime" width="150"/>
<!-- <el-table-column label="加入IP" align="center" prop="regIp" width="125"/>-->
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="userStatusList" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
@click="handleInfo(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:user:edit']"
>修改</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['cai:userUnion:remove']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item command="handleDelete" icon="el-icon-info">完整信息</el-dropdown-item>-->
<el-dropdown-item v-hasPermi="['cai:user:restPwd']" command="handleResetPwd" icon="el-icon-key">重置密码</el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:updateMobile']" command="handleResetMobile" icon="el-icon-phone">修改手机</el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:lock']" command="handleUserForbid" icon="el-icon-lock">封禁</el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:unBindInvite']" v-if="scope.row.inviteId" command="handleUserUnBindInvite" icon="el-icon-unlock"><span style="color: red">解绑邀请</span></el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:bindInvite']" v-if="!scope.row.inviteId" command="handleUserBindInvite" icon="el-icon-link">绑定邀请</el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:resetAvatar']" command="handleUserResetAvatar" icon="el-icon-refresh-right">重置头像</el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:resetNickname']" command="handleUserResetNickname" icon="el-icon-refresh-right">重置昵称</el-dropdown-item>
<el-dropdown-item v-hasPermi="['cai:user:remove']" command="handleDelete" icon="el-icon-delete" ><span style="color: red">删除</span></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<user-add-update-dialog v-if="userAddUpdateDialogVisible" ref="userAddUpdateDialog" @refreshDataList="getList" />
<user-info-dialog v-if="userInfoDialogVisible" ref="userInfoDialog" />
<user-forbid-dialog v-if="userForbidVisible" ref="userForbid" @refreshDataList="getList" />
<bind-invite-dialog v-if="bindInviteDialogVisible" ref="bindInviteDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import {
delUser,
getFullUser, getUser,
listUser,
resetUserMobile,
resetUserPassword,
userResetAvatar,
userResetNickname, userUnBindInvite
} from '@/api/cai/user'
import {authList, genderList, isAnchorList, userStatusList, videoStatusList} from '@/constant/statusMap'
import UserAddUpdateDialog from '@/views/cai/user/user-add-update-dialog.vue'
import UserInfoDialog from "@/views/cai/user/user-info-dialog";
import UserForbidDialog from "@/views/cai/user/user-forbid-dialog";
import BindInviteDialog from '@/views/cai/user/bind-invite-dialog.vue'
export default {
name: "User",
components:{
UserForbidDialog,BindInviteDialog,
UserAddUpdateDialog,UserInfoDialog
},
data() {
return {
genderList,authList,userStatusList,isAnchorList,videoStatusList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
userForbidVisible: false,
bindInviteDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户表格数据
userList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
nickname: undefined,
mobile: undefined,
gender: undefined,
city: undefined,
},
userAddUpdateDialogVisible: false,
userInfoDialogVisible: false
};
},
created() {
this.getList();
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true;
listUser(this.queryParams).then(response => {
this.userList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleUpdate(row){
this.userAddUpdateDialogVisible = true
this.$nextTick(() => {
const id = row.id || this.ids
this.$refs.userAddUpdateDialog.init(id)
})
},
handleInfo(row){
this.userInfoDialogVisible = true
this.$nextTick(() => {
this.$refs.userInfoDialog.init(row.id)
})
},
/** 删除按钮操作 */
handleDelete(row) {
getFullUser(row.id).then(response => {
let user = response.data.user
let account = response.data.account
let anchor = response.data.anchor
let userCount = response.data.userCount
if(user.isUnion === 1){
this.$modal.msgError("该用户检测为工会会长,请先解散工会后再删除用户")
return;
}
let html = `<p>确认删除用户:<span style="color: red">` + user.nickname + `</span> 吗?</p>`
+ `<p>用户余额:<span style="color: red">` + account.incomeCoin + `</span></p>`
+ `<p>用户收益:<span style="color: red">` + account.totalBuyMoney + `</span></p>`
+ `<p>粉丝数:<span style="color: red">` + userCount.fansCount + `</span></p>`
if(anchor){
html = html + `<p style="color: red"> 并且用户为主播,是否继续删除?</p>`
}
html = html + `<p style="color: red">删除后将无法撤回,请谨慎操作</p>`
this.$confirm(html, '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
this.loading = true
return delUser(row.id)
}).then(() => {
this.loading = false
this.getList()
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(()=>{
this.loading = false
})
})
},
/** 重置密码按钮操作 */
handleResetPwd(row) {
this.$prompt('请输入"' + row.usercode + '"的新密码', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^.{5,20}$/,
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
}).then(({ value }) => {
resetUserPassword({
userId: row.id,
password: value,
}).then(response => {
this.$modal.msgSuccess("修改成功,新密码是:" + value);
});
}).catch(() => {});
},
handleResetMobile(row){
this.$prompt('请输入"' + row.nickname + '"的新手机号', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^1[0-9]{10}$/,
inputErrorMessage: "请输入正确格式的手机号"
}).then(({ value }) => {
resetUserMobile({
id: row.id,
mobile: value,
}).then(response => {
this.getList()
this.$modal.msgSuccess("修改成功,新手机号是:" + value);
});
}).catch(() => {});
},
handleUserForbid(row){
this.userForbidVisible = true
this.$nextTick(() => {
this.$refs.userForbid.init(row.id)
})
},
handleUserResetAvatar(row){
this.$modal.confirm('是否确认重置用户"' + row.nickname + '"的头像?').then(() => {
this.loading = true;
return userResetAvatar(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("重置成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleUserResetNickname(row){
this.$modal.confirm('是否确认重置用户"' + row.nickname + '"的昵称?').then(() => {
this.loading = true;
return userResetNickname(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("重置成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleUserBindInvite(row){
this.bindInviteDialogVisible = true
this.$nextTick(() => {
this.$refs.bindInviteDialog.init(row.id)
})
},
handleUserUnBindInvite(row){
getUser(row.inviteId).then(response => {
let inviteUser = response.data;
if(!inviteUser){
this.$modal.msgError("该用户不存在推荐人,无需解除")
return;
}
let html = `<p>确认解除用户:<span style="color: cadetblue">` + row.nickname + `</span> 的推荐人?</p>`
+ `<p>推荐人蜜瓜号:<span style="color: red">` + inviteUser.usercode + `</span></p>`
+ `<p>推荐人昵称:<span style="color: red">` + inviteUser.nickname + `</span></p>`
this.$confirm(html, '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
this.loading = true
return userUnBindInvite(row.id)
}).then(() => {
this.$modal.msgSuccess("解除成功");
this.loading = false
this.getList()
}).catch(() => {
}).finally(()=>{
this.loading = false
})
})
},
handleCommand(command, row) {
switch (command) {
case "handleDelete":
this.handleDelete(row);
break;
case "handleResetPwd":
this.handleResetPwd(row);
break;
case "handleResetMobile":
this.handleResetMobile(row);
break;
case "handleUserForbid":
this.handleUserForbid(row);
break;
case "handleUserResetAvatar":
this.handleUserResetAvatar(row);
break;
case "handleUserResetNickname":
this.handleUserResetNickname(row);
break;
case "handleUserBindInvite":
this.handleUserBindInvite(row);
break;
case "handleUserUnBindInvite":
this.handleUserUnBindInvite(row);
break;
default:
break;
}
},
}
};
</script>

View File

@@ -0,0 +1,104 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="昵称" prop="nickname">
<el-input v-model="form.nickname" placeholder="请输入昵称" />
</el-form-item>
<el-form-item label="头像" prop="avatar">
<image-upload2 v-model="form.avatar"/>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-radio-group v-model="form.gender">
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="可发动态" prop="sendDynamic">
<el-radio-group v-model="form.sendDynamic">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { addBanner, getBanner, updateBanner } from '@/api/cai/banner'
import { addUser, getUser, updateUser } from '@/api/cai/user'
export default {
components: {
ImageUpload,
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
nickname: undefined,
avatar: undefined,
gender: undefined,
sendDynamic: undefined,
mobile: undefined,
},
// 表单校验
rules: {
mobile: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
nickname: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
avatar: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
gender: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
sendDynamic: [
{ required: true, message: "数据不能为空", trigger: "blur" }
]
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.title = "修改用户";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getUser(id).then(response => {
this.form = response.data;
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateUser(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,165 @@
<template>
<el-dialog title="封禁" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="封禁用户" prop="">
<div class="context-avatar-center">
{{ userData.nickname }} {{ userData.usercode }} <image-avatar :src="userData.avatar"/>
</div>
</el-form-item>
<el-form-item label="用户目前情况" prop="">
<div>用户{{userData.nickname}}: <span v-html="userForbidMessage"/></div>
<div v-if="userInfoData.lastLoginIp">最后登陆IP【{{userInfoData.lastLoginIp}}】: <span v-html="ipForbidMessage"/></div>
<div v-if="userInfoData.imei">设备号【{{userInfoData.imei}}】: <span v-html="imeiForbidMessage"/></div>
</el-form-item>
<el-form-item label="封禁设备确认" v-if="form.type.includes(3)">
<el-input v-model="userInfoData.imei" disabled />
</el-form-item>
<el-form-item label="封禁IP确认" v-if="form.type.includes(5)">
<el-input v-model="userInfoData.lastLoginIp" disabled />
</el-form-item>
<el-form-item label="封禁类型" prop="type">
<el-checkbox-group v-model="form.type" @change="typeChange">
<el-checkbox :label="1">用户</el-checkbox>
<el-checkbox :label="3">设备</el-checkbox>
<el-checkbox :label="5">登录IP</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="封禁时长" prop="forbidTime">
<el-radio-group v-model="form.forbidTime">
<el-radio
v-for="dict in forbidTimeList"
:key="dict.value"
:label="dict.value"
><span :class="dict.value === 0 ? 'red-color' : ''">{{dict.label}}</span></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="理由" prop="reason">
<el-input v-model="form.reason" placeholder="请输入理由" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getUser, userForbid } from '@/api/cai/user'
import {forbidStatusList, forbidTimeList, forbidTypeList} from "@/constant/statusMap";
import { userForbidInfo } from '@/api/cai/userForbid'
export default {
components: {
ImageUpload,
},
data () {
return {
forbidTypeList,forbidStatusList,
forbidTimeList:[],
open: false,
title: '',
form:{
userId: undefined,
type: [],
forbidTime: undefined,
reason: undefined,
},
userData:{},
userInfoData:{},
userForbid:{},
ipUserForbid:{},
imeiUserForbid:{},
userForbidMessage: '',
ipForbidMessage: '',
imeiForbidMessage: '',
// 表单校验
rules: {
type: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
forbidTime: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
reason: [
{ required: true, message: "数据不能为空", trigger: "blur" }
]
},
buttonLoading: false,
ipShow: false,
uuidShow: false
}
},
created() {
this.forbidTimeList = [{ value: 0, label: '解封' }]
this.forbidTimeList = this.forbidTimeList.concat(forbidTimeList)
},
methods: {
init (userId) {
this.$nextTick(() => {
userForbidInfo(userId).then(res => {
this.userData = res.data.user
this.userInfoData = res.data.userInfo
this.userForbid = res.data.userForbid
this.ipUserForbid = res.data.ipUserForbid
this.imeiUserForbid = res.data.imeiUserForbid
if(this.userForbid){
this.userForbidMessage = `<span style="color: red">`+this.userForbid.endTime+`</span><span style="color: burlywood">`+res.data.userForbidBetween+` 后解封)</span>`
}else{
this.userForbidMessage = `<span style="color: #1ab394">正常</span>`
}
if(this.ipUserForbid){
this.ipForbidMessage = `<span style="color: red">`+this.ipUserForbid.endTime+`</span><span style="color: burlywood">`+res.data.ipForbidBetween+` 后解封)</span>`
}else{
this.ipForbidMessage = `<span style="color: #1ab394">正常</span>`
}
if(this.imeiUserForbid){
this.imeiForbidMessage = `<span style="color: red">`+this.imeiUserForbid.endTime+`</span><span style="color: burlywood">`+res.data.imeiForbidBetween+` 后解封)</span>`
}else{
this.imeiForbidMessage = `<span style="color: #1ab394">正常</span>`
}
})
})
this.form.userId = userId
this.form.type = []
this.form.forbidTime = undefined
this.form.reason = undefined
this.ipShow = false
this.uuidShow = false
this.open = true;
},
typeChange(value){
// this.ipShow = value.includes(3)
// this.uuidShow = value.includes(2)
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
userForbid(this.form).then(data => {
this.$modal.msgSuccess("操作成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
//justify-content: center; /* 水平居中 */
}
.red-color{
color: red;
}
</style>

View File

@@ -0,0 +1,292 @@
<template>
<el-dialog title="用户信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-collapse v-model="activeName" >
<el-collapse-item title="基本信息" name="base">
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="id">
{{info.user.id}}
</el-descriptions-item>
<el-descriptions-item :label="systemName+'号'">
{{info.user.usercode}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{info.user.mobile}}
</el-descriptions-item>
<el-descriptions-item label="头像">
<image-avatar :src="info.user.avatar" />
</el-descriptions-item>
<el-descriptions-item label="性别">
<cai-dict-tag :options="genderList" :value="info.user.gender" />
</el-descriptions-item>
<el-descriptions-item label="年龄">
{{info.user.age}}
</el-descriptions-item>
<el-descriptions-item label="生日">
{{info.user.birthday}}
</el-descriptions-item>
<el-descriptions-item label="城市">
{{info.user.city}}
</el-descriptions-item>
<el-descriptions-item label="昵称">
{{info.user.nickname}}
</el-descriptions-item>
<el-descriptions-item label="相册" :span="3" v-if="info.userAlbums">
<span v-for='val in info.userAlbums'>
<image-preview :src="val.url" height="45px" width="45px" /> &nbsp;&nbsp;
</span>
</el-descriptions-item>
<el-descriptions-item label="资料完成">
<cai-dict-tag :options="authList" :value="info.user.finishStatus" />
</el-descriptions-item>
<el-descriptions-item label="自定义头像">
<cai-dict-tag :options="authList" :value="info.user.avatarState" />
</el-descriptions-item>
<el-descriptions-item label="自拍认证">
<cai-dict-tag :options="authList" :value="info.user.cameraStatus" />
</el-descriptions-item>
<el-descriptions-item label="是否同意协议">
<cai-dict-tag :options="authList" :value="info.user.agreeProtocol" />
</el-descriptions-item>
<el-descriptions-item label="视频状态">
<cai-dict-tag :options="videoStatusList" :value="info.user.videoStatus" />
</el-descriptions-item>
<el-descriptions-item label="状态">
<cai-dict-tag :options="userStatusList" :value="info.user.status" />
</el-descriptions-item>
<el-descriptions-item label="工会">
<cai-dict-tag :options="isAnchorList" :value="info.user.isUnion" />
</el-descriptions-item>
<el-descriptions-item label="好友视频提成">
{{info.userInfo.videoIncomeRate}}
</el-descriptions-item>
<el-descriptions-item label="好友守护提成">
{{info.userInfo.guardIncomeRate}}
</el-descriptions-item>
<el-descriptions-item label="好友礼物提成">
{{info.userInfo.giftIncomeRate}}
</el-descriptions-item>
<el-descriptions-item label="好友充值提成">
{{info.userInfo.payIncomeRate}}
</el-descriptions-item>
<el-descriptions-item label="最后登录IP">
{{info.userInfo.lastLoginIp}}
</el-descriptions-item>
<el-descriptions-item label="最后登录时间">
{{info.userInfo.lastLoginTime}}
</el-descriptions-item>
<el-descriptions-item label="最后登录位置">
{{info.userInfo.lastLocation}}
</el-descriptions-item>
<el-descriptions-item label="注册IP">
{{info.userInfo.regIp}}
</el-descriptions-item>
<el-descriptions-item label="注册时间">
{{info.userInfo.regTime}}
</el-descriptions-item>
<el-descriptions-item label="主播">
<cai-dict-tag :options="isAnchorList" :value="info.user.isAnchor" />
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="钱包" name="account">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="2" size="medium" border>
<el-descriptions-item label="余额">
{{info.account.coin}}
</el-descriptions-item>
<el-descriptions-item label="收益">
{{info.account.incomeCoin}}
</el-descriptions-item>
<el-descriptions-item label="充值总额">
{{info.account.totalBuyMoney}}
</el-descriptions-item>
<el-descriptions-item label="充值总币">
{{info.account.totalBuyCoin}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="会员" name="userMember" v-if="info.userMember">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="类型">
<cai-dict-tag :options="memberTypeList" :value="info.userMember.memberType" />
</el-descriptions-item>
<el-descriptions-item label="过期时间">
{{info.userMember.expireDate}}
</el-descriptions-item>
<el-descriptions-item label="会员状态">
<cai-dict-tag :options="memberStatusList" :value="info.userMember.status" />
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="主播" name="anchor" v-if="info.anchor">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="价格">
{{info.anchor.price}}
</el-descriptions-item>
<el-descriptions-item label="开启视频接听">
<cai-dict-tag :options="openVideoStatusList" :value="info.anchor.openVideoStatus" />
</el-descriptions-item>
<el-descriptions-item label="视频状态">
<cai-dict-tag :options="videoStatusList" :value="info.anchor.videoStatus" />
</el-descriptions-item>
<el-descriptions-item label="隐藏接单">
<cai-dict-tag :options="orderSwitchList" :value="info.anchor.orderSwitch" />
</el-descriptions-item>
<el-descriptions-item label="首页展示">
<cai-dict-tag :options="indexDisplayList" :value="info.anchor.indexDisplay" />
</el-descriptions-item>
<el-descriptions-item label="用户评分">
{{info.anchor.giveScore}}
</el-descriptions-item>
<el-descriptions-item label="服务总次数">
{{info.anchor.serviceCount}}
</el-descriptions-item>
<el-descriptions-item label="服务总时长">
{{info.anchor.serviceTime}}
</el-descriptions-item>
<el-descriptions-item label="视频分成比例">
{{info.anchor.videoRate}}
</el-descriptions-item>
<el-descriptions-item label="守护分成比例">
{{info.anchor.guardRate}}
</el-descriptions-item>
<el-descriptions-item label="礼物分成比列">
{{info.anchor.giftRate}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="在线状态" name="userOnline" v-if="info.userOnline">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="2" size="medium" border>
<el-descriptions-item label="在线状态">
<cai-dict-tag :options="onlineStatusList" :value="info.userOnline.status" />
</el-descriptions-item>
<el-descriptions-item label="最后在线时间">
{{info.userOnline.lastLiveTime}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="会长" name="union" v-if="info.union">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="工会名称">
{{info.union.name}}
</el-descriptions-item>
<el-descriptions-item label="是否开启提成">
<cai-dict-tag :options="booleanList" :value="info.union.enableRate" />
</el-descriptions-item>
<el-descriptions-item label="默认提成">
{{info.union.defaultIncomeRate}}
</el-descriptions-item>
<el-descriptions-item label="全部人数">
{{info.union.allNum}}
</el-descriptions-item>
<el-descriptions-item label="分成的人数">
{{info.union.inDivideNum}}
</el-descriptions-item>
<el-descriptions-item label="不分成人数">
{{info.union.notDivideNum}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="统计" name="userCount" v-if="info.userCount">
<el-descriptions :contentStyle="CS" :label-style="LS" class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="粉丝总数">
{{info.userCount.fansCount}}
</el-descriptions-item>
<el-descriptions-item label="关注数">
{{info.userCount.followCount}}
</el-descriptions-item>
<el-descriptions-item label="足迹数">
{{info.userCount.footCount}}
</el-descriptions-item>
<el-descriptions-item label="访客数">
{{info.userCount.visitorCount}}
</el-descriptions-item>
<el-descriptions-item label="相册数量">
{{info.userCount.photoCount}}
</el-descriptions-item>
<el-descriptions-item label="发帖数量">
{{info.userCount.dynamicCount}}
</el-descriptions-item>
<el-descriptions-item label="收到的礼物数量">
{{info.userCount.receiveGiftCount}}
</el-descriptions-item>
<el-descriptions-item label="送礼总数量">
{{info.userCount.giveGiftCount}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
</el-collapse>
</el-dialog>
</template>
<script>
import {getFullUser, getUser} from "@/api/cai/user";
import {
authList,
genderList,
userStatusList,
isAnchorList,
videoStatusList,
onlineStatusList,
memberTypeList,
memberStatusList,
openVideoStatusList,
orderSwitchList,
indexDisplayList,
booleanList
} from '@/constant/statusMap'
export default {
name: "UserInfo",
data() {
return {
genderList,userStatusList,isAnchorList,authList,videoStatusList,onlineStatusList,memberTypeList,
memberStatusList,openVideoStatusList,orderSwitchList,indexDisplayList,booleanList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
activeName:['base','account','userAlbums'],
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
userId: this.$route.query.id,
};
},
created() {
},
methods: {
init(userId){
this.open = true;
this.userId = userId;
getFullUser(this.userId).then(response => {
this.info = response.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,225 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in auditStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userAlbumList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="审核状态" align="center" prop="auditStatus">
<template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="相册" align="center" prop="url">
<template v-slot="scope">
<image-preview :src="scope.row.url" width="30px" height="30px"/>
</template>
</el-table-column>
<el-table-column label="新增时间" align="center" prop="createTime" />
<el-table-column label="审核时间" align="center" prop="auditTime" />
<!-- <el-table-column label="审核备注" align="center" prop="auditRemark" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template v-slot="scope">
<el-button
size="mini"
type="text"
v-if="scope.row.auditStatus === 1"
@click="handleAuditSuccess(scope.row)"
v-hasPermi="['cai:userAlbum:edit']"
>通过
</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.auditStatus === 1"
@click="handleAuditFail(scope.row)"
v-hasPermi="['cai:userAlbum:edit']"
>不通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:userAlbum:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
auditFailUserAlbum,
auditSuccessUserAlbum,
delUserAlbum,
listUserAlbum,
updateUserAlbum
} from '@/api/cai/userAlbum'
import {auditStatusList, genderList, isAnchorList, userStatusList, yesOrNoList} from "@/constant/statusMap";
export default {
name: "UserAlbum",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList, userStatusList, yesOrNoList, isAnchorList,auditStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 相册管理表格数据
userAlbumList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
auditStatus: 1,
mobile: undefined,
usercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询相册管理列表 */
getList() {
this.loading = true;
listUserAlbum(this.queryParams).then(response => {
this.userAlbumList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleAuditSuccess(row){
this.$modal.confirm('是否确认通过用户为"' + row.nickname + '"的相册?').then(() => {
this.loading = true;
return auditSuccessUserAlbum({
id: row.id
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleAuditFail(row){
this.$modal.confirm('是否不确认通过用户为"' + row.nickname + '"的相册?').then(() => {
this.loading = true;
return auditFailUserAlbum({
id: row.id
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除相册管理编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserAlbum(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,226 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="房间号" prop="id">
<el-input
v-model="queryParams.id"
placeholder="请输入房间号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'拨打方'+systemName+'号'" prop="fromUsercode">
<el-input
v-model="queryParams.fromUsercode"
:placeholder="'请输入拨打方'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'接收方'+systemName+'号'" prop="toUsercode">
<el-input
v-model="queryParams.toUsercode"
:placeholder="'请输入接收方'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
<el-option
v-for="dict in userCallStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userCallList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="房间号" align="center" prop="id" show-overflow-tooltip />
<el-table-column label="拨打方" align="center">
<el-table-column :label="systemName+'号'" align="center" prop="fromUsercode" />
<el-table-column label="手机号" align="center" prop="fromMobile" width="120" />
</el-table-column>
<el-table-column label="接收方" align="center">
<el-table-column :label="systemName+'号'" align="center" prop="toUsercode" />
<el-table-column label="头像" align="center" prop="toAvatar">
<template v-slot="scope">
<image-avatar :src="scope.row.toAvatar"/>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="120">
<template v-slot="scope">
<cai-dict-tag :options="userCallStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="beginTime" width="160"/>
<el-table-column label="结束时间" align="center" prop="endTime" width="160" />
<el-table-column label="通话时长" align="center" prop="callTime" :formatter="callTimeFormatter"/>
<el-table-column label="单价" align="center" prop="callPrice" />
<el-table-column label="金额" align="center" prop="callAmount" />
<el-table-column label="删除状态" align="center" prop="deleteFlag" >
<template v-slot="scope">
<cai-dict-tag :options="deleteFlagList" :value="scope.row.deleteFlag"/>
</template>
</el-table-column>
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleInfo(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-info"
v-if="scope.row.traceId"
@click="handleConsumerLog(scope.row)"
>分销
</el-button>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:userCall:edit']"
>修改</el-button>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<consume-log-info v-if="consumeLogInfoVisible" ref="consumeLogInfo" />
<user-call-info v-if="userCallInfoVisible" ref="userCallInfo" />
</div>
</template>
<script>
import {listUserCall} from "@/api/cai/userCall";
import ConsumeLogInfo from "@/views/cai/consumeLog/consume-log-info";
import UserCallInfo from "@/views/cai/userCall/user-call-info";
import {deleteFlagList, userCallStatusList} from "@/constant/statusMap";
export default {
name: "UserCall",
components:{
ConsumeLogInfo,UserCallInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
userCallStatusList,deleteFlagList,
consumeLogInfoVisible: false,
userCallInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 通话记录表格数据
userCallList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
id: undefined,
fromUsercode: undefined,
toUsercode: undefined,
status: undefined,
deleteFlag: undefined,
},
};
},
created() {
this.getList();
},
methods: {
callTimeFormatter(row,column){
let callTime = row.callTime;
if(!callTime){
return "00:00:00"
}
const hour = parseInt(callTime / 3600) % 24;
const minute = parseInt((callTime % 3600) / 60);
const second = callTime % 60;
return [hour, minute, second].map(function(item) {
return item < 10 ? '0' + item : item;
}).join(':');
},
/** 查询通话记录列表 */
getList() {
this.loading = true;
listUserCall(this.queryParams).then(response => {
this.userCallList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleConsumerLog(row) {
this.consumeLogInfoVisible = true
this.$nextTick(() => {
this.$refs.consumeLogInfo.traceIdInit(row.traceId)
})
},
handleInfo(row){
this.userCallInfoVisible = true
this.$nextTick(() => {
this.$refs.userCallInfo.init(row.id)
})
},
/** 修改按钮操作 */
handleUpdate(row) {
},
}
};
</script>

View File

@@ -0,0 +1,136 @@
<template>
<el-dialog title="通话记录详情" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="房间号">
{{info.id}}
</el-descriptions-item>
<el-descriptions-item label="状态">
<cai-dict-tag :options="userCallStatusList" :value="info.status"/>
</el-descriptions-item>
<el-descriptions-item label="删除状态">
<cai-dict-tag :options="deleteFlagList" :value="info.deleteFlag"/>
</el-descriptions-item>
<el-descriptions-item label="拨打方ID">
{{info.fromUid}}
</el-descriptions-item>
<el-descriptions-item :label="'拨打方'+systemName+'号'">
{{info.fromUsercode}}
</el-descriptions-item>
<el-descriptions-item label="拨打方头像">
<image-avatar :src="info.fromAvatar"/>
</el-descriptions-item>
<el-descriptions-item label="接收方ID">
{{info.toUid}}
</el-descriptions-item>
<el-descriptions-item :label="'接收方'+systemName+'号'">
{{info.toUsercode}}
</el-descriptions-item>
<el-descriptions-item label="接收方头像">
<image-avatar :src="info.toAvatar"/>
</el-descriptions-item>
<el-descriptions-item label="创建时间">
{{info.createTime}}
</el-descriptions-item>
<el-descriptions-item label="开始时间">
{{info.beginTime}}
</el-descriptions-item>
<el-descriptions-item label="结束时间">
{{info.endTime}}
</el-descriptions-item>
<el-descriptions-item label="通话时长">
{{callTimeFormatter(info.callTime)}}
</el-descriptions-item>
<el-descriptions-item label="通话单价">
{{info.callPrice}}
</el-descriptions-item>
<el-descriptions-item label="通话金额">
{{info.callAmount}}
</el-descriptions-item>
<el-descriptions-item label="客户对女神的评分">
{{info.callScore}}
</el-descriptions-item>
<el-descriptions-item label="女神对客户的评分">
{{info.userScore}}
</el-descriptions-item>
<el-descriptions-item label="链路号">
{{info.traceId}}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</template>
<script>
import {deleteFlagList, userCallStatusList} from '@/constant/statusMap'
import {getUserCall, getUserCallByTraceId} from "@/api/cai/userCall";
export default {
name: "UserInfo",
data() {
return {
userCallStatusList,deleteFlagList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
};
},
created() {
},
methods: {
init(id){
this.open = true;
getUserCall(id).then(response => {
this.info = response.data;
});
},
traceIdInit(traceId){
this.open = true;
getUserCallByTraceId(traceId).then(response => {
this.info = response.data;
});
},
callTimeFormatter(callTime){
if(!callTime){
return "00:00:00"
}
const hour = parseInt(callTime / 3600) % 24;
const minute = parseInt((callTime % 3600) / 60);
const second = callTime % 60;
return [hour, minute, second].map(function(item) {
return item < 10 ? '0' + item : item;
}).join(':');
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,233 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in auditStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleBatchAudit(3)"
v-hasPermi="['cai:userCameraAudit:edit']"
>批量审核通过
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userCameraAuditList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id"/>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile" width="95"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="auditStatus">
<template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column label="动作" align="center" prop="actionImage">
<template v-slot="scope">
<image-preview :src="scope.row.actionImage" width="33px" height="33px"/>
</template>
</el-table-column>
<el-table-column label="审核照片" align="center" prop="photo" >
<template v-slot="scope">
<image-preview :src="scope.row.photo" width="33px" height="33px"/>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="createTime" width="160"/>
<el-table-column label="审核次数" align="center" prop="auditCount" />
<el-table-column label="操作ip" align="center" prop="operateIp" show-overflow-tooltip />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="90" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
v-if="scope.row.auditStatus === 1"
@click="handleAudit(scope.row,2)"
v-hasPermi="['cai:userCameraAudit:edit']"
>通过
</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.auditStatus === 1"
@click="handleAudit(scope.row,3)"
v-hasPermi="['cai:userCameraAudit:edit']"
>不通过
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listUserCameraAudit,
delUserCameraAudit,
updateUserCameraAudit,
batchAuditCameraAudit
} from "@/api/cai/userCameraAudit";
import {auditStatusList} from "@/constant/statusMap";
export default {
name: "UserCameraAudit",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
auditStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 自拍认证表格数据
userCameraAuditList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
auditStatus: 1,
mobile: undefined,
usercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询自拍认证列表 */
getList() {
this.loading = true;
listUserCameraAudit(this.queryParams).then(response => {
this.userCameraAuditList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleAudit(row,auditStatus){
let message = auditStatus === 3 ? "通过" : "不通过";
this.$modal.confirm('是否确认'+message+'自拍编号为"' + row.id + '"的数据项?').then(() => {
this.loading = true;
return updateUserCameraAudit({
id: row.id,
auditStatus: auditStatus
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleBatchAudit(auditStatus){
const ids = this.ids;
this.$modal.confirm('是否确认批量审核通过自拍编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return batchAuditCameraAudit({
"ids": ids,
auditStatus: auditStatus
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除自拍认证编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserCameraAudit(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,143 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'发送人'+systemName+'号'" prop="fromUsercode">
<el-input
v-model="queryParams.fromUsercode"
:placeholder="'请输入发送人'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'接收人'+systemName+'号'" prop="toUsercode">
<el-input
v-model="queryParams.toUsercode"
:placeholder="'请输入接收人'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['cai:userChatFilter:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userChatFilterList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="'发送人'+systemName+'号'" align="center" prop="fromUsercode" />
<el-table-column :label="'接收人'+systemName+'号'" align="center" prop="toUsercode" />
<el-table-column label="源内容" align="center" prop="content" show-overflow-tooltip/>
<el-table-column label="替换后内容" align="center" prop="filterContent" show-overflow-tooltip/>
<el-table-column label="时间" align="center" prop="createTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { delUserChatFilter, listUserChatFilter } from '@/api/cai/userChatFilter'
export default {
name: "UserChatFilter",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 聊天过滤表格数据
userChatFilterList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fromUsercode: undefined,
toUsercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询聊天过滤列表 */
getList() {
this.loading = true;
listUserChatFilter(this.queryParams).then(response => {
this.userChatFilterList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除聊天过滤编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserChatFilter(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,118 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'发送人'+systemName+'号'" prop="fromUsercode">
<el-input
v-model="queryParams.fromUsercode"
:placeholder="'请输入发送人'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'接收人'+systemName+'号'" prop="toUsercode">
<el-input
v-model="queryParams.toUsercode"
:placeholder="'请输入接收人'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userChatRecordList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column :label="'发送人'+systemName+'号'" align="center" prop="fromUsercode" />
<el-table-column :label="'接收人'+systemName+'号'" align="center" prop="toUsercode" />
<el-table-column label="内容" align="center" prop="content" show-overflow-tooltip/>
<el-table-column label="时间" align="center" prop="createTime" />
<el-table-column label="链路号" align="center" prop="traceId" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listUserChatRecord} from "@/api/cai/userChatRecord";
import {imTypeList} from "@/constant/statusMap";
export default {
name: "UserChatRecord",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
imTypeList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 聊天记录表格数据
userChatRecordList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fromUsercode: undefined,
toUsercode: undefined,
traceId: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询聊天记录列表 */
getList() {
this.loading = true;
listUserChatRecord(this.queryParams).then(response => {
this.userChatRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
}
};
</script>

View File

@@ -0,0 +1,159 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userCountList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.isAnchor" />
</template>
</el-table-column>
<el-table-column label="粉丝总数" align="center" prop="fansCount"/>
<el-table-column label="关注数" align="center" prop="followCount"/>
<el-table-column label="访客数" align="center" prop="visitorCount"/>
<el-table-column label="相册数量" align="center" prop="photoCount"/>
<el-table-column label="发帖数量" align="center" prop="dynamicCount"/>
<el-table-column label="收到礼物数" align="center" prop="receiveGiftCount"/>
<el-table-column label="送礼总数量" align="center" prop="giveGiftCount"/>
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="userStatusList" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleReset(scope.row)"
v-hasPermi="['cai:userCount:edit']"
>重新计算
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listUserCount, resetUserCount} from "@/api/cai/userCount";
import {genderList, userStatusList, yesOrNoList} from "@/constant/statusMap";
export default {
name: "UserCount",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,userStatusList,yesOrNoList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户信息数量统计表格数据
userCountList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询用户信息数量统计列表 */
getList() {
this.loading = true;
listUserCount(this.queryParams).then(response => {
this.userCountList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.userId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleReset(row) {
this.$modal.confirm('是否确认重新统计用户"' + row.nickname + '"的数据项?').then(() => {
this.loading = true;
return resetUserCount({userId:row.userId});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,216 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in userErrorLogTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="发生地点" prop="homeIndex">
<el-select v-model="queryParams.homeIndex" clearable size="small">
<el-option
v-for="dict in userErrorLogHomeIndexList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userErrorLogList" @selection-change="handleSelectionChange">
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type" >
<template v-slot="scope">
<cai-dict-tag :options="userErrorLogTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="发生地点" align="center" prop="homeIndex" >
<template v-slot="scope">
<cai-dict-tag :options="userErrorLogHomeIndexList" :value="scope.row.homeIndex"/>
</template>
</el-table-column>
<el-table-column label="发生时间" align="center" prop="createTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listUserErrorLog, getUserErrorLog, delUserErrorLog, addUserErrorLog, updateUserErrorLog } from "@/api/cai/userErrorLog";
import { userErrorLogHomeIndexList, userErrorLogTypeList,genderList } from '@/constant/statusMap'
export default {
name: "UserErrorLog",
data() {
return {
userErrorLogTypeList,userErrorLogHomeIndexList,genderList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户异常记录表格数据
userErrorLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
homeIndex: undefined,
usercode: undefined,
mobile: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询用户异常记录列表 */
getList() {
this.loading = true;
listUserErrorLog(this.queryParams).then(response => {
this.userErrorLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加用户异常记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getUserErrorLog(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改用户异常记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateUserErrorLog(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addUserErrorLog(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除用户异常记录编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserErrorLog(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('cai/userErrorLog/export', {
...this.queryParams
}, `userErrorLog_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@@ -0,0 +1,145 @@
<template>
<el-dialog title="高危记录" :close-on-click-modal="false" :visible.sync="open" width="900px" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in userErrorLogTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="发生地点" prop="homeIndex">
<el-select v-model="queryParams.homeIndex" clearable size="small">
<el-option
v-for="dict in userErrorLogHomeIndexList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userErrorLogList" >
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type" >
<template v-slot="scope">
<cai-dict-tag :options="userErrorLogTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="发生地点" align="center" prop="homeIndex" >
<template v-slot="scope">
<cai-dict-tag :options="userErrorLogHomeIndexList" :value="scope.row.homeIndex"/>
</template>
</el-table-column>
<el-table-column label="发生时间" align="center" prop="createTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
import { listMemberPrice } from '@/api/cai/memberPrice'
import { addUserMember } from '@/api/cai/userMember'
import {updateAccountCoin} from "@/api/cai/account";
import {listGoods} from "@/api/cai/goods";
import {
accountTypeList,
genderList,
userErrorLogHomeIndexList,
userErrorLogTypeList,
yesOrNoList
} from '@/constant/statusMap'
import {listAccountChangeLog, listChangeType} from "@/api/cai/accountChangeLog";
import { listUserErrorLog } from '@/api/cai/userErrorLog'
export default {
components: {
},
data () {
return {
userErrorLogTypeList,userErrorLogHomeIndexList,genderList,
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 账户明细表格数据
userErrorLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
homeIndex: undefined,
userId: undefined,
mobile: undefined,
},
}
},
created() {
},
methods: {
init (userId) {
this.open = true;
this.queryParams.userId = userId
this.getList();
},
/** 查询账户明细列表 */
getList() {
this.loading = true;
listUserErrorLog(this.queryParams).then(response => {
this.userErrorLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
}
}
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
</style>

View File

@@ -0,0 +1,206 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
<el-form-item label="封号对象" prop="member">
<el-input
v-model="queryParams.member"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="封号类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in forbidTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleForbidIp"
v-hasPermi="['cai:userForbid:forbidIp']"
>自定义封禁IP</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userForbidList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="类型" align="center" prop="type">
<template v-slot="scope">
<cai-dict-tag :options="forbidTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="封号对象" align="center" prop="member">
<template v-slot="scope">
<div class="context-avatar-center" v-if="scope.row.type === 1">
{{ scope.row.nickname }}{{ scope.row.member }}
<image-avatar :src="scope.row.avatar"/>
</div>
<span v-if="scope.row.type !== 1">
{{ scope.row.member }}
</span>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="beginTime"/>
<el-table-column label="结束时间" align="center" prop="endTime"/>
<el-table-column label="最后封禁理由" align="center" prop="reason"/>
<el-table-column label="状态" align="center" prop="forbidStatus">
<template v-slot="scope">
<cai-dict-tag :options="forbidStatusList" :value="scope.row.forbidStatus"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="120">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-if="scope.row.forbidStatus === 1"
v-hasPermi="['cai:userForbid:unForbid']"
@click="handleForbid(scope.row)"
>解封
</el-button>
<el-button
size="mini"
type="text"
@click="handleForbidLogInfo(scope.row)"
>封禁记录
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<user-forbid-log-list v-if="userForbidLogListVisible" ref="userForbidLogList"/>
<user-forbid-ip-dialog v-if="userForbidIpDialogVisible" ref="userForbidIpDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import {listUserForbid, unForbid} from '@/api/cai/userForbid'
import {forbidStatusList, forbidTimeList, forbidTypeList} from '@/constant/statusMap'
import UserForbidLogList from "@/views/cai/userForbid/user-forbid-log-list";
import UserForbidIpDialog from "@/views/cai/userForbid/user-forbid-ip-dialog";
export default {
name: "UserForbid",
components: {
UserForbidLogList,UserForbidIpDialog
},
data() {
return {
forbidTimeList, forbidTypeList, forbidStatusList,
userForbidLogListVisible: false,
userForbidIpDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 封号列表表格数据
userForbidList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userUsercode: undefined,
userMobile: undefined,
type: undefined,
member: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询封号列表列表 */
getList() {
this.loading = true;
listUserForbid(this.queryParams).then(response => {
this.userForbidList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleForbid(row) {
this.$modal.confirm('是否确认解封对象:"' + row.member + '"的数据项?').then(() => {
this.loading = true;
return unForbid(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("解封成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleForbidLogInfo(row) {
this.userForbidLogListVisible = true
this.$nextTick(() => {
this.$refs.userForbidLogList.init(row.member)
})
},
handleForbidIp(){
this.userForbidIpDialogVisible = true
this.$nextTick(() => {
this.$refs.userForbidIpDialog.init()
})
}
}
};
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
</style>

View File

@@ -0,0 +1,99 @@
<template>
<el-dialog title="封禁IP" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="封禁IP" prop="ip">
<el-input v-model="form.ip" />
</el-form-item>
<el-form-item label="封禁时长" prop="forbidTime">
<el-radio-group v-model="form.forbidTime">
<el-radio
v-for="dict in forbidTimeList"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="理由" prop="remark">
<el-input v-model="form.remark" placeholder="请输入理由" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import {forbidStatusList, forbidTimeList, forbidTypeList} from "@/constant/statusMap";
import {forbidIp} from "@/api/cai/userForbid";
export default {
components: {
ImageUpload,
},
data () {
return {
forbidTimeList,
forbidTypeList,forbidStatusList,
open: false,
title: '',
form:{
ip: undefined,
forbidTime: undefined,
remark: undefined,
},
info:{
},
// 表单校验
rules: {
ip: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
forbidTime: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
remark: [
{ required: true, message: "数据不能为空", trigger: "blur" }
]
},
buttonLoading: false,
}
},
created() {
},
methods: {
init () {
this.form.forbidTime = undefined
this.form.ip = undefined
this.form.remark = undefined
this.open = true;
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
forbidIp(this.form).then(data => {
this.$modal.msgSuccess("操作成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
//justify-content: center; /* 水平居中 */
}
</style>

View File

@@ -0,0 +1,129 @@
<template>
<el-dialog title="账户明细" :close-on-click-modal="false" :visible.sync="open" width="1000px" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="封号类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in forbidTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="封号时长" prop="forbidTime">
<el-select v-model="queryParams.forbidTime" clearable size="small">
<el-option
v-for="dict in forbidTimeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userForbidLogList">
<el-table-column label="类型" align="center" prop="type">
<template v-slot="scope">
<cai-dict-tag :options="forbidTypeList" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="封号对象" align="center" prop="member" >
<template v-slot="scope">
<span v-if="scope.row.type === 1">
{{scope.row.nickname}}{{scope.row.member}}<image-avatar :src="scope.row.avatar"/>
</span>
<span v-if="scope.row.type !== 1">
{{scope.row.member}}
</span>
</template>
</el-table-column>
<el-table-column label="封号时长" align="center" prop="forbidTime">
<template v-slot="scope">
<cai-dict-tag :options="forbidTimeList" :value="scope.row.forbidTime" />
</template>
</el-table-column>
<el-table-column label="理由" align="center" prop="reason"/>
<el-table-column label="封号时间" align="center" prop="createTime"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {forbidStatusList, forbidTimeList, forbidTypeList} from "@/constant/statusMap";
import {listUserForbidLog} from "@/api/cai/userForbidLog";
export default {
components: {
},
data () {
return {
forbidTimeList,forbidTypeList,forbidStatusList,
open: false,
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 账户明细表格数据
userForbidLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
member: undefined,
forbidTime: undefined,
},
changeTypeList:[],
}
},
created() {
},
methods: {
init (member) {
this.open = true;
this.queryParams.member = member
this.getList();
},
/** 查询账户明细列表 */
getList() {
this.loading = true;
listUserForbidLog(this.queryParams).then(response => {
this.userForbidLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
}
}
</script>

View File

@@ -0,0 +1,146 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="封号对象" prop="member">
<el-input
v-model="queryParams.member"
placeholder="请输入封号对象"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="封号类型" prop="type">
<el-select v-model="queryParams.type" clearable size="small">
<el-option
v-for="dict in forbidTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="封号时长" prop="forbidTime">
<el-select v-model="queryParams.forbidTime" clearable size="small">
<el-option
v-for="dict in forbidTimeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userForbidLogList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="类型" align="center" prop="type">
<template v-slot="scope">
<cai-dict-tag :options="forbidTypeList" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="封号对象" align="center" prop="member" >
<template v-slot="scope">
<div class="context-avatar-center" v-if="scope.row.type === 1">
{{scope.row.nickname}}{{scope.row.member}}<image-avatar :src="scope.row.avatar"/>
</div>
<span v-if="scope.row.type !== 1">
{{scope.row.member}}
</span>
</template>
</el-table-column>
<el-table-column label="封号时长" align="center" prop="forbidTime">
<template v-slot="scope">
<cai-dict-tag :options="forbidTimeList" :value="scope.row.forbidTime" />
</template>
</el-table-column>
<el-table-column label="理由" align="center" prop="reason"/>
<el-table-column label="封号时间" align="center" prop="createTime"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listUserForbidLog} from "@/api/cai/userForbidLog";
import {forbidStatusList, forbidTimeList, forbidTypeList} from "@/constant/statusMap";
export default {
name: "UserForbidLog",
data() {
return {
forbidTimeList,forbidTypeList,forbidStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 封禁记录表格数据
userForbidLogList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
member: undefined,
forbidTime: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询封禁记录列表 */
getList() {
this.loading = true;
listUserForbidLog(this.queryParams).then(response => {
this.userForbidLogList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
}
};
</script>
<style lang="scss" scoped>
.context-avatar-center {
display: flex;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
</style>

View File

@@ -0,0 +1,188 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'赠送者'+systemName+'号'" prop="fromUsercode">
<el-input
v-model="queryParams.fromUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="赠送者手机号" prop="fromMobile">
<el-input
v-model="queryParams.fromMobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'接收者'+systemName+'号'" prop="toUsercode">
<el-input
v-model="queryParams.toUsercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="接收者手机号" prop="toMobile">
<el-input
v-model="queryParams.toMobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="链路号" prop="traceId">
<el-input
v-model="queryParams.traceId"
placeholder="请输入链路号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userGiftList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="类型" align="center" prop="type">
<template v-slot="scope">
<cai-dict-tag :options="userGiftTypeList" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="发生时间" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column :label="'赠送'+systemName+'号'" align="center" prop="fromUsercode"/>
<el-table-column label="赠送手机号" align="center" prop="fromMobile"/>
<el-table-column :label="'接受'+systemName+'号'" align="center" prop="toUsercode"/>
<el-table-column label="接受手机号" align="center" prop="toMobile"/>
<el-table-column label="礼物" align="center" prop="giftImg">
<template v-slot="scope">
<image-preview :src="scope.row.giftImg" :width="30" :height="30"/>
</template>
</el-table-column>
<el-table-column label="礼物价格" align="center" prop="giftPrice"/>
<el-table-column label="礼物数量" align="center" prop="giftCount"/>
<el-table-column label="礼物总额" align="center" prop="giftAmount"/>
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100">
<template v-slot="scope">
<el-button
size="mini"
type="text"
v-if="scope.row.traceId"
@click="handleConsumerLog(scope.row)"
>分销记录
</el-button>
<el-button
size="mini"
type="text"
@click="handleInfo(scope.row)"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<consume-log-info v-if="consumeLogInfoVisible" ref="consumeLogInfo" />
<user-gift-info v-if="userGiftInfoVisible" ref="userGiftInfo" />
</div>
</template>
<script>
import {listUserGift} from "@/api/cai/userGift";
import {userGiftTypeList} from "@/constant/statusMap";
import ConsumeLogInfo from "@/views/cai/consumeLog/consume-log-info";
import UserGiftInfo from "@/views/cai/userGift/user-gift-info";
export default {
name: "UserGift",
components: {
ConsumeLogInfo,UserGiftInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
userGiftTypeList,
consumeLogInfoVisible: false,
userGiftInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 礼物流水表格数据
userGiftList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: undefined,
toUsercode: undefined,
toMobile: undefined,
fromUsercode: undefined,
fromMobile: undefined,
traceId: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询礼物流水列表 */
getList() {
this.loading = true;
listUserGift(this.queryParams).then(response => {
this.userGiftList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleConsumerLog(row) {
this.consumeLogInfoVisible = true
this.$nextTick(() => {
this.$refs.consumeLogInfo.traceIdInit(row.traceId)
})
},
handleInfo(row){
this.userGiftInfoVisible = true
this.$nextTick(() => {
this.$refs.userGiftInfo.init(row.id)
})
}
}
};
</script>

View File

@@ -0,0 +1,102 @@
<template>
<el-dialog title="礼物流水详情" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="类型">
<cai-dict-tag :options="userGiftTypeList" :value="info.type"/>
</el-descriptions-item>
<el-descriptions-item label="发生时间">
{{info.createTime}}
</el-descriptions-item>
<el-descriptions-item label="礼物">
<image-preview :src="info.giftImg" :width="34" :height="34"/>
</el-descriptions-item>
<el-descriptions-item :label="'赠送'+systemName+'号'">
{{info.fromUsercode}}
</el-descriptions-item>
<el-descriptions-item label="赠送手机号" :span="2">
{{info.fromMobile}}
</el-descriptions-item>
<el-descriptions-item :label="'接受'+systemName+'号'">
{{info.toUsercode}}
</el-descriptions-item>
<el-descriptions-item label="接受手机号" :span="2">
{{info.toMobile}}
</el-descriptions-item>
<el-descriptions-item label="礼物价格">
{{info.giftPrice}}
</el-descriptions-item>
<el-descriptions-item label="礼物数量">
{{info.giftCount}}
</el-descriptions-item>
<el-descriptions-item label="礼物总额">
{{info.giftAmount}}
</el-descriptions-item>
<el-descriptions-item label="链路号">
{{info.traceId}}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</template>
<script>
import {userGiftTypeList} from '@/constant/statusMap'
import {getUserGift, getUserGiftByTraceId} from "@/api/cai/userGift";
export default {
name: "UserInfo",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
userGiftTypeList,
activeName:['base','account','userAlbums'],
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
};
},
created() {
},
methods: {
init(id){
this.open = true;
getUserGift(id).then(response => {
this.info = response.data;
});
},
traceIdInit(traceId){
this.open = true;
getUserGiftByTraceId(traceId).then(response => {
this.info = response.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,228 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in auditStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleBatchAudit(3)"
v-hasPermi="['cai:userGreet:edit']"
>批量审核通过
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userGreetList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="ID" align="center" prop="id" width="60"/>
<el-table-column :label="systemName+'号'" align="center" prop="usercode" width="60"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="头像" align="center" prop="avatar">
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="auditStatus">
<template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column label="标题" align="center" prop="title" show-overflow-tooltip/>
<el-table-column label="提交时间" align="center" prop="createTime" width="160"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.auditStatus === 1"
@click="handleAudit(scope.row,2)"
v-hasPermi="['cai:userGreet:edit']"
>通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.auditStatus === 1"
@click="handleAudit(scope.row,3)"
v-hasPermi="['cai:userGreet:edit']"
>不通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:userGreet:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {batchAuditUserGreet, delUserGreet, listUserGreet, updateUserGreet} from "@/api/cai/userGreet";
import {auditStatusList} from "@/constant/statusMap";
export default {
name: "UserGreet",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
auditStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 群发审核表格数据
userGreetList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
auditStatus: 1,
mobile: undefined,
usercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询群发审核列表 */
getList() {
this.loading = true;
listUserGreet(this.queryParams).then(response => {
this.userGreetList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleAudit(row,auditStatus){
let message = auditStatus === 3 ? "通过" : "不通过";
this.$modal.confirm('是否确认'+message+'群发审核编号为"' + row.id + '"的数据项?').then(() => {
this.loading = true;
return updateUserGreet({
id: row.id,
auditStatus: auditStatus
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleBatchAudit(auditStatus){
const ids = this.ids;
this.$modal.confirm('是否确认批量审核通过群发审核编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return batchAuditUserGreet({
"ids": ids,
auditStatus: auditStatus
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除群发审核编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserGreet(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,183 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-select v-model="queryParams.gender" placeholder="性别" clearable size="small">
<el-option
v-for="dict in genderList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="主播" prop="isAnchor">
<el-select v-model="queryParams.isAnchor" placeholder="是否为主播" clearable size="small">
<el-option label="是" :value="1" />
<el-option label="否" :value="0" />
</el-select>
</el-form-item>
<el-form-item label="会长" prop="isUnion">
<el-select v-model="queryParams.isUnion" placeholder="是否为会长" clearable size="small">
<el-option label="是" :value="1" />
<el-option label="否" :value="0" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<span style="color: red">提示好友守护礼物视频分成只有主播好友才有非主播设置无效 会长好友提成默认多一些</span>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userInfoList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机号" align="center" prop="mobile" width="120"/>
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="会长" align="center" prop="isUnion">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isUnion"/>
</template>
</el-table-column>
<el-table-column label="好友守护分成" align="center" prop="guardIncomeRate" />
<el-table-column label="好友礼物分成" align="center" prop="giftIncomeRate" />
<el-table-column label="好友视频分成" align="center" prop="videoIncomeRate" />
<el-table-column label="好友充值分成" align="center" prop="payIncomeRate" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:userInfo:edit']"
>修改提成</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<update-user-info-dialog v-if="updateUserInfoDialogVisible" ref="updateUserInfoDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import {listUserInfo} from "@/api/cai/userInfo";
import {genderList, isAnchorList} from "@/constant/statusMap";
import UpdateUserInfoDialog from "@/views/cai/userInfo/update-user-info-dialog";
export default {
name: "UserInfo",
components: {UpdateUserInfoDialog},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,isAnchorList,
updateUserInfoDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户好友提成表格数据
userInfoList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
isAnchor: undefined,
gender: undefined,
mobile: undefined,
usercode: undefined,
isUnion: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询用户好友提成列表 */
getList() {
this.loading = true;
listUserInfo(this.queryParams).then(response => {
this.userInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.userId)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleUpdate(row){
this.updateUserInfoDialogVisible = true
this.$nextTick(() => {
this.$refs.updateUserInfoDialog.init(row)
})
},
}
};
</script>

View File

@@ -0,0 +1,100 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input v-model="form.usercode" disabled />
</el-form-item>
<el-form-item label="好友守护分成" prop="guardIncomeRate">
<el-input-number v-model="form.guardIncomeRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
<el-form-item label="好友礼物分成" prop="giftIncomeRate">
<el-input-number v-model="form.giftIncomeRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
<el-form-item label="好友视频分成" prop="videoIncomeRate">
<el-input-number v-model="form.videoIncomeRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
<el-form-item label="好友充值分成" prop="payIncomeRate">
<el-input-number v-model="form.payIncomeRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload'
import {getUserInfo, updateUserInfo} from "@/api/cai/userInfo";
export default {
components: {
ImageUpload,
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
id: undefined,
usercode: undefined,
guardIncomeRate: undefined,
giftIncomeRate: undefined,
videoIncomeRate: undefined,
payIncomeRate: undefined,
},
// 表单校验
rules: {
guardIncomeRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
giftIncomeRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
videoIncomeRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
payIncomeRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (row) {
let id = row.id
this.form.id = id || undefined;
this.title = "修改用户好友提成";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getUserInfo(id).then(response => {
this.form = response.data;
this.form.usercode = row.usercode
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateUserInfo(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,194 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="'邀请人'+systemName+'号'" prop="inviteUsercode">
<el-input
v-model="queryParams.inviteUsercode"
:placeholder="'请输入邀请人'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="邀请人手机号" prop="inviteMobile">
<el-input
v-model="queryParams.inviteMobile"
placeholder="请输入邀请人手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="'被邀请人'+systemName+'号'" label-width="110px" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入被邀请人'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="被邀请人手机" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入被邀请人手机"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="工会名称" prop="unionName">
<el-input
v-model="queryParams.unionName"
placeholder="请输入邀请人手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userInviteList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="邀请人" align="center">
<el-table-column :label="systemName+'号'" align="center" prop="inviteUsercode"/>
<el-table-column label="手机号" align="center" prop="inviteMobile"/>
<el-table-column label="是否为会长" align="center" prop="inviteIsUnion">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.inviteIsUnion"/>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="被邀请人" align="center">
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="收益" align="center" prop="rewardCoinTotal"/>
</el-table-column>
<!-- <el-table-column label="所属工会" align="center" prop="unionName"/>-->
<el-table-column label="好友守护分成" align="center" prop="guardIncomeRate" />
<el-table-column label="好友礼物分成" align="center" prop="giftIncomeRate" />
<el-table-column label="好友视频分成" align="center" prop="videoIncomeRate" />
<el-table-column label="好友充值分成" align="center" prop="payIncomeRate" />
<el-table-column label="是否有效" align="center" prop="enableRate" >
<template v-slot="scope">
<cai-dict-tag :options="booleanList" :value="scope.row.enableRate"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="!scope.row.enableRate"
@click="handleEnableRate(scope.row,true)"
v-hasPermi="['cai:userInvite:edit']"
>开启</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.enableRate"
@click="handleEnableRate(scope.row,false)"
v-hasPermi="['cai:userInvite:edit']"
>关闭</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listUserInvite, updateUserInvite} from "@/api/cai/userInvite";
import {booleanList, isAnchorList} from "@/constant/statusMap";
export default {
name: "UserInvite",
components: {
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
isAnchorList,booleanList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户邀请表格数据
userInviteList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined,
inviteUsercode: undefined,
inviteMobile: undefined,
unionName: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询用户邀请列表 */
getList() {
this.loading = true;
listUserInvite(this.queryParams).then(response => {
this.userInviteList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleEnableRate(row,enableRate) {
let message = enableRate ? '开启' : '关闭';
this.$modal.confirm('是否确认'+message+'用户"' + row.usercode + '"的好友邀请奖励?').then(() => {
this.loading = true;
return updateUserInvite({
id:row.id,
enableRate:enableRate
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
}
}
};
</script>

View File

@@ -0,0 +1,117 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="开通会员" prop="memberPriceId">
<el-select v-model="form.memberPriceId" placeholder="开通会员" clearable size="small">
<el-option
v-for="dict in memberPriceList"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="systemName+'号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="昵称" v-if="info.nickname">
{{ info.nickname }} {{ info.usercode }}
</el-form-item>
<el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/>
</el-form-item>
<el-form-item>
注意若用户已是会员再次设置时将会使用最新的会员信息
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
import { listMemberPrice } from '@/api/cai/memberPrice'
import { addUserMember } from '@/api/cai/userMember'
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
usercode: undefined,
memberPriceId: undefined
},
info:{
},
memberPriceList:[],
// 表单校验
rules: {
usercode: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
memberPriceId: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
listMemberPrice().then(response=> {
this.memberPriceList = response.rows
})
},
methods: {
init () {
this.open = true;
this.title = "新增会员"
this.info = {};
this.form.usercode = undefined
},
querySearch(querySearch,cb){
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal,
};
}))
})
},
handleSelect(item){
getUserByUsercode(item.value).then(res => {
this.info = res.data
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addUserMember(this.form).then(data => {
this.$modal.msgSuccess("新增工会成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,220 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会员状态" prop="memberStatus">
<el-select v-model="queryParams.memberStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in memberStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:userMember:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userMemberList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="会员状态" align="center" prop="memberStatus">
<template v-slot="scope">
<cai-dict-tag :options="memberStatusList" :value="scope.row.memberStatus" />
</template>
</el-table-column>
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机" align="center" prop="mobile" />
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="会员类型" align="center" prop="memberType" >
<template v-slot="scope">
<cai-dict-tag :options="memberTypeList" :value="scope.row.memberType" />
</template>
</el-table-column>
<!-- <el-table-column label="永久" align="center" prop="longs" >
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.longs" />
</template>
</el-table-column>-->
<!-- <el-table-column label="天数" align="center" prop="expire" />-->
<el-table-column label="到期时间" align="center" prop="expireDate" width="150" >
<template v-slot="scope">
<el-tag v-if="scope.row.longs === 1" type="primary">永久会员</el-tag>
<span v-if="scope.row.longs === 0" >{{ scope.row.expireDate }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="购买时间" align="center" prop="createTime" width="150" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="120">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:userMember:remove']"
>解除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleVipOrder(scope.row)"
>记录</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<add-member-dialog v-if="addMemberDialogVisible" ref="addMemberDialog" @refreshDataList="getList" />
<vip-order-dialog v-if="vipOrderDialogVisible" ref="vipOrderDialog" />
</div>
</template>
<script>
import { delUserMember, listUserMember } from '@/api/cai/userMember'
import { genderList, memberStatusList, memberTypeList, yesOrNoList } from '@/constant/statusMap'
import AddMemberDialog from '@/views/cai/userMember/add-member-dialog.vue'
import VipOrderDialog from '@/views/cai/userMember/vip-order-dialog.vue'
export default {
name: "UserMember",
components: {
AddMemberDialog,VipOrderDialog
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,memberTypeList,yesOrNoList,memberStatusList,
addMemberDialogVisible: false,
vipOrderDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
memberPriceList:[],
// 会员管理表格数据
userMemberList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined,
memberStatus: 0
},
};
},
created() {
this.getList();
},
methods: {
/** 查询会员管理列表 */
getList() {
this.loading = true;
listUserMember(this.queryParams).then(response => {
this.userMemberList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd(row) {
this.addMemberDialogVisible = true
this.$nextTick(() => {
this.$refs.addMemberDialog.init(row?.usercode)
})
},
handleVipOrder(row){
this.vipOrderDialogVisible = true
this.$nextTick(() => {
this.$refs.vipOrderDialog.init(row)
})
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认解除用户"' + row.usercode + '"的会员数据?').then(() => {
this.loading = true;
return delUserMember(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("解除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,116 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="1000px" append-to-body>
<el-row :gutter="10" class="mb8">
<right-toolbar @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="vipOrderList" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="VIP名称" align="center" prop="vipName" />
<el-table-column label="时长" align="center" prop="vipLongs">
<template v-slot="scope">
<el-tag v-if="scope.row.vipLongs === 1" type="primary">永久会员</el-tag>
<span v-if="scope.row.vipLongs === 0" >{{ scope.row.vipExpire }}</span>
</template>
</el-table-column>
<el-table-column label="价格" align="center" prop="price" />
<el-table-column label="平台" align="center" prop="platformType">
<template v-slot="scope">
<cai-dict-tag :options="platformTypeList" :value="scope.row.platformType" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="payStatus" >
<template v-slot="scope">
<cai-dict-tag :options="payStatusList" :value="scope.row.payStatus" />
</template>
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" width="160"/>
<el-table-column label="后台新增" align="center" prop="admin" >
<template v-slot="scope">
<cai-dict-tag :options="booleanList" :value="scope.row.admin" />
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {
booleanList,
genderList,
memberStatusList,
memberTypeList, payStatusList,
platformTypeList,
yesOrNoList
} from '@/constant/statusMap'
import { listVipOrder } from '@/api/cai/vipOrder'
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,memberTypeList,yesOrNoList,memberStatusList,booleanList,platformTypeList,
payStatusList,
loading: true,
open: false,
title: '',
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// VIP订单表格数据
vipOrderList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usedPay: true,
usercode: undefined,
},
}
},
created() {
},
methods: {
init (row) {
this.open = true;
this.queryParams.usercode = row.usercode
this.getList()
this.title = "会员开通记录"
},
/** 查询VIP订单列表 */
getList() {
this.loading = true;
listVipOrder(this.queryParams).then(response => {
this.vipOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
}
}
</script>

View File

@@ -0,0 +1,239 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable size="small">
<el-option
v-for="dict in auditStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['cai:userPictureAudit:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userPictureAuditList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="审核状态" align="center" prop="auditStatus">
<template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
<el-table-column label="手机号" align="center" prop="mobile"/>
<el-table-column label="昵称" align="center" prop="nickname"/>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender"/>
</template>
</el-table-column>
<el-table-column label="主播" align="center" prop="isAnchor">
<template v-slot="scope">
<cai-dict-tag :options="isAnchorList" :value="scope.row.isAnchor"/>
</template>
</el-table-column>
<el-table-column label="修改前" align="center" prop="beforeUrl" >
<template v-slot="scope">
<image-preview :src="scope.row.beforeUrl" width="30px" height="30px"/>
</template>
</el-table-column>
<el-table-column label="修改后" align="center" prop="url">
<template v-slot="scope">
<image-preview :src="scope.row.url" width="30px" height="30px"/>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" prop="auditTime" width="180" />
<!-- <el-table-column label="审核备注" align="center" prop="auditRemark" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
v-if="scope.row.auditStatus === 1"
@click="handleAuditSuccess(scope.row)"
v-hasPermi="['cai:userPictureAudit:edit']"
>通过
</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.auditStatus === 1"
@click="handleAuditFail(scope.row)"
v-hasPermi="['cai:userPictureAudit:edit']"
>不通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:userPictureAudit:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
auditFailUserPictureAudit,
auditSuccessUserPictureAudit,
delUserPictureAudit,
listUserPictureAudit
} from '@/api/cai/userPictureAudit'
import { auditStatusList, genderList, isAnchorList, userStatusList, yesOrNoList } from '@/constant/statusMap'
export default {
name: "UserPictureAudit",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList, userStatusList, yesOrNoList, isAnchorList,auditStatusList,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 头像审核表格数据
userPictureAuditList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
auditStatus: 1,
mobile: undefined,
usercode: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询头像审核列表 */
getList() {
this.loading = true;
listUserPictureAudit(this.queryParams).then(response => {
this.userPictureAuditList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleAuditSuccess(row){
this.$modal.confirm('是否确认通过用户为"' + row.nickname + '"的头像审核?').then(() => {
this.loading = true;
return auditSuccessUserPictureAudit({
id: row.id
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
handleAuditFail(row){
this.$modal.confirm('是否不确认通过用户为"' + row.nickname + '"的头像审核?').then(() => {
this.loading = true;
return auditFailUserPictureAudit({
id: row.id
});
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除头像审核编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delUserPictureAudit(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,97 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="昵称" v-if="info.nickname">
{{ info.nickname }} {{ info.usercode }}
</el-form-item>
<el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {addUserUnion} from "@/api/cai/userUnion";
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
id: undefined,
usercode: undefined,
},
info:{
},
// 表单校验
rules: {
usercode: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init () {
this.open = true;
this.title = "新增工会"
this.info = {};
this.form.usercode = undefined
},
querySearch(querySearch,cb){
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal,
};
}))
})
},
handleSelect(item){
getUserByUsercode(item.value).then(res => {
this.info = res.data
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addUserUnion(this.form).then(data => {
this.$modal.msgSuccess("新增工会成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,218 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:userUnion:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userUnionList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column :label="systemName+'号'" align="center" prop="usercode" width="60"/>
<el-table-column label="工会名" align="center" prop="name" />
<el-table-column label="开启提成" align="center" prop="enableRate" width="80">
<template v-slot="scope">
<cai-dict-tag :options="booleanList" :value="scope.row.enableRate"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="unionTime" width="150"/>
<el-table-column label="工会人数" align="center" prop="allNum"/>
<el-table-column label="主播人数" align="center" prop="anchorNum"/>
<!-- <el-table-column label="分成人数" align="center" prop="inDivideNum"/>-->
<!-- <el-table-column label="不分成人数" align="center" prop="notDivideNum"/>-->
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<cai-dict-tag :options="userStatusList" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:userUnion:remove']"
>修改
</el-button>
<el-button
size="mini"
type="text"
@click="handleDetail(scope.row)"
>详情
</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['cai:userUnion:remove']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleDelete" icon="el-icon-delete" v-hasPermi="['cai:userUnion:remove']">解散</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<union-update-dialog v-if="unionUpdateDialogVisible" ref="unionUpdateDialog" @refreshDataList="getList"/>
<add-union-dialog v-if="addUnionDialogVisible" ref="addUnionDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import {delUserUnion, listUserUnion} from '@/api/cai/userUnion'
import {booleanList, genderList, userStatusList} from '@/constant/statusMap'
import UnionUpdateDialog from "@/views/cai/userUnion/union-update-dialog";
import AddUnionDialog from "@/views/cai/userUnion/add-union-dialog";
export default {
name: 'UserUnion',
components: {
UnionUpdateDialog,AddUnionDialog
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList, booleanList, userStatusList,
unionUpdateDialogVisible: false,
addUnionDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工会列表表格数据
userUnionList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usercode: undefined,
mobile: undefined,
},
}
},
created() {
this.getList()
},
methods: {
/** 查询工会列表列表 */
getList() {
this.loading = true
listUserUnion(this.queryParams).then(response => {
this.userUnionList = response.rows
this.total = response.total
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.unionUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.unionUpdateDialog.init(row)
})
},
handleAdd(row){
this.addUnionDialogVisible = true
this.$nextTick(() => {
this.$refs.addUnionDialog.init(row)
})
},
handleDetail(row){
const params = { unionId: row.id };
this.$tab.openPage("["+row.name+"]工会详情", '/tool/union-user/index', params);
},
/** 删除按钮操作 */
handleDelete(row) {
// '是否确认删除商家名称为"' + row.nickName + '"的数据项?删除后无法回归!'
const html = `<p>确认解散【<span style="color: red">` + row.name + `</span>】工会 吗?</p>`
+ `<p>该工会共有:<span style="color: red">` + row.allNum + `</span>人</p>`
+ `<p>工会解散后,会长的一级好友提成比例也会回归默认值</p>`
+ `<p style="color: red">删除后将无法撤回,请谨慎操作</p>`
this.$confirm(html, '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
this.loading = true
return delUserUnion(row.id)
}).then(() => {
this.loading = false
this.getList()
this.$modal.msgSuccess('解散成功')
}).catch(() => {
}).finally(() => {
this.loading = false
})
},
handleCommand(command, row) {
switch (command) {
case "handleDelete":
this.handleDelete(row);
break;
default:
break;
}
},
}
}
</script>

View File

@@ -0,0 +1,97 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="昵称" prop="nickname">
<el-input v-model="form.nickname" placeholder="" disabled />
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="form.mobile" placeholder="" disabled />
</el-form-item>
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input v-model="form.usercode" placeholder="" disabled />
</el-form-item>
<el-form-item label="开启提成" prop="enableRate">
<el-radio-group v-model="form.enableRate">
<el-radio :label="true">开启</el-radio>
<el-radio :label="false">关闭</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="默认提成" prop="defaultIncomeRate">
<el-input v-model="form.defaultIncomeRate" />
</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getUserUnion, updateUserUnion} from "@/api/cai/userUnion";
export default {
components: {
},
data () {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
open: false,
title: '',
form:{
id: undefined,
nickname: undefined,
mobile: undefined,
usercode: undefined,
// defaultIncomeRate: undefined,
enableRate: undefined,
},
// 表单校验
rules: {
enableRate: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
// defaultIncomeRate: [
// { required: true, message: "数据不能为空", trigger: "blur" }
// ],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (row) {
let id = row.id;
this.form.id = id || undefined;
this.title = "修改工会配置";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getUserUnion(id).then(response => {
this.form = response.data;
this.form.nickname = row.nickname;
this.form.usercode = row.usercode;
this.form.mobile = row.mobile;
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateUserUnion(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,198 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:version:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['cai:version:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['cai:version:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="versionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="平台" align="center" prop="platform" >
<template v-slot="scope">
<cai-dict-tag :options="versionPlatformList" :value="scope.row.platform"/>
</template>
</el-table-column>
<el-table-column label="旧版本号" align="center" prop="oldVersion" />
<el-table-column label="新版本号" align="center" prop="newVersion" />
<el-table-column label="包大小" align="center" prop="packageSize" />
<el-table-column label="升级内容" align="center" prop="content" show-overflow-tooltip/>
<el-table-column label="下载地址" align="center" prop="downloadUrl" />
<el-table-column label="强制更新" align="center" prop="enforce">
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.enforce"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="enableStatus">
<template v-slot="scope">
<cai-dict-tag :options="enableStatusList" :value="scope.row.enableStatus"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:version:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:version:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<version-add-update-dialog v-if="versionAddOrUpdateDialogVisible" ref="versionAddOrUpdateDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import { delVersion, listVersion } from '@/api/cai/version'
import { enableStatusList, versionPlatformList, yesOrNoList } from '@/constant/statusMap'
import VersionAddUpdateDialog from '@/views/cai/version/version-add-update-dialog.vue'
export default {
name: "Version",
components:{
VersionAddUpdateDialog
},
data() {
return {
versionPlatformList,yesOrNoList,enableStatusList,
versionAddOrUpdateDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 版本表格数据
versionList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询版本列表 */
getList() {
this.loading = true;
listVersion(this.queryParams).then(response => {
this.versionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.versionAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.versionAddOrUpdateDialog.init()
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.versionAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.versionAddOrUpdateDialog.init(row.id)
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除版本编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delVersion(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
}
};
</script>

View File

@@ -0,0 +1,161 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="平台" prop="platform">
<el-select v-model="form.platform" clearable size="small">
<el-option
v-for="dict in versionPlatformList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="安卓内部版本号" prop="versionCode">
<el-input v-model="form.versionCode" placeholder="请输入" />
</el-form-item>
<el-form-item label="旧版本号" prop="oldVersion">
<el-input v-model="form.oldVersion" placeholder="请输入旧版本号" />
</el-form-item>
<el-form-item label="新版本号" prop="newVersion">
<el-input v-model="form.newVersion" placeholder="请输入新版本号" />
</el-form-item>
<el-form-item label="包大小" prop="packageSize">
<el-input v-model="form.packageSize" placeholder="请输入包大小" />
</el-form-item>
<el-form-item label="升级内容" prop="content">
<el-input v-model="form.content" type="textarea" />
<!-- <editor v-model="form.content" :min-height="192"/>-->
</el-form-item>
<el-form-item label="下载地址" prop="downloadUrl">
<el-input v-model="form.downloadUrl" placeholder="请输入下载地址" />
</el-form-item>
<el-form-item label="强制更新" prop="enforce">
<el-select v-model="form.enforce" clearable size="small">
<el-option
v-for="dict in yesOrNoList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="enableStatus">
<el-select v-model="form.enableStatus" clearable size="small">
<el-option
v-for="dict in enableStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addVersion, getVersion, updateVersion } from '@/api/cai/version'
import { enableStatusList, versionPlatformList, yesOrNoList } from '@/constant/statusMap'
export default {
components: {
},
data () {
return {
versionPlatformList,yesOrNoList,enableStatusList,
open: false,
title: '',
form:{
id: undefined,
platform: undefined,
versionCode: undefined,
oldVersion: undefined,
newVersion: undefined,
packageSize: undefined,
content: undefined,
downloadUrl: undefined,
enforce: 0,
enableStatus: 1
},
// 表单校验
rules: {
platform: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
oldVersion: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
newVersion: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
packageSize: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
downloadUrl: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
enforce: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
content: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
enableStatus: [
{ required: true, message: "数据不能为空", trigger: "blur" }
]
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.title = (id ? "修改" : "新增") + "版本管理";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
if(this.form.id){
getVersion(id).then(response => {
this.form = response.data;
});
}
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateVersion(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.$modal.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
addVersion(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
}
})
},
}
}
</script>

View File

@@ -0,0 +1,195 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="systemName+'号'" prop="usercode">
<el-input
v-model="queryParams.usercode"
:placeholder="'请输入'+systemName+'号'"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付状态" prop="payStatus">
<el-select v-model="queryParams.payStatus" placeholder="支付状态" clearable size="small">
<el-option
v-for="dict in payStatusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="vipOrderList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="订单号" align="center" prop="orderNo" show-overflow-tooltip />
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机" align="center" prop="mobile" width="100"/>
<el-table-column label="头像" align="center" prop="avatar" >
<template v-slot="scope">
<image-avatar :src="scope.row.avatar"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="gender">
<template v-slot="scope">
<cai-dict-tag :options="genderList" :value="scope.row.gender" />
</template>
</el-table-column>
<el-table-column label="VIP名称" align="center" prop="vipName" width="100"/>
<el-table-column label="时长" align="center" prop="vipLongs">
<template v-slot="scope">
<el-tag v-if="scope.row.vipLongs === 1" type="primary">永久会员</el-tag>
<span v-if="scope.row.vipLongs === 0" >{{ scope.row.vipExpire }}</span>
</template>
</el-table-column>
<el-table-column label="价格" align="center" prop="price" />
<el-table-column label="平台" align="center" prop="platformType">
<template v-slot="scope">
<cai-dict-tag :options="platformTypeList" :value="scope.row.platformType" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="payStatus" >
<template v-slot="scope">
<cai-dict-tag :options="payStatusList" :value="scope.row.payStatus" />
</template>
</el-table-column>
<el-table-column label="操作时间" align="center" prop="createTime" width="160"/>
<el-table-column label="后台新增" align="center" prop="admin" >
<template v-slot="scope">
<cai-dict-tag :options="booleanList" :value="scope.row.admin" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleInfo(scope.row)"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<vip-order-info v-if="vipOrderInfoVisible" ref="vipOrderInfo" />
</div>
</template>
<script>
import { listVipOrder } from '@/api/cai/vipOrder'
import {
booleanList,
genderList,
memberStatusList,
memberTypeList,
payStatusList,
platformTypeList,
yesOrNoList
} from '@/constant/statusMap'
import VipOrderInfo from '@/views/cai/vipOrder/vip-order-info.vue'
export default {
name: "VipOrder",
components:{
VipOrderInfo
},
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,memberTypeList,yesOrNoList,memberStatusList,booleanList,platformTypeList,
payStatusList,
vipOrderInfoVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// VIP订单表格数据
vipOrderList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
payStatus: 1,
usercode: undefined,
mobile: undefined,
orderNo: undefined
},
};
},
created() {
this.getList();
},
methods: {
/** 查询VIP订单列表 */
getList() {
this.loading = true;
listVipOrder(this.queryParams).then(response => {
this.vipOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleInfo(row) {
this.vipOrderInfoVisible = true
this.$nextTick(() => {
this.$refs.vipOrderInfo.init(row.id)
})
},
}
};
</script>

View File

@@ -0,0 +1,121 @@
<template>
<el-dialog title="VIP订单信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
<el-descriptions-item :label="systemName+'号'">
{{info.usercode}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{info.mobile}}
</el-descriptions-item>
<el-descriptions-item label="头像">
<image-avatar :src="info.avatar" />
</el-descriptions-item>
<el-descriptions-item label="性别">
<cai-dict-tag :options="genderList" :value="info.gender" />
</el-descriptions-item>
<el-descriptions-item label="昵称">
{{info.nickname}}
</el-descriptions-item>
<el-descriptions-item label="VIP名称">
{{info.vipName}}
</el-descriptions-item>
<el-descriptions-item label="时长">
<el-tag v-if="info.vipLongs === 1" type="primary">永久会员</el-tag>
<span v-if="info.vipLongs === 0" >{{ info.vipExpire }}</span>
</el-descriptions-item>
<el-descriptions-item label="价格">
{{info.price}}
</el-descriptions-item>
<el-descriptions-item label="平台">
<cai-dict-tag :options="platformTypeList" :value="info.platformType" />
</el-descriptions-item>
<el-descriptions-item label="状态">
<cai-dict-tag :options="payStatusList" :value="info.payStatus" />
</el-descriptions-item>
<el-descriptions-item label="操作时间">
{{info.createTime}}
</el-descriptions-item>
<el-descriptions-item label="后台新增">
<cai-dict-tag :options="booleanList" :value="info.admin" />
</el-descriptions-item>
<el-descriptions-item label="后台ID">
{{info.adminId}}
</el-descriptions-item>
<el-descriptions-item label="操作IP">
{{info.operateIp}}
</el-descriptions-item>
<el-descriptions-item label="appid">
{{info.appid}}
</el-descriptions-item>
<el-descriptions-item label="第三方回调数据">
{{info.returnContent}}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</template>
<script>
import {
booleanList,
genderList,
memberStatusList,
memberTypeList,
payStatusList,
platformTypeList,
yesOrNoList
} from '@/constant/statusMap'
import { getVipOrder } from '@/api/cai/vipOrder'
export default {
name: "UserInfo",
data() {
return {
systemName: process.env.VUE_APP_SYSTEM_HOME,
genderList,memberTypeList,yesOrNoList,memberStatusList,booleanList,platformTypeList,
payStatusList,
activeName:['base','account','userAlbums'],
CS: {
'text-align': 'center', //文本居中
'min-width': '250px', //最小宽度
'word-break': 'break-all' //过长时自动换行
},
LS: {
// 'color': '#000',
'text-align': 'center',
// 'font-weight': '600',
'height': '40px',
// 'background-color': 'rgba(255, 97, 2, 0.1)',
'min-width': '110px',
'word-break': 'keep-all'
},
open:false,
info:{},
};
},
created() {
},
methods: {
init(id){
this.open = true;
getVipOrder(id).then(response => {
this.info = response.data;
});
},
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
/* .el-card {
min-width: 100%;
height: 80%; // 高度要设置百分比才可以
margin-right: 20px;
transition: all .5s;
}*/
</style>

View File

@@ -0,0 +1,174 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['cai:withdrawExchange:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="withdrawExchangeList" @selection-change="handleSelectionChange">
<el-table-column label="ID" align="center" prop="id"/>
<el-table-column label="兑换金额" align="center" prop="money" />
<el-table-column label="所需货币数量" align="center" prop="coinNum" />
<el-table-column label="状态" align="center" prop="status" >
<template v-slot="scope">
<el-switch
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="说明" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['cai:withdrawExchange:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['cai:withdrawExchange:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<withdraw-exchange-add-or-update-dialog v-if="withdrawExchangeAddOrUpdateDialogVisible" ref="withdrawExchangeAddOrUpdateDialog" @refreshDataList="getList" />
</div>
</template>
<script>
import { delWithdrawExchange, listWithdrawExchange, updateWithdrawExchange } from '@/api/cai/withdrawExchange'
import WithdrawExchangeAddOrUpdateDialog from '@/views/cai/withdrawExchange/withdraw-exchange-add-or-update-dialog.vue'
export default {
name: "WithdrawExchange",
components:{
WithdrawExchangeAddOrUpdateDialog
},
data() {
return {
withdrawExchangeAddOrUpdateDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 提现兑换配置表格数据
withdrawExchangeList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询提现兑换配置列表 */
getList() {
this.loading = true;
listWithdrawExchange(this.queryParams).then(response => {
this.withdrawExchangeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleStatusChange(row) {
let text = row.status === 0 ? '开启' : '取消'
this.$confirm('确认要' + text + '[' + row.id + ']吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return updateWithdrawExchange({ id: row.id, status: row.status })
}).then(() => {
this.$modal.msgSuccess(text + '成功')
}).catch(function() {
row.status = row.status === 1 ? 0 : 1
})
},
handleAdd(){
this.withdrawExchangeAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.withdrawExchangeAddOrUpdateDialog.init()
})
},
handleUpdate(row){
this.withdrawExchangeAddOrUpdateDialogVisible = true
this.$nextTick(() => {
this.$refs.withdrawExchangeAddOrUpdateDialog.init(row.id)
})
},
handleDelete(row){
this.$modal.confirm('是否确认删除提现兑换配置id为"' + row.id + '"的数据项?').then(() => {
this.loading = true;
return delWithdrawExchange(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
}
}
};
</script>

View File

@@ -0,0 +1,97 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="兑换金额" prop="money">
<el-input v-model="form.money" placeholder="请输入充值金额" />
</el-form-item>
<el-form-item label="所需货币" prop="coinNum">
<el-input v-model="form.coinNum" placeholder="请输入云贝数量" />
</el-form-item>
<el-form-item label="说明" prop="remark">
<el-input v-model="form.remark" placeholder="请输入说明" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addWithdrawExchange, getWithdrawExchange, updateWithdrawExchange } from '@/api/cai/withdrawExchange'
export default {
components: {
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
money: undefined,
coinNum: undefined,
remark: undefined,
},
// 表单校验
rules: {
money: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
coinNum: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.title = (id ? "修改" : "新增") + "提现兑换配置";
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
if(this.form.id){
getWithdrawExchange(id).then(response => {
this.form = response.data;
});
}
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateWithdrawExchange(this.form).then(data => {
this.$modal.msgSuccess("修改成功");
this.$modal.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
addWithdrawExchange(this.form).then(data => {
this.$modal.msgSuccess("新增成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
}
})
},
}
}
</script>