init
This commit is contained in:
44
src/api/xq/userStatus.js
Normal file
44
src/api/xq/userStatus.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询用户状态列表
|
||||
export function listUserStatus(query) {
|
||||
return request({
|
||||
url: '/xq/userStatus/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户状态详细
|
||||
export function getUserStatus(id) {
|
||||
return request({
|
||||
url: '/xq/userStatus/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户状态
|
||||
export function addUserStatus(data) {
|
||||
return request({
|
||||
url: '/xq/userStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户状态
|
||||
export function updateUserStatus(data) {
|
||||
return request({
|
||||
url: '/xq/userStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户状态
|
||||
export function delUserStatus(id) {
|
||||
return request({
|
||||
url: '/xq/userStatus/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -17,20 +17,18 @@ export function getWxTransData(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 新增微信交换数据
|
||||
export function addWxTransData(data) {
|
||||
export function allowWxTransData(data) {
|
||||
return request({
|
||||
url: '/xq/wxTransData',
|
||||
url: '/xq/wxTransData/allow',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改微信交换数据
|
||||
export function updateWxTransData(data) {
|
||||
export function notAllowWxTransData(data) {
|
||||
return request({
|
||||
url: '/xq/wxTransData',
|
||||
method: 'put',
|
||||
url: '/xq/wxTransData/notAllow',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -65,11 +65,6 @@ export const memberStatusList = [
|
||||
{ value: 2, label: '不可用' ,listClass: listClass.danger},
|
||||
]
|
||||
|
||||
export const yesOrNoList = [
|
||||
{ value: 1, label: '是',listClass: listClass.danger},
|
||||
{ value: 0, label: '否',listClass: listClass.info},
|
||||
]
|
||||
|
||||
export const isAnchorList = [
|
||||
{ value: 1, label: '是',listClass: listClass.primary},
|
||||
{ value: 0, label: '否',listClass: listClass.info},
|
||||
@@ -217,6 +212,12 @@ export const sensitiveTypeList = [
|
||||
|
||||
|
||||
// xq平台的字典
|
||||
|
||||
export const yesOrNoList = [
|
||||
{ value: 1, label: '是',listClass: listClass.danger},
|
||||
{ value: 0, label: '否',listClass: listClass.info},
|
||||
]
|
||||
|
||||
export const userStatusList = [
|
||||
{ value: 0, label: '可用', listClass: listClass.primary },
|
||||
{ value: 1, label: '不可用', listClass: listClass.danger }
|
||||
@@ -556,3 +557,10 @@ export const consumeLogCalculateStatusList = [
|
||||
{ value: false, label: '待计算',listClass: listClass.warning},
|
||||
{ value: true, label: '已计算',listClass: listClass.primary},
|
||||
]
|
||||
|
||||
// 0-待接收 1-接受交换 2-拒绝交换
|
||||
export const wxTransDataStatusList = [
|
||||
{ value: 0, label: '待接收',listClass: listClass.warning},
|
||||
{ value: 1, label: '接受交换',listClass: listClass.primary},
|
||||
{ value: 2, label: '拒绝交换',listClass: listClass.danger},
|
||||
]
|
||||
|
||||
358
src/views/xq/userStatus/index.vue
Normal file
358
src/views/xq/userStatus/index.vue
Normal file
@@ -0,0 +1,358 @@
|
||||
<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="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入用户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户号" prop="usercode">
|
||||
<el-input
|
||||
v-model="queryParams.usercode"
|
||||
placeholder="请输入用户号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="谁可查看头像 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户 5-不公开" prop="showAvatar">
|
||||
<el-input
|
||||
v-model="queryParams.showAvatar"
|
||||
placeholder="请输入谁可查看头像 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户 5-不公开"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="谁可查看资料 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户" prop="showInfo">
|
||||
<el-input
|
||||
v-model="queryParams.showInfo"
|
||||
placeholder="请输入谁可查看资料 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否允许交换手机号" prop="allowTransMobile">
|
||||
<el-input
|
||||
v-model="queryParams.allowTransMobile"
|
||||
placeholder="请输入是否允许交换手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否允许交换微信" prop="allowTransWx">
|
||||
<el-input
|
||||
v-model="queryParams.allowTransWx"
|
||||
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="['xq:userStatus: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="['xq:userStatus: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="['xq:userStatus: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="['xq:userStatus:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="userStatusList" @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="用户ID" align="center" prop="userId" />
|
||||
<el-table-column label="用户号" align="center" prop="usercode" />
|
||||
<el-table-column label="征婚状态 1-寻找中 2-已脱单 3-隐藏资料" align="center" prop="personalsStatus" />
|
||||
<el-table-column label="谁可查看头像 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户 5-不公开" align="center" prop="showAvatar" />
|
||||
<el-table-column label="谁可查看资料 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户" align="center" prop="showInfo" />
|
||||
<el-table-column label="是否允许交换手机号" align="center" prop="allowTransMobile" />
|
||||
<el-table-column label="是否允许交换微信" align="center" prop="allowTransWx" />
|
||||
<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="['xq:userStatus:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:userStatus: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="用户ID" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户号" prop="usercode">
|
||||
<el-input v-model="form.usercode" placeholder="请输入用户号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="谁可查看头像 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户 5-不公开" prop="showAvatar">
|
||||
<el-input v-model="form.showAvatar" placeholder="请输入谁可查看头像 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户 5-不公开" />
|
||||
</el-form-item>
|
||||
<el-form-item label="谁可查看资料 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户" prop="showInfo">
|
||||
<el-input v-model="form.showInfo" placeholder="请输入谁可查看资料 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否允许交换手机号" prop="allowTransMobile">
|
||||
<el-input v-model="form.allowTransMobile" placeholder="请输入是否允许交换手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否允许交换微信" prop="allowTransWx">
|
||||
<el-input v-model="form.allowTransWx" 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 { listUserStatus, getUserStatus, delUserStatus, addUserStatus, updateUserStatus } from "@/api/xq/userStatus";
|
||||
|
||||
export default {
|
||||
name: "UserStatus",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户状态表格数据
|
||||
userStatusList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: undefined,
|
||||
usercode: undefined,
|
||||
personalsStatus: undefined,
|
||||
showAvatar: undefined,
|
||||
showInfo: undefined,
|
||||
allowTransMobile: undefined,
|
||||
allowTransWx: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
||||
],
|
||||
usercode: [
|
||||
{ required: true, message: "用户号不能为空", trigger: "blur" }
|
||||
],
|
||||
personalsStatus: [
|
||||
{ required: true, message: "征婚状态 1-寻找中 2-已脱单 3-隐藏资料不能为空", trigger: "change" }
|
||||
],
|
||||
showAvatar: [
|
||||
{ required: true, message: "谁可查看头像 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户 5-不公开不能为空", trigger: "blur" }
|
||||
],
|
||||
showInfo: [
|
||||
{ required: true, message: "谁可查看资料 1-所有用户 2-VIP用户 3-实名用户 4-实名认证且VIP用户不能为空", trigger: "blur" }
|
||||
],
|
||||
allowTransMobile: [
|
||||
{ required: true, message: "是否允许交换手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
allowTransWx: [
|
||||
{ required: true, message: "是否允许交换微信不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户状态列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUserStatus(this.queryParams).then(response => {
|
||||
this.userStatusList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
userId: undefined,
|
||||
usercode: undefined,
|
||||
personalsStatus: undefined,
|
||||
showAvatar: undefined,
|
||||
showInfo: undefined,
|
||||
allowTransMobile: undefined,
|
||||
allowTransWx: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: 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
|
||||
getUserStatus(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) {
|
||||
updateUserStatus(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addUserStatus(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 delUserStatus(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('xq/userStatus/export', {
|
||||
...this.queryParams
|
||||
}, `userStatus_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,150 +1,119 @@
|
||||
<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="sponsorUserId">
|
||||
<el-input
|
||||
v-model="queryParams.sponsorUserId"
|
||||
placeholder="请输入发起用户Id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起用户号" prop="sponsorUsercode">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width=“110px“ >
|
||||
<el-form-item label="发起方用户编号" prop="sponsorUsercode">
|
||||
<el-input
|
||||
v-model="queryParams.sponsorUsercode"
|
||||
placeholder="请输入发起用户号"
|
||||
placeholder="请输入发起方用户编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起用户的微信" prop="sponsorWx">
|
||||
<el-form-item label="发起方用户昵称" prop="sponsorNickname">
|
||||
<el-input
|
||||
v-model="queryParams.sponsorWx"
|
||||
placeholder="请输入发起用户的微信"
|
||||
v-model="queryParams.sponsorNickname"
|
||||
placeholder="请输入发起方用户昵称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接受用户ID" prop="receiveUserId">
|
||||
<el-form-item label="发起方用户手机" prop="sponsorMobile">
|
||||
<el-input
|
||||
v-model="queryParams.receiveUserId"
|
||||
placeholder="请输入接受用户ID"
|
||||
v-model="queryParams.sponsorMobile"
|
||||
placeholder="请输入发起方用户手机"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接受用户号" prop="receiveUsercode">
|
||||
<el-form-item label="接收方用户编号" prop="receiveUsercode">
|
||||
<el-input
|
||||
v-model="queryParams.receiveUsercode"
|
||||
placeholder="请输入接受用户号"
|
||||
placeholder="请输入接收方用户编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接受用户的微信" prop="receiveWx">
|
||||
<el-form-item label="接收方用户昵称" prop="receiveNickname">
|
||||
<el-input
|
||||
v-model="queryParams.receiveWx"
|
||||
placeholder="请输入接受用户的微信"
|
||||
v-model="queryParams.receiveNickname"
|
||||
placeholder="请输入接收方用户昵称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="后台操作管理员ID" prop="adminId">
|
||||
<el-form-item label="接收方用户手机" prop="receiveMobile">
|
||||
<el-input
|
||||
v-model="queryParams.adminId"
|
||||
placeholder="请输入后台操作管理员ID"
|
||||
v-model="queryParams.receiveMobile"
|
||||
placeholder="请输入接收方用户手机"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="后台操作管理员ID" prop="adminName">
|
||||
<el-input
|
||||
v-model="queryParams.adminName"
|
||||
placeholder="请输入后台操作管理员ID"
|
||||
clearable
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in wxTransDataStatusList"
|
||||
: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="['xq:wxTransData: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="['xq:wxTransData: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="['xq:wxTransData: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="['xq:wxTransData:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wxTransDataList" @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="发起用户Id" align="center" prop="sponsorUserId" />
|
||||
<el-table-column label="发起用户号" align="center" prop="sponsorUsercode" />
|
||||
<el-table-column label="发起用户的微信" align="center" prop="sponsorWx" />
|
||||
<el-table-column label="接受用户ID" align="center" prop="receiveUserId" />
|
||||
<el-table-column label="接受用户号" align="center" prop="receiveUsercode" />
|
||||
<el-table-column label="接受用户的微信" align="center" prop="receiveWx" />
|
||||
<el-table-column label="0-待接收 1-接受交换 2-拒绝交换" align="center" prop="status" />
|
||||
<el-table-column label="后台操作管理员ID" align="center" prop="adminId" />
|
||||
<el-table-column label="后台操作管理员ID" align="center" prop="adminName" />
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="wxTransDataStatusList" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发起方" align="center" prop="sponsor">
|
||||
<el-table-column label="用户编号" align="center" prop="sponsorUsercode" />
|
||||
<el-table-column label="昵称" align="center" prop="sponsorNickname" />
|
||||
<el-table-column label="手机号" align="center" prop="sponsorMobile" />
|
||||
<el-table-column label="头像" align="center" prop="sponsorAvatar" >
|
||||
<template v-slot="scope">
|
||||
<image-avatar :src="scope.row.sponsorAvatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信号" align="center" prop="sponsorWx" />
|
||||
</el-table-column>
|
||||
<el-table-column label="接受方" align="center" prop="receive">
|
||||
<el-table-column label="用户编号" align="center" prop="receiveUsercode" />
|
||||
<el-table-column label="昵称" align="center" prop="receiveNickname" />
|
||||
<el-table-column label="手机号" align="center" prop="receiveMobile" />
|
||||
<el-table-column label="头像" align="center" prop="receiveAvatar" >
|
||||
<template v-slot="scope">
|
||||
<image-avatar :src="scope.row.receiveAvatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信号" align="center" prop="receiveWx" />
|
||||
</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" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status === 0"
|
||||
@click="handleAllow(scope.row)"
|
||||
v-hasPermi="['xq:wxTransData:edit']"
|
||||
>修改</el-button>
|
||||
>接受</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:wxTransData:remove']"
|
||||
>删除</el-button>
|
||||
v-if="scope.row.status === 0"
|
||||
@click="handleNotAllow(scope.row)"
|
||||
v-hasPermi="['xq:wxTransData:edit']"
|
||||
>拒绝</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -157,51 +126,18 @@
|
||||
@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="发起用户Id" prop="sponsorUserId">
|
||||
<el-input v-model="form.sponsorUserId" placeholder="请输入发起用户Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发起用户号" prop="sponsorUsercode">
|
||||
<el-input v-model="form.sponsorUsercode" placeholder="请输入发起用户号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发起用户的微信" prop="sponsorWx">
|
||||
<el-input v-model="form.sponsorWx" placeholder="请输入发起用户的微信" />
|
||||
</el-form-item>
|
||||
<el-form-item label="接受用户ID" prop="receiveUserId">
|
||||
<el-input v-model="form.receiveUserId" placeholder="请输入接受用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="接受用户号" prop="receiveUsercode">
|
||||
<el-input v-model="form.receiveUsercode" placeholder="请输入接受用户号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="接受用户的微信" prop="receiveWx">
|
||||
<el-input v-model="form.receiveWx" placeholder="请输入接受用户的微信" />
|
||||
</el-form-item>
|
||||
<el-form-item label="后台操作管理员ID" prop="adminId">
|
||||
<el-input v-model="form.adminId" placeholder="请输入后台操作管理员ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="后台操作管理员ID" prop="adminName">
|
||||
<el-input v-model="form.adminName" placeholder="请输入后台操作管理员ID" />
|
||||
</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 { listWxTransData, getWxTransData, delWxTransData, addWxTransData, updateWxTransData } from "@/api/xq/wxTransData";
|
||||
import { allowWxTransData, listWxTransData, notAllowWxTransData } from '@/api/xq/wxTransData'
|
||||
import { wxTransDataStatusList, yesOrNoList } from '@/constant/statusMap'
|
||||
|
||||
export default {
|
||||
name: "WxTransData",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
yesOrNoList,wxTransDataStatusList,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -216,62 +152,18 @@ export default {
|
||||
total: 0,
|
||||
// 微信交换数据表格数据
|
||||
wxTransDataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sponsorUserId: undefined,
|
||||
sponsorUsercode: undefined,
|
||||
sponsorWx: undefined,
|
||||
receiveUserId: undefined,
|
||||
sponsorNickname: undefined,
|
||||
sponsorMobile: undefined,
|
||||
receiveUsercode: undefined,
|
||||
receiveWx: undefined,
|
||||
receiveNickname: undefined,
|
||||
receiveMobile: undefined,
|
||||
status: undefined,
|
||||
adminId: undefined,
|
||||
adminName: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sponsorUserId: [
|
||||
{ required: true, message: "发起用户Id不能为空", trigger: "blur" }
|
||||
],
|
||||
sponsorUsercode: [
|
||||
{ required: true, message: "发起用户号不能为空", trigger: "blur" }
|
||||
],
|
||||
sponsorWx: [
|
||||
{ required: true, message: "发起用户的微信不能为空", trigger: "blur" }
|
||||
],
|
||||
receiveUserId: [
|
||||
{ required: true, message: "接受用户ID不能为空", trigger: "blur" }
|
||||
],
|
||||
receiveUsercode: [
|
||||
{ required: true, message: "接受用户号不能为空", trigger: "blur" }
|
||||
],
|
||||
receiveWx: [
|
||||
{ required: true, message: "接受用户的微信不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "0-待接收 1-接受交换 2-拒绝交换不能为空", trigger: "change" }
|
||||
],
|
||||
adminId: [
|
||||
{ required: true, message: "后台操作管理员ID不能为空", trigger: "blur" }
|
||||
],
|
||||
adminName: [
|
||||
{ required: true, message: "后台操作管理员ID不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -287,108 +179,44 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
sponsorUserId: undefined,
|
||||
sponsorUsercode: undefined,
|
||||
sponsorWx: undefined,
|
||||
receiveUserId: undefined,
|
||||
receiveUsercode: undefined,
|
||||
receiveWx: undefined,
|
||||
status: undefined,
|
||||
adminId: undefined,
|
||||
adminName: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: 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) {
|
||||
handleAllow(row){
|
||||
this.$modal.confirm('是否要帮助用户"' + row.receiveNickname + '"的接受微信邀请项?').then(() => {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWxTransData(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) {
|
||||
updateWxTransData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addWxTransData(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 delWxTransData(ids);
|
||||
return allowWxTransData({"id":row.id});
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.$modal.msgSuccess("接受成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('xq/wxTransData/export', {
|
||||
...this.queryParams
|
||||
}, `wxTransData_${new Date().getTime()}.xlsx`)
|
||||
handleNotAllow(row){
|
||||
this.$modal.confirm('是否要帮助用户"' + row.receiveNickname + '"的拒绝微信邀请项?').then(() => {
|
||||
this.loading = true;
|
||||
return notAllowWxTransData({"id":row.id});
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("拒绝成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,42 +1,26 @@
|
||||
<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="userId">
|
||||
<el-form-item label="用户编号" prop="usercode">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入用户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户编号" prop="userCode">
|
||||
<el-input
|
||||
v-model="queryParams.userCode"
|
||||
v-model="queryParams.usercode"
|
||||
placeholder="请输入用户编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信交换数据ID" prop="wxTransDataId">
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input
|
||||
v-model="queryParams.wxTransDataId"
|
||||
placeholder="请输入微信交换数据ID"
|
||||
v-model="queryParams.nickname"
|
||||
placeholder="请输入昵称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型" prop="cateId">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.cateId"
|
||||
placeholder="请输入操作类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信交换次数变化" prop="changeValue">
|
||||
<el-input
|
||||
v-model="queryParams.changeValue"
|
||||
placeholder="请输入微信交换次数变化"
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
@@ -47,78 +31,23 @@
|
||||
</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="['xq:wxTransLog: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="['xq:wxTransLog: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="['xq:wxTransLog: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="['xq:wxTransLog:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wxTransLogList" @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="用户ID" align="center" prop="userId" />
|
||||
<el-table-column label="用户编号" align="center" prop="userCode" />
|
||||
<el-table-column label="微信交换数据ID" align="center" prop="wxTransDataId" />
|
||||
<el-table-column label="操作类型" align="center" prop="cateId" />
|
||||
<el-table-column label="微信交换次数变化" align="center" prop="changeValue" />
|
||||
<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="['xq:wxTransLog:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:wxTransLog:remove']"
|
||||
>删除</el-button>
|
||||
<el-table-column label="用户编号" align="center" prop="usercode"/>
|
||||
<el-table-column label="昵称" align="center" prop="nickname" show-overflow-tooltip/>
|
||||
<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="cateName" />
|
||||
<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="remark" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -129,42 +58,16 @@
|
||||
@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="用户ID" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户编号" prop="userCode">
|
||||
<el-input v-model="form.userCode" placeholder="请输入用户编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信交换数据ID" prop="wxTransDataId">
|
||||
<el-input v-model="form.wxTransDataId" placeholder="请输入微信交换数据ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型" prop="cateId">
|
||||
<el-input v-model="form.cateId" placeholder="请输入操作类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信交换次数变化" prop="changeValue">
|
||||
<el-input v-model="form.changeValue" 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 { listWxTransLog, getWxTransLog, delWxTransLog, addWxTransLog, updateWxTransLog } from "@/api/xq/wxTransLog";
|
||||
import { listWxTransLog } from '@/api/xq/wxTransLog'
|
||||
|
||||
export default {
|
||||
name: "WxTransLog",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -179,46 +82,14 @@ export default {
|
||||
total: 0,
|
||||
// 微信交换记录表格数据
|
||||
wxTransLogList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: undefined,
|
||||
nickname: undefined,
|
||||
userCode: undefined,
|
||||
wxTransDataId: undefined,
|
||||
cateId: undefined,
|
||||
changeValue: undefined,
|
||||
mobile: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
||||
],
|
||||
userCode: [
|
||||
{ required: true, message: "用户编号不能为空", trigger: "blur" }
|
||||
],
|
||||
wxTransDataId: [
|
||||
{ required: true, message: "微信交换数据ID不能为空", trigger: "blur" }
|
||||
],
|
||||
cateId: [
|
||||
{ required: true, message: "操作类型不能为空", trigger: "blur" }
|
||||
],
|
||||
changeValue: [
|
||||
{ required: true, message: "微信交换次数变化不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -234,25 +105,6 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
userId: undefined,
|
||||
userCode: undefined,
|
||||
wxTransDataId: undefined,
|
||||
cateId: undefined,
|
||||
changeValue: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
@@ -269,70 +121,22 @@ export default {
|
||||
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
|
||||
getWxTransLog(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) {
|
||||
updateWxTransLog(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addWxTransLog(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 delWxTransLog(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('xq/wxTransLog/export', {
|
||||
...this.queryParams
|
||||
}, `wxTransLog_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user