Commit 136c06df by YG8429

后台修改绑定人用户

parent 2235840f
import request from '@/utils/request'
// 查询分享活动绑定关系列表
export function listActivities(query) {
return request({
url: '/system/activities/list',
method: 'get',
params: query
})
}
// 查询分享活动绑定关系详细
export function getActivities(id) {
return request({
url: '/system/activities/' + id,
method: 'get'
})
}
// 新增分享活动绑定关系
export function addActivities(data) {
return request({
url: '/system/activities',
method: 'post',
data: data
})
}
// 修改分享活动绑定关系
export function updateActivities(data) {
return request({
url: '/system/activities',
method: 'put',
data: data
})
}
// 删除分享活动绑定关系
export function delActivities(id) {
return request({
url: '/system/activities/' + id,
method: 'delete'
})
}
<template>
<!-- 授权用户 -->
<el-dialog title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<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="phone">
<el-input
v-model="queryParams.phone"
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>
<el-table @row-click="clickRow" ref="table" :data="consumerList" height="450px">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="账号" align="center" prop="account" />
<el-table-column label="用户昵称" align="center" prop="nickName" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="角色类型" align="center" prop="roleType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.wechat_role_type" :value="scope.row.roleType"/>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="sex">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-row>
</el-dialog>
</template>
<script>
import { unallocatedUserList, authUserSelectAll } from "@/api/system/store";
export default {
dicts: ['sys_user_sex', 'wechat_role_type'],
props: {
// 角色编号
storeId: {
type: [Number, String]
},
position: {
type: [Number, String]
}
},
data() {
return {
// 遮罩层
visible: false,
// 选中数组值
consumerIds: [],
// 总条数
total: 0,
// 未授权用户数据
consumerList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
storeId: undefined,
nickName: undefined,
phone: undefined,
position: undefined
}
};
},
methods: {
// 显示弹框
show() {
this.queryParams.storeId = this.storeId;
this.queryParams.position = this.position;
this.getList();
this.visible = true;
},
clickRow(row) {
this.$emit('selectConsumerList', row.id);
this.visible = false;
},
// 查询表数据
getList() {
unallocatedUserList(this.queryParams).then(res => {
this.consumerList = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment