|
@ -75,11 +75,30 @@ |
|
|
placeholder="选择过期时间"> |
|
|
placeholder="选择过期时间"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item class="flex_one tr"> |
|
|
|
|
|
<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 label="是否合伙人" prop="userHh"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="queryParams.userHh" |
|
|
|
|
|
placeholder="请输入是否合伙人" |
|
|
|
|
|
clearable |
|
|
|
|
|
size="small" |
|
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="是否伴宠师" prop="userBcs"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="queryParams.userBcs" |
|
|
|
|
|
placeholder="请输入是否伴宠师" |
|
|
|
|
|
clearable |
|
|
|
|
|
size="small" |
|
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<el-form-item class="flex_one tr"> |
|
|
|
|
|
<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-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="mini" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-row :gutter="10" class="mb8"> |
|
@ -90,7 +109,7 @@ |
|
|
icon="el-icon-plus" |
|
|
icon="el-icon-plus" |
|
|
size="mini" |
|
|
size="mini" |
|
|
@click="handleAdd" |
|
|
@click="handleAdd" |
|
|
v-hasPermi="['model:AppUsers:add']" |
|
|
|
|
|
|
|
|
v-hasPermi="['model:appUsers:add']" |
|
|
>新增</el-button> |
|
|
>新增</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
@ -101,7 +120,7 @@ |
|
|
size="mini" |
|
|
size="mini" |
|
|
:disabled="single" |
|
|
:disabled="single" |
|
|
@click="handleUpdate" |
|
|
@click="handleUpdate" |
|
|
v-hasPermi="['model:AppUsers:edit']" |
|
|
|
|
|
|
|
|
v-hasPermi="['model:appUsers:edit']" |
|
|
>修改</el-button> |
|
|
>修改</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
@ -112,7 +131,7 @@ |
|
|
size="mini" |
|
|
size="mini" |
|
|
:disabled="multiple" |
|
|
:disabled="multiple" |
|
|
@click="handleDelete" |
|
|
@click="handleDelete" |
|
|
v-hasPermi="['model:AppUsers:remove']" |
|
|
|
|
|
|
|
|
v-hasPermi="['model:appUsers:remove']" |
|
|
>删除</el-button> |
|
|
>删除</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
@ -123,13 +142,13 @@ |
|
|
size="mini" |
|
|
size="mini" |
|
|
:loading="exportLoading" |
|
|
:loading="exportLoading" |
|
|
@click="handleExport" |
|
|
@click="handleExport" |
|
|
v-hasPermi="['model:AppUsers:export']" |
|
|
|
|
|
|
|
|
v-hasPermi="['model:appUsers:export']" |
|
|
>导出</el-button> |
|
|
>导出</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> |
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="AppUsersList" @selection-change="handleSelectionChange"> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="appUsersList" @selection-change="handleSelectionChange"> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column label="用户编号" align="center" prop="userId" /> |
|
|
<el-table-column label="用户编号" align="center" prop="userId" /> |
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[0].visible"/> |
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[0].visible"/> |
|
@ -145,9 +164,11 @@ |
|
|
<el-table-column label="刷新token" align="center" prop="refreshToken" v-if="columns[10].visible"/> |
|
|
<el-table-column label="刷新token" align="center" prop="refreshToken" v-if="columns[10].visible"/> |
|
|
<el-table-column label="过期时间" align="center" prop="expireTime" width="180" v-if="columns[11].visible"> |
|
|
<el-table-column label="过期时间" align="center" prop="expireTime" width="180" v-if="columns[11].visible"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ parseTime(scope.row.expireTime, '')}}</span> |
|
|
|
|
|
|
|
|
<span>{{ parseTime(scope.row.expireTime, '')}}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="是否合伙人" align="center" prop="userHh" v-if="columns[12].visible"/> |
|
|
|
|
|
<el-table-column label="是否伴宠师" align="center" prop="userBcs" v-if="columns[13].visible"/> |
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button |
|
|
<el-button |
|
@ -155,14 +176,14 @@ |
|
|
type="text" |
|
|
type="text" |
|
|
icon="el-icon-edit" |
|
|
icon="el-icon-edit" |
|
|
@click="handleUpdate(scope.row)" |
|
|
@click="handleUpdate(scope.row)" |
|
|
v-hasPermi="['model:AppUsers:edit']" |
|
|
|
|
|
|
|
|
v-hasPermi="['model:appUsers:edit']" |
|
|
>修改</el-button> |
|
|
>修改</el-button> |
|
|
<el-button |
|
|
<el-button |
|
|
size="mini" |
|
|
size="mini" |
|
|
type="text" |
|
|
type="text" |
|
|
icon="el-icon-delete" |
|
|
icon="el-icon-delete" |
|
|
@click="handleDelete(scope.row)" |
|
|
@click="handleDelete(scope.row)" |
|
|
v-hasPermi="['model:AppUsers:remove']" |
|
|
|
|
|
|
|
|
v-hasPermi="['model:appUsers:remove']" |
|
|
>删除</el-button> |
|
|
>删除</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -176,7 +197,7 @@ |
|
|
@pagination="getList" |
|
|
@pagination="getList" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 添加或修改用户对话框 --> |
|
|
|
|
|
|
|
|
<!-- 添加或修改用户表对话框 --> |
|
|
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> |
|
|
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> |
|
|
<el-form-item label="逻辑删除" prop="delFlag"> |
|
|
<el-form-item label="逻辑删除" prop="delFlag"> |
|
@ -217,12 +238,18 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="过期时间" prop="expireTime"> |
|
|
<el-form-item label="过期时间" prop="expireTime"> |
|
|
<el-date-picker clearable size="small" |
|
|
<el-date-picker clearable size="small" |
|
|
v-model="form.expireTime" |
|
|
|
|
|
type="datetime" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
|
placeholder="选择过期时间"> |
|
|
|
|
|
|
|
|
v-model="form.expireTime" |
|
|
|
|
|
type="datetime" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
|
placeholder="选择过期时间"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="是否合伙人" prop="userHh"> |
|
|
|
|
|
<el-input v-model="form.userHh" placeholder="请输入是否合伙人" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="是否伴宠师" prop="userBcs"> |
|
|
|
|
|
<el-input v-model="form.userBcs" placeholder="请输入是否伴宠师" /> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
@ -233,8 +260,14 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { listAppUsers, getAppUsers, delAppUsers, addAppUsers, updateAppUsers, exportAppUsers } from "@/api/model/AppUsers"; |
|
|
|
|
|
import {parseTime} from "../../../utils/ruoyi"; |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
listAppUsers, |
|
|
|
|
|
getAppUsers, |
|
|
|
|
|
delAppUsers, |
|
|
|
|
|
addAppUsers, |
|
|
|
|
|
updateAppUsers, |
|
|
|
|
|
exportAppUsers |
|
|
|
|
|
} from "@/api/model/AppUsers"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "AppUsers", |
|
|
name: "AppUsers", |
|
@ -254,8 +287,8 @@ export default { |
|
|
showSearch: true, |
|
|
showSearch: true, |
|
|
// 总条数 |
|
|
// 总条数 |
|
|
total: 0, |
|
|
total: 0, |
|
|
// 用户表格数据 |
|
|
|
|
|
AppUsersList: [], |
|
|
|
|
|
|
|
|
// 用户表表格数据 |
|
|
|
|
|
appUsersList: [], |
|
|
// 弹出层标题 |
|
|
// 弹出层标题 |
|
|
title: "", |
|
|
title: "", |
|
|
// 是否显示弹出层 |
|
|
// 是否显示弹出层 |
|
@ -265,63 +298,55 @@ export default { |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
updatorBy: null, |
|
|
updatorBy: null, |
|
|
|
|
|
|
|
|
userImage: null, |
|
|
userImage: null, |
|
|
|
|
|
|
|
|
userName: null, |
|
|
userName: null, |
|
|
|
|
|
|
|
|
userState: null, |
|
|
userState: null, |
|
|
|
|
|
|
|
|
userTelephone: null, |
|
|
userTelephone: null, |
|
|
|
|
|
|
|
|
unionid: null, |
|
|
unionid: null, |
|
|
|
|
|
|
|
|
openid: null, |
|
|
openid: null, |
|
|
|
|
|
|
|
|
accessToken: null, |
|
|
accessToken: null, |
|
|
|
|
|
|
|
|
expiresIn: null, |
|
|
expiresIn: null, |
|
|
|
|
|
|
|
|
refreshToken: null, |
|
|
refreshToken: null, |
|
|
|
|
|
|
|
|
expireTime: null, |
|
|
expireTime: null, |
|
|
|
|
|
|
|
|
|
|
|
userHh: null, |
|
|
|
|
|
userBcs: null |
|
|
}, |
|
|
}, |
|
|
// 表单参数 |
|
|
// 表单参数 |
|
|
form: {}, |
|
|
form: {}, |
|
|
// 表单校验 |
|
|
// 表单校验 |
|
|
rules: { |
|
|
rules: { |
|
|
userName: [ |
|
|
userName: [ |
|
|
{ required: true, message: "用户名称不能为空", trigger: "blur" } |
|
|
|
|
|
|
|
|
{required: true, message: "用户名称不能为空", trigger: "blur"} |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
columns: [ |
|
|
columns: [ |
|
|
{ key: 4, label: "备注", visible: true }, |
|
|
|
|
|
{ key: 6, label: "修改人", visible: true }, |
|
|
|
|
|
{ key: 7, label: "用户头像", visible: false }, |
|
|
|
|
|
{ key: 8, label: "用户名称", visible: true }, |
|
|
|
|
|
{ key: 9, label: "用户状态, 0==为注册, 1==已注册为认证", visible: true }, |
|
|
|
|
|
{ key: 10, label: "用户电话", visible: false }, |
|
|
|
|
|
{ key: 11, label: "只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段", visible: false }, |
|
|
|
|
|
{ key: 12, label: "用户的标识,对当前公众号唯一", visible: false }, |
|
|
|
|
|
{ key: 13, label: "token", visible: false }, |
|
|
|
|
|
{ key: 14, label: "过期时间", visible: false }, |
|
|
|
|
|
{ key: 15, label: "刷新token", visible: false }, |
|
|
|
|
|
{ key: 16, label: "过期时间", visible: false }, |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
{key: 4, label: "备注", visible: true}, |
|
|
|
|
|
{key: 6, label: "修改人", visible: true}, |
|
|
|
|
|
{key: 7, label: "用户头像", visible: false}, |
|
|
|
|
|
{key: 8, label: "用户名称", visible: true}, |
|
|
|
|
|
{key: 9, label: "用户状态, 0==为注册, 1==已注册为认证", visible: true}, |
|
|
|
|
|
{key: 10, label: "用户电话", visible: false}, |
|
|
|
|
|
{key: 11, label: "只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段", visible: false}, |
|
|
|
|
|
{key: 12, label: "用户的标识,对当前公众号唯一", visible: false}, |
|
|
|
|
|
{key: 13, label: "token", visible: false}, |
|
|
|
|
|
{key: 14, label: "过期时间", visible: false}, |
|
|
|
|
|
{key: 15, label: "刷新token", visible: false}, |
|
|
|
|
|
{key: 16, label: "过期时间", visible: false}, |
|
|
|
|
|
{key: 17, label: "是否合伙人", visible: false}, |
|
|
|
|
|
{key: 18, label: "是否伴宠师", visible: false}, |
|
|
|
|
|
], |
|
|
|
|
|
showMoreCondition: false |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
parseTime, |
|
|
|
|
|
/** 查询用户列表 */ |
|
|
|
|
|
|
|
|
/** 查询用户表列表 */ |
|
|
getList() { |
|
|
getList() { |
|
|
this.loading = true; |
|
|
this.loading = true; |
|
|
listAppUsers(this.queryParams).then(response => { |
|
|
listAppUsers(this.queryParams).then(response => { |
|
|
this.AppUsersList = response.rows; |
|
|
|
|
|
|
|
|
this.appUsersList = response.rows; |
|
|
this.total = response.total; |
|
|
this.total = response.total; |
|
|
this.loading = false; |
|
|
this.loading = false; |
|
|
}); |
|
|
}); |
|
@ -335,39 +360,24 @@ export default { |
|
|
reset() { |
|
|
reset() { |
|
|
this.form = { |
|
|
this.form = { |
|
|
userId: null, |
|
|
userId: null, |
|
|
|
|
|
|
|
|
createBy: null, |
|
|
createBy: null, |
|
|
|
|
|
|
|
|
createTime: null, |
|
|
createTime: null, |
|
|
|
|
|
|
|
|
delFlag: null, |
|
|
delFlag: null, |
|
|
|
|
|
|
|
|
remark: null, |
|
|
remark: null, |
|
|
|
|
|
|
|
|
updateTime: null, |
|
|
updateTime: null, |
|
|
|
|
|
|
|
|
updatorBy: null, |
|
|
updatorBy: null, |
|
|
|
|
|
|
|
|
userImage: null, |
|
|
userImage: null, |
|
|
|
|
|
|
|
|
userName: null, |
|
|
userName: null, |
|
|
|
|
|
|
|
|
userState: null, |
|
|
userState: null, |
|
|
|
|
|
|
|
|
userTelephone: null, |
|
|
userTelephone: null, |
|
|
|
|
|
|
|
|
unionid: null, |
|
|
unionid: null, |
|
|
|
|
|
|
|
|
openid: null, |
|
|
openid: null, |
|
|
|
|
|
|
|
|
accessToken: null, |
|
|
accessToken: null, |
|
|
|
|
|
|
|
|
expiresIn: null, |
|
|
expiresIn: null, |
|
|
|
|
|
|
|
|
refreshToken: null, |
|
|
refreshToken: null, |
|
|
|
|
|
|
|
|
expireTime: null, |
|
|
expireTime: null, |
|
|
|
|
|
|
|
|
|
|
|
userHh: null, |
|
|
|
|
|
userBcs: null |
|
|
}; |
|
|
}; |
|
|
this.resetForm("form"); |
|
|
this.resetForm("form"); |
|
|
}, |
|
|
}, |
|
@ -384,14 +394,14 @@ export default { |
|
|
// 多选框选中数据 |
|
|
// 多选框选中数据 |
|
|
handleSelectionChange(selection) { |
|
|
handleSelectionChange(selection) { |
|
|
this.ids = selection.map(item => item.userId) |
|
|
this.ids = selection.map(item => item.userId) |
|
|
this.single = selection.length!==1 |
|
|
|
|
|
|
|
|
this.single = selection.length !== 1 |
|
|
this.multiple = !selection.length |
|
|
this.multiple = !selection.length |
|
|
}, |
|
|
}, |
|
|
/** 新增按钮操作 */ |
|
|
/** 新增按钮操作 */ |
|
|
handleAdd() { |
|
|
handleAdd() { |
|
|
this.reset(); |
|
|
this.reset(); |
|
|
this.open = true; |
|
|
this.open = true; |
|
|
this.title = "添加用户"; |
|
|
|
|
|
|
|
|
this.title = "添加用户表"; |
|
|
}, |
|
|
}, |
|
|
/** 修改按钮操作 */ |
|
|
/** 修改按钮操作 */ |
|
|
handleUpdate(row) { |
|
|
handleUpdate(row) { |
|
@ -400,7 +410,7 @@ export default { |
|
|
getAppUsers(userId).then(response => { |
|
|
getAppUsers(userId).then(response => { |
|
|
this.form = response.data; |
|
|
this.form = response.data; |
|
|
this.open = true; |
|
|
this.open = true; |
|
|
this.title = "修改用户"; |
|
|
|
|
|
|
|
|
this.title = "修改用户表"; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
/** 提交按钮 */ |
|
|
/** 提交按钮 */ |
|
@ -426,23 +436,25 @@ export default { |
|
|
/** 删除按钮操作 */ |
|
|
/** 删除按钮操作 */ |
|
|
handleDelete(row) { |
|
|
handleDelete(row) { |
|
|
const userIds = row.userId || this.ids; |
|
|
const userIds = row.userId || this.ids; |
|
|
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() { |
|
|
|
|
|
|
|
|
this.$modal.confirm('是否确认删除用户表编号为"' + userIds + '"的数据项?').then(function () { |
|
|
return delAppUsers(userIds); |
|
|
return delAppUsers(userIds); |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
this.$modal.msgSuccess("删除成功"); |
|
|
this.$modal.msgSuccess("删除成功"); |
|
|
}).catch(() => {}); |
|
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
/** 导出按钮操作 */ |
|
|
/** 导出按钮操作 */ |
|
|
handleExport() { |
|
|
handleExport() { |
|
|
const queryParams = this.queryParams; |
|
|
const queryParams = this.queryParams; |
|
|
this.$modal.confirm('是否确认导出所有用户数据项?').then(() => { |
|
|
|
|
|
|
|
|
this.$modal.confirm('是否确认导出所有用户表数据项?').then(() => { |
|
|
this.exportLoading = true; |
|
|
this.exportLoading = true; |
|
|
return exportAppUsers(queryParams); |
|
|
return exportAppUsers(queryParams); |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
this.download(response.msg); |
|
|
this.download(response.msg); |
|
|
this.exportLoading = false; |
|
|
this.exportLoading = false; |
|
|
}).catch(() => {}); |
|
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|