<template>
	<div>
		<el-tabs v-model="activeName" @tab-click="handleClick">
			<el-tab-pane label="全部用户" name="first">
				<div style="margin:5px;display: inline-block;">
					<span>手机号:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
						v-model="phone"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>昵称:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
						v-model="campus"></el-input>
				</div>&emsp;&emsp;
				<!-- <div style="margin:5px;display: inline-block;">
					<span>邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
						v-model="invitationCodeT"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>邀请人邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
						v-model="inviterCodeT"></el-input>
				</div>&emsp;&emsp; -->
				<div style="margin:5px;display: inline-block;">
					<span>开始时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
						type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
					</el-date-picker>&nbsp;&nbsp;&nbsp;
				</div>
				<div style="margin:5px;display: inline-block;">
					<span>截止时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
						format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
					</el-date-picker>
				</div>
				<div style="display: inline-block;">
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
					</el-button>
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
					</el-button>
					<el-button style='margin-left:15px;' size="mini" type="warning" icon="document"
						:disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
					</el-button>
				</div>
				<div style="color: orange;"> * 导出数据提示：导出数据前请进行时间或者状态等筛选，否则导出单量过多易出现卡顿或系统崩溃</div>
				<el-table v-loading="tableDataLoading" :data="tableData.list">

					<el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
					<el-table-column fixed prop="userName" label="昵称" width="150">
						<template slot-scope="scope"> 
							<span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
							<span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column label="图像">
						<template slot-scope="scope">
							<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
								height="40">
							<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
						</template>
					</el-table-column>
					<el-table-column prop="phone" label="手机号" width="160">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
								{{ scope.row.phone ? scope.row.phone : '未绑定' }}
							</span>
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
								{{ scope.row.phone1 ? scope.row.phone1 : '-' }}
							</span>
						</template>
					</el-table-column>
					<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
					<el-table-column label="邀请人邀请码">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;"
								@click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="zhiRate" label="直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'zhiRate')">修改</el-button>
						</template>
					</el-table-column>
					<el-table-column prop="feiRate" label="非直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'feiRate')">修改</el-button>
						</template>
					</el-table-column>
					<el-table-column prop="isUserVip" label="是否会员">
						<template slot-scope="scope">
							<span v-if="scope.row.isUserVip==1">是</span>
							<span v-else>否</span>
						</template>
					</el-table-column>
					<el-table-column prop="userMonthTime" label="会员到期时间" width="160"></el-table-column>

					<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
					<el-table-column prop="state " label="状态">
						<template slot-scope="scope">
							<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
								:active-value="openValue" :disabled="!isAuth('userList:delete')"
								:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
							</el-switch>
						</template>
					</el-table-column>
					<el-table-column fixed="right" label="操作" width="120">
						<template slot-scope="scope">
							<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
							<!-- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')">修改会员</el-button>
							<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')" v-if="scope.row.isUserVip==1"
								plain>取消会员</el-button> -->
							<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
								@click="deleteuser(scope.row)">删除用户</el-button>
							<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->

						</template>
					</el-table-column>
				</el-table>
				<div style="text-align: center;margin-top: 10px;">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
						layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
					</el-pagination>
				</div>
			</el-tab-pane>
			<el-tab-pane label="会员用户" name="vip">
				<div style="margin:5px;display: inline-block;">
					<span>手机号:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
						v-model="phone"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>昵称:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
						v-model="campus"></el-input>
				</div>&emsp;&emsp;
				<!-- <div style="margin:5px;display: inline-block;">
					<span>邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
						v-model="invitationCodeT"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>邀请人邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
						v-model="inviterCodeT"></el-input>
				</div>&emsp;&emsp; -->
				<div style="margin:5px;display: inline-block;">
					<span>开始时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
						type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
					</el-date-picker>&nbsp;&nbsp;&nbsp;
				</div>
				<div style="margin:5px;display: inline-block;">
					<span>截止时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
						format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
					</el-date-picker>
				</div>
				<div style="display: inline-block;">
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
					</el-button>
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
					</el-button>
					<el-button style='margin-left:15px;' size="mini" type="warning" icon="document"
						:disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
					</el-button>
				</div>
				<div style="color: orange;"> * 导出数据提示：导出数据前请进行时间或者状态等筛选，否则导出单量过多易出现卡顿或系统崩溃</div>
				<el-table v-loading="tableDataLoading" :data="tableData.list">

					<el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
					<el-table-column fixed prop="userName" label="昵称" width="150">
						<template slot-scope="scope"> 
							<span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
							<span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column label="图像">
						<template slot-scope="scope">
							<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
								height="40">
							<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
						</template>
					</el-table-column>
					<el-table-column prop="phone" label="手机号" width="160">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
								{{ scope.row.phone ? scope.row.phone : '未绑定' }}
							</span>
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
								{{ scope.row.phone1 ? scope.row.phone1 : '-' }}
							</span>
						</template>
					</el-table-column>
					<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
					<el-table-column label="邀请人邀请码">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;"
								@click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="zhiRate" label="直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'zhiRate')">修改</el-button>
						</template>
					</el-table-column>
					<el-table-column prop="feiRate" label="非直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'feiRate')">修改</el-button>
						</template>
					</el-table-column>
					<el-table-column prop="isUserVip" label="是否会员">
						<template slot-scope="scope">
							<span v-if="scope.row.isUserVip==1">是</span>
							<span v-else>否</span>
						</template>
					</el-table-column>
					<el-table-column prop="userMonthTime" label="会员到期时间" width="160"></el-table-column>

					<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
					<el-table-column prop="state " label="状态">
						<template slot-scope="scope">
							<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
								:active-value="openValue" :disabled="!isAuth('userList:delete')"
								:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
							</el-switch>
						</template>
					</el-table-column>
					<el-table-column fixed="right" label="操作" width="120">
						<template slot-scope="scope">
							<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
							<!-- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')">修改会员</el-button>
							<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')" v-if="scope.row.isUserVip==1"
								plain>取消会员</el-button> -->
							<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
								@click="deleteuser(scope.row)">删除用户</el-button>
							<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->

						</template>
					</el-table-column>
				</el-table>
				<div style="text-align: center;margin-top: 10px;">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
						layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
					</el-pagination>
				</div>
			</el-tab-pane>
			<el-tab-pane label="普通用户" name="putong">
				<div style="margin:5px;display: inline-block;">
					<span>手机号:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
						v-model="phone"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>昵称:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
						v-model="campus"></el-input>
				</div>&emsp;&emsp;
				<!-- <div style="margin:5px;display: inline-block;">
					<span>邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
						v-model="invitationCodeT"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>邀请人邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
						v-model="inviterCodeT"></el-input>
				</div>&emsp;&emsp; -->
				<div style="margin:5px;display: inline-block;">
					<span>开始时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
						type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
					</el-date-picker>&nbsp;&nbsp;&nbsp;
				</div>
				<div style="margin:5px;display: inline-block;">
					<span>截止时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
						format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
					</el-date-picker>
				</div>
				<div style="display: inline-block;">
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
					</el-button>
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
					</el-button>
					<el-button style='margin-left:15px;' size="mini" type="warning" icon="document"
						:disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
					</el-button>
				</div>
				<div style="color: orange;"> * 导出数据提示：导出数据前请进行时间或者状态等筛选，否则导出单量过多易出现卡顿或系统崩溃</div>
				<el-table v-loading="tableDataLoading" :data="tableData.list">

					<el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
					<el-table-column fixed prop="userName" label="昵称" width="150">
						<template slot-scope="scope"> 
							<span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
							<span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column label="图像">
						<template slot-scope="scope">
							<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
								height="40">
							<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
						</template>
					</el-table-column>
					<el-table-column prop="phone" label="手机号" width="160">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
								{{ scope.row.phone ? scope.row.phone : '未绑定' }}
							</span>
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
								{{ scope.row.phone1 ? scope.row.phone1 : '-' }}
							</span>
						</template>
					</el-table-column>
					<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
					<el-table-column label="邀请人邀请码">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;"
								@click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="zhiRate" label="直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'zhiRate')">修改</el-button>
						</template>
					</el-table-column>
					<el-table-column prop="feiRate" label="非直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'feiRate')">修改</el-button>
						</template>
					</el-table-column>
					<el-table-column prop="isUserVip" label="是否会员">
						<template slot-scope="scope">
							<span v-if="scope.row.isUserVip==1">是</span>
							<span v-else>否</span>
						</template>
					</el-table-column>
					<el-table-column prop="userMonthTime" label="会员到期时间" width="160"></el-table-column>
					<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
					<el-table-column prop="state " label="状态">
						<template slot-scope="scope">
							<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
								:active-value="openValue" :disabled="!isAuth('userList:delete')"
								:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
							</el-switch>
						</template>
					</el-table-column>
					<el-table-column fixed="right" label="操作" width="120">
						<template slot-scope="scope">
							<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
							<!-- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')">修改会员</el-button>
							<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')" v-if="scope.row.isUserVip==1"
								plain>取消会员</el-button> -->
							<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
								@click="deleteuser(scope.row)">删除用户</el-button>
							<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->

						</template>
					</el-table-column>
				</el-table>
				<div style="text-align: center;margin-top: 10px;">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
						layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
					</el-pagination>
				</div>
			</el-tab-pane>
			<el-tab-pane label="简历管理" name="second">
				<div style="margin:5px;display: inline-block;">
					<span>手机号:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
						v-model="phone"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>昵称:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
						v-model="campus"></el-input>
				</div>&emsp;&emsp;
				<!-- <div style="margin:5px;display: inline-block;">
					<span>邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
						v-model="invitationCodeT"></el-input>
				</div>&emsp;&emsp;
				<div style="margin:5px;display: inline-block;">
					<span>邀请人邀请码:</span>
					<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请人邀请码"
						v-model="inviterCodeT"></el-input>
				</div>&emsp;&emsp; -->
				<div style="margin:5px;display: inline-block;">
					<span>开始时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
						type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
					</el-date-picker>&nbsp;&nbsp;&nbsp;
				</div>
				<div style="margin:5px;display: inline-block;">
					<span>截止时间：</span>
					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
						format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
					</el-date-picker>
				</div>
				<div style="display: inline-block;">
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
					</el-button>
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
					</el-button>
					<el-button style='margin-left:15px;' size="mini" type="warning" icon="document"
						:disabled="!isAuth('user:daochu')" @click="exportBtn">导出Excel
					</el-button>
				</div>
				<div style="color: orange;"> * 导出数据提示：导出数据前请进行时间或者状态等筛选，否则导出单量过多易出现卡顿或系统崩溃</div>
				<el-table v-loading="tableDataLoading" :data="tableData.list">
					<el-table-column prop="userId" label="编号" width="80" fixed="left"></el-table-column>
					<el-table-column fixed prop="userName" label="昵称" width="150">
						<template slot-scope="scope"> 
							<span style="color: #f56c6c;" v-if="!isAuth('userList:phone') && scope.row.userName1">{{ scope.row.userName1 ? scope.row.userName1 : '未绑定' }}</span>
							<span style="color: #f56c6c;" v-else>{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column label="图像">
						<template slot-scope="scope">
							<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
								height="40">
							<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
						</template>
					</el-table-column>
					<el-table-column prop="phone" label="手机号" width="160">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-if="isAuth('userList:phone')">
								{{ scope.row.phone ? scope.row.phone : '未绑定' }}
							</span>
							<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)" v-else>
								{{ scope.row.phone1 ? scope.row.phone1 : '-' }}
							</span>
						</template>
					</el-table-column>
					<el-table-column prop="sex" label="性别">
						<template slot-scope="scope">
							<span v-if="scope.row.sex==1">男</span>
							<span v-else-if="scope.row.sex==2">女</span>
							<span v-else>未设置</span>
						</template>
					</el-table-column>
					<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
					<el-table-column label="邀请人邀请码">
						<template slot-scope="scope">
							<span style="color: #4f9dec;cursor: pointer;"
								@click="updates2(scope.row.inviterCode)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="zhiFuBaoName" label="支付宝名称">
						<template slot-scope="scope">
							<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="zhiFuBao" label="支付宝账号">
						<template slot-scope="scope">
							<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
						</template>
					</el-table-column>
					<el-table-column prop="zhiRate" label="直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.zhiRate?scope.row.zhiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'zhiRate')">修改</el-button>
							</span>
						</template>
					</el-table-column>
					<el-table-column prop="feiRate" label="非直属佣金比例" width="150">
						<template slot-scope="scope">
							<span>{{scope.row.feiRate?scope.row.feiRate:'0'}}</span>
							<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
								style="color: #4f9dec;background: #fff;border: none;"
								@click="xiugai(scope.row,'feiRate')">修改</el-button>
							</span>
						</template>
					</el-table-column>
					<el-table-column prop="isUserVip" label="是否会员">
						<template slot-scope="scope">
							<span v-if="scope.row.isUserVip==1">是</span>
							<span v-else>否</span>
						</template>
					</el-table-column>
					<el-table-column prop="userMonthTime" label="会员到期时间" width="160"></el-table-column>
					<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
					<el-table-column prop="state " label="状态">
						<template slot-scope="scope">
							<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
								:active-value="openValue" :disabled="!isAuth('userList:delete')"
								:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
							</el-switch>
						</template>
					</el-table-column>
					<el-table-column fixed="right" label="操作" width="120">
						<template slot-scope="scope">
							<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
							<!-- <el-button size="mini" type="warning" @click="zengsongVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')">修改会员</el-button>
							<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)"
								:disabled="!isAuth('userList:updateVip')" v-if="scope.row.isUserVip==1"
								plain>取消会员</el-button> -->
							<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
								@click="deleteuser(scope.row)">删除用户</el-button>
							<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
						</template>
					</el-table-column>
				</el-table>
				<div style="text-align: center;margin-top: 10px;">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:page-sizes="[10, 20, 30, 40, 50]" :page-size="limit" :current-page="page"
						layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
					</el-pagination>
				</div>
			</el-tab-pane>

			<!-- 修改比例 -->
			<el-dialog title="修改佣金比例" :visible.sync="dialogFormVisible2" center>
				<div style="margin-bottom: 10px;">
					<span style="width: 200px;display: inline-block;text-align: right;">佣金比例：</span>
					<el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
						placeholder="请输入佣金比例"></el-input>
				</div>
				<div slot="footer" class="dialog-footer">
					<el-button @click="dialogFormVisible2 = false">取 消</el-button>
					<el-button type="primary" @click="StairNoticeTo2()">确 定</el-button>
				</div>
			</el-dialog>
			<!-- 任务拒绝弹框 -->
			<el-dialog title="审核拒绝" :visible.sync="dialogFormVisible" center>
				<div style="margin-bottom: 10px;">
					<span
						style="width: 200px;display: inline-block;text-align: right;position: relative;top: -70px;">拒绝理由：</span>
					<el-input style="width:50%;" v-model="content" type="textarea" :rows="4" placeholder="请输入拒绝理由">
					</el-input>
				</div>
				<div slot="footer" class="dialog-footer">
					<el-button @click="dialogFormVisible = false">取 消</el-button>
					<el-button type="primary" @click="refuseto()">确 定</el-button>
				</div>
			</el-dialog>
		</el-tabs>
		<!-- 不可提现添加金额 -->
		<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>

			<div style="margin-bottom: 10px;">
				<span style="width: 200px;display: inline-block;text-align: right;">次数：</span>
				<el-input style="width:50%;" v-model="money" type="number" :min="0" :max="100" :controls="false"
					placeholder="请输入次数"></el-input>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogFormVisible1 = false">取 消</el-button>
				<el-button type="primary" @click="StairNoticeTo1()">确 定</el-button>
			</div>
		</el-dialog>
		<!-- 修改会员 -->
		<el-dialog title="修改会员" :visible.sync="dialogFormVisibleZs" center>
			<!-- <div style="margin-bottom: 10px;">
    		<span style="width: 200px;display: inline-block;text-align: right;">类型：</span>
    		<el-radio-group v-model="type">
    			<el-radio :label="1">添加</el-radio>
    			<el-radio :label="2">减少</el-radio>
    		</el-radio-group>
    	</div> -->
			<div style="margin-bottom: 20px;position: relative;">
				<div style="width: 200px;display: inline-block;text-align: right;position: absolute;top: 0;">会员种类：</div>
				<div class="ruleitem" style="display: inline-block;margin-left: 205px;">
						<span><el-radio v-for="(item,index) in vipData" :key="index" v-model="vipId"
								:label="item.id">{{item.vipName}}</el-radio></span>
				</div>
			</div>
			<div style="margin-bottom: 20px;">
				<span style="width: 200px;display: inline-block;text-align: right;">会员等级：</span>
				<el-radio-group v-model="vipNameType">
					<el-radio :label="0">月会员</el-radio>
					<el-radio :label="1">季会员</el-radio>
					<el-radio :label="2">年会员</el-radio>
				</el-radio-group>
			</div>
			<div style="margin-bottom: 10px;">
				<span style="width: 200px;display: inline-block;text-align: right;">修改天数：</span>
				<el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
					placeholder="请输入修改天数"></el-input>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogFormVisibleZs = false">取 消</el-button>
				<el-button type="primary" @click="updateVip()">确 定</el-button>
			</div>
		</el-dialog>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				openValue: 1,
				closeValue: 2,
				state: 'false',
				limit: 10,
				page: 1,
				phone: '',
				nickNam: '',
				platform: 'all',
				isRelation: -1,
				isTuan: -1,
				value: '',
				payData: [],
				nickName: '',
				grade: '',
				name: '',
				activeName: 'first',
				tableDataLoading: true,
				tableData: [],
				platforms: [{
						value: 'all',
						label: '全部'
					}, {
						value: 'wap',
						label: '网站'
					}, {
						value: 'app',
						label: 'APP'
					}, {
						value: 'weixin',
						label: '微信公众号'
					},
					{
						value: 'mp',
						label: '微信小程序'
					}
				],
				campus: '',
				homeData1: [],
				isAuthentication: 1,
				dialogFormVisible2: false,
				dialogFormVisible: false,
				proportion: '',
				texts: '',
				userIdss: '',
				content: '',
				status: -1,
				helpTakeId: '',
				checkBoxData: [], //多选框选择的值
				userResumesStatus: '',
				userResumesStatuslist: [{
					value: '',
					label: '全部'
				}, {
					value: 1,
					label: '简历展示'
				}, {
					value: 2,
					label: '简历隐藏'
				}, {
					value: 3,
					label: '审核中'
				}, ],
				dialogFormVisible1: false,
				money: '',
				userId: '',
				member: '',
				weekMember: '',
				resumes: '',
				isUserVip: '',
				isCompanyVip: '',

				info: {
					stockDate: this.getNowTime(), //日期
				},
				info2: {
					stockDate2: this.getNowTime2(), //日期
				},
				startTime: '',
				endTime: '',
				dialogFormVisibleZs: false,
				isVip: '',
				type: 1,
				proportion: '',
				vipData: [],
				vipId: '',
				vipNameType: 0,
				// inviterCodeT: '',
				// invitationCodeT: '',
			}
		},
		methods: {
			//处理默认选中当前日期
			getNowTime() {
				var now = new Date()
				var year = now.getFullYear() //得到年份
				var month = now.getMonth() //得到月份
				var date = now.getDate() //得到日期
				month = month + 1
				month = month.toString().padStart(2, '0')
				date = date.toString().padStart(2, '0')
				var defaultDate = `${year}-${month}-${date}`
				return defaultDate
				this.$set(this.info, 'stockDate', defaultDate)
			},
			//处理默认选中当前日期
			getNowTime2() {
				var now = new Date()
				var year = now.getFullYear() //得到年份
				var month = now.getMonth() - now.getMonth() //得到月份
				var date = now.getDate() - now.getDate() + 1 //得到日期
				month = month + 1
				month = month.toString().padStart(2, '0')
				date = date.toString().padStart(2, '0')
				var defaultDate = `${year}-${month}-${date}`
				return defaultDate
				this.$set(this.info, 'stockDate', defaultDate)
			},
			// 多选
			changeFun(val) {
				this.checkBoxData = val;
			},
			// 状态
			change(val, userId) {
				this.$http({
					url: this.$http.adornUrl(`user/updateUserStatusByUserId?userId=${userId}`),
					method: 'get',
					data: this.$http.adornData({})
				}).then(({
					data
				}) => {
					this.$message({
						message: '操作成功',
						type: 'success',
						duration: 1500,
						onClose: () => {
							this.dataSelect()
						}
					})
				})
			},
			// 详情跳转
			updates(row) {
				this.$router.push({
					path: '/userDetail',
					query: {
						userId: row.userId
					}
				})
			},
			// 详情跳转
			updates2(inviterCode) {
				if(inviterCode){
					this.$http({
						url: this.$http.adornUrl('user/selectUserByInvitationCode'),
						method: 'get',
						params: this.$http.adornParams({
					   'invitationCode':inviterCode
					  })
					}).then(({
						data
					}) => {
						if (data.code == 0) {
					    if(data.data.userEntity){
					      this.$router.push({
					      	path: '/userDetail',
					      	query: {
					      		userId: data.data.userEntity.userId
					      	}
					      })
					    }
						} else {
							this.$message({
								message: data.msg,
								type: 'warning',
								duration: 1500,
								onClose: () => {}
							})
						}
					})
				}
				
				// if(row.superior){
				// 	this.$router.push({
				// 		path: '/userDetail',
				// 		query: {
				// 			userId: row.superior
				// 		}
				// 	})
				// }
				
			},
			// 获取会员类型
			classSelectVipType() {
				this.$http({
					url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
					method: 'get',
					params: this.$http.adornParams({

					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.tableDataLoading = false
						let returnData = data.data
						this.vipData = returnData.list
					} else {
						this.$notify({
							title: '提示',
							duration: 1800,
							message: data.msg,
							type: 'warning'
						});
					}

				})
			},
			handleClick(tab, event) {
				this.page = 1
				this.campus = ''
				// this.inviterCodeT = ''
				// this.invitationCodeT = ''
				this.phone = ''
				this.checkBoxData = []
				if (tab._props.label == '全部用户') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.member = ''
					this.resumes = ''
					this.member = ''
					this.isUserVip = ''
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '会员用户') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.member = ''
					this.resumes = ''
					this.member = ''
					this.isUserVip = 1
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '普通用户') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.member = ''
					this.resumes = ''
					this.member = ''
					this.isUserVip = 0
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '用户中心') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.member = ''
					this.resumes = ''
					this.member = ''
					this.isUserVip = ''
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '用户中心') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.member = ''
					this.resumes = ''
					this.member = ''
					this.isUserVip = ''
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '简历管理') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.resumes = 1
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '人才库管理') {
					this.isAuthentication = 1
					this.userResumesStatus = ''
					this.resumes = 2
					this.weekMember = ''
					this.dataSelect()
				}
				if (tab._props.label == '审核入职用户') {
					this.isAuthentication = 0
					this.userResumesStatus = 3
					this.resumes = ''
					this.weekMember = ''
					this.dataSelect()
				}



			},
			handleSizeChange(val) {
				this.limit = val
				this.dataSelect()
			},
			handleCurrentChange(val) {
				this.page = val
				this.dataSelect()
			},
			handleSizeChange1(val) {
				this.limit = val
				this.paySelect()
			},
			handleCurrentChange1(val) {
				this.page = val
				this.paySelect()
			},
			// select自动选择
			selectTrigger() {
				this.dataSelect()
			},
			// 查询
			select() {
				this.page = 1
				this.dataSelect()
			},
			select2() {
				this.paySelect()
			},
			// 重置
			cleans() {
				this.page = 1
				this.campus = ''
				// this.inviterCodeT = ''
				// this.invitationCodeT = ''
				this.phone = ''
				this.startTime = ''
				this.endTime = ''
				this.dataSelect()
			},
			//删除用户
			deleteuser(row) {
				let delid = row.userId
				this.$confirm(`确定删除此条信息?`, '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.$http({
						url: this.$http.adornUrl(`user/deleteUserByUserId/${delid}`),
						method: 'post',
						params: this.$http.adornData({})
					}).then(({
						data
					}) => {
						if (data.code == 0) {
							this.$message({
								message: '删除成功',
								type: 'success',
								duration: 1500,
								onClose: () => {
									this.dataSelect()
								}
							})
						} else {
							this.$message({
								message: data.msg,
								type: 'warning',
								duration: 1500,
								onClose: () => {}
							})
						}
					})
				})
			},
			// 封号
			updates1(row) {

			},
			// 获取社区数据列表
			homeSelect() {
				this.tableDataLoading = true
				this.$http({
					url: this.$http.adornUrl('helpCampus/selectCampusList'),
					method: 'get',
					params: this.$http.adornParams({
						// 'page':this.page,
						// 'limit':this.limit,
						// 'content':this.content
					})
				}).then(({
					data
				}) => {
					this.tableDataLoading = false
					let returnData = data.data;
					this.homeData1 = returnData
				})
			},
			// 筛选信息
			animeDat2(state) {
				this.dataSelect()
			},
			// 获取数据列表
			dataSelect() {
				if (this.startTime != "" && this.startTime !== null) {
					if (this.endTime == '' || this.endTime == null) {
						this.$notify({
							title: '提示',
							duration: 1800,
							message: '请选择截止时间',
							type: 'warning'
						});
						return
					}
				}
				if (this.endTime != "" && this.endTime !== null) {
					if (this.startTime == '' || this.startTime == null) {
						this.$notify({
							title: '提示',
							duration: 1800,
							message: '请选择开始时间',
							type: 'warning'
						});
						return
					}
				}
				this.tableDataLoading = true
				this.$http({
					url: this.$http.adornUrl('user/selectUserList'),
					method: 'get',
					params: this.$http.adornParams({
						'page': this.page,
						'limit': this.limit,
						'member': this.member,
						'phone': this.phone,
						'userName': this.campus,
						'userType': this.isAuthentication,
						// 'userResumesStatus': this.userResumesStatus,
						'weekMember': this.weekMember,
						'resumes': this.resumes,
						'isUserVip': this.isUserVip,
						'isCompanyVip': this.isCompanyVip,
						'startTime': this.startTime,
						'endTime': this.endTime,
						// 'inviterCode': this.inviterCodeT,
						// 'invitationCode': this.invitationCodeT,
					})
				}).then(({
					data
				}) => {
					this.tableDataLoading = false
					if(data.data&&data.data.list.length>0){
						for(var i in data.data.list){
							var pattern = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
							var phone1 = data.data.list[i].phone
							var userName1 = data.data.list[i].userName
							if(pattern.test(phone1)){
								var one = phone1.slice(0, 3)
								var two = phone1.slice(7, 11)
								data.data.list[i].phone1 = one+'****'+two
							}
							if(pattern.test(userName1)){
								var one = userName1.slice(0, 3)
								var two = userName1.slice(7, 11)
								data.data.list[i].userName1 = one+'****'+two
							}
							
							
						}
					}
					let returnData = data.data
					this.tableData = returnData
				})
			},
			xiugai(row, text) {
				if (text == 'rate') {
					this.proportion = row.rate
				}
				if (text == 'zhiRate') {
					this.proportion = row.zhiRate
				}
				if (text == 'feiRate') {
					this.proportion = row.feiRate
				}
				this.texts = text
				this.userIdss = row.userId
				this.dialogFormVisible2 = true
			},
			StairNoticeTo2() {
				var datas = {}
				if (this.texts == 'rate') {
					datas.rate = this.proportion
				}
				if (this.texts == 'zhiRate') {
					datas.zhiRate = this.proportion
				}
				if (this.texts == 'feiRate') {
					datas.feiRate = this.proportion
				}
				datas.userId = this.userIdss
				this.$http({
					url: this.$http.adornUrl('user/updateUserByUserId'),
					method: 'post',
					data: this.$http.adornData(datas)
				}).then(({
					data
				}) => {
					console.log('data', data)
					this.$message({
						message: '修改成功',
						type: 'success',
						duration: 1500,
						onClose: () => {
							this.dialogFormVisible2 = false
							this.dataSelect()
						}
					})
				})
			},
			//任务通过
			passClick(id) {
				this.status = 1
				this.content = '同意'
				var ids = id ? [id] : this.checkBoxData.map(item => {
					return item.userId
				})
				this.$http({
					url: this.$http.adornUrl('user/updateUserResumes'),
					method: 'post',
					params: this.$http.adornParams({
						'userIds': ids,
						'status': this.status,
						'auditContent': this.content
					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.$message({
							message: '操作成功',
							type: 'success',
							duration: 1500,
							onClose: () => {
								this.content = ''
								this.status = -1
								this.dataSelect()
							}
						})
					} else {
						this.$message({
							message: data.msg,
							type: 'error',
							duration: 1500,
							onClose: () => {
								this.content = ''
								this.status = -1
								this.dataSelect()
							}
						})
					}
				})
			},
			//单条任务通过
			passClicks(row) {
				this.status = 1
				this.content = '同意'
				this.$http({
					url: this.$http.adornUrl('user/updateUserResumes'),
					method: 'post',
					params: this.$http.adornParams({
						'userIds': row.userId,
						'status': this.status,
						'auditContent': this.content
					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.$message({
							message: '操作成功',
							type: 'success',
							duration: 1500,
							onClose: () => {
								this.content = ''
								this.status = -1
								this.dataSelect()
								this.dataSelectYh()
							}
						})
					} else {
						this.$message({
							message: data.msg,
							type: 'error',
							duration: 1500,
							onClose: () => {
								this.content = ''
								this.status = -1
								this.dataSelect()
							}
						})
					}

				})
			},
			//任务拒绝
			refuseClick(rows) {
				this.status = 2
				this.helpTakeId = rows.userId
				this.content = ''
				this.dialogFormVisible = true
			},
			refuseto() {
				if (this.content == '') {
					this.$notify({
						title: '提示',
						duration: 1800,
						message: '请输入拒绝理由',
						type: 'warning'
					});
					return
				}
				this.$http({
					url: this.$http.adornUrl('user/updateUserResumes'),
					method: 'post',
					params: this.$http.adornParams({
						'userIds': this.helpTakeId,
						'status': this.status,
						'auditContent': this.content
					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.dialogFormVisible = false
						this.$message({
							message: '操作成功',
							type: 'success',
							duration: 1500,
							onClose: () => {
								this.content = ''
								this.status = -1
								this.dataSelect()
								this.dataSelectYh()
							}
						})
					} else {
						this.$message({
							message: data.msg,
							type: 'error',
							duration: 1500,
							onClose: () => {
								this.content = ''
								this.status = -1
								this.dataSelect()
							}
						})
					}

				})
			},
			// 不可提现金额充值
			rechargenone(userId) {
				this.userId = userId
				this.dialogFormVisible1 = true
			},
			StairNoticeTo1() {

				if (this.money == '') {
					this.$notify({
						title: '提示',
						duration: 1800,
						message: '请输入次数',
						type: 'warning'
					})
					return
				}
				this.$http({
					url: this.$http.adornUrl('user/updateUserViewResumes'),
					method: 'post',
					params: this.$http.adornParams({
						'userId': this.userId,
						'num': this.money
					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.$message({
							message: '修改成功',
							type: 'success',
							duration: 1500,
							onClose: () => {
								this.money = ''
								this.dataSelect()
							}
						})
						this.dialogFormVisible1 = false
					} else {
						this.$message.error(data.msg)
					}
				})
			},
			// 获取用户待审核数据
			dataSelectYh() {
				this.$http({
					url: this.$http.adornUrl('user/selectUserList'),
					method: 'get',
					params: this.$http.adornParams({
						'page': 1,
						'limit': 10,
						'member': '',
						'phone': '',
						'userName': '',
						'isAuthentication': 0,
						'userResumesStatus': 3,
						'weekMember': '',
						'resumes': ''
					})
				}).then(({
					data
				}) => {
					if (data.data) {
						this.$cookie.set('numberYh', data.data.totalCount)
					}
				})
			},
			// 导出
			exportBtn() {

				this.$http({
					url: this.$http.adornUrl('user/exportExcelUser'),
					method: 'get',
					responseType: 'blob',
					params: this.$http.adornParams({
						// 'page': page,
						// 'size': this.size,
						'member': this.member,
						'phone': this.phone,
						'userName': this.campus,
						'userType': this.isAuthentication,
						// 'userResumesStatus': this.userResumesStatus,
						'weekMember': this.weekMember,
						'resumes': this.resumes,
						'isUserVip': this.isUserVip,
						'isCompanyVip': this.isCompanyVip,
						'startTime': this.startTime,
						'endTime': this.endTime,
						// 'inviterCode': this.inviterCodeT,
						// 'invitationCode': this.invitationCodeT,
					})
				}).then(({
					data
				}) => {
					let blob = new Blob([data], {
						type: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
					})
					if (window.navigator.msSaveOrOpenBlob) {
						navigator.msSaveBlob(blob)
					} else {
						let url = window.URL.createObjectURL(blob)
						let elink = document.createElement('a')
						elink.download = '个人用户列表.xlsx'
						elink.style.display = 'none'
						elink.href = url
						document.body.appendChild(elink)
						elink.click()
						document.body.removeChild(elink)
					}
				})
			},
			// 修改会员弹框
			zengsongVip(row) {
				this.type = 1
				this.proportion = ''
				this.userIdss = row.userId
				this.dialogFormVisibleZs = true
				this.vipId=''
				this.vipNameType = 0
				this.classSelectVipType()
			},
			// 设置会员
			updateVip(row) {
				if (this.vipId == '') {
					this.$notify({
						title: '提示',
						duration: 1800,
						message: '请选择会员种类',
						type: 'warning'
					});
					return
				}
				if (this.proportion === '') {
					this.$notify({
						title: '提示',
						duration: 1800,
						message: '请输入天数',
						type: 'warning'
					});
					return
				}
				this.$http({
					url: this.$http.adornUrl('vipDetails/giveUserVip'),
					method: 'post',
					params: this.$http.adornParams({
						'userId': this.userIdss,
						'num': this.proportion,
						'vipType': 1,
						'vipId': this.vipId,
						'vipNameType': this.vipNameType,
						// 'type':this.type
					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.$message({
							message: '操作成功',
							type: 'success',
							duration: 1500,
							onClose: () => {
								this.dialogFormVisibleZs = false
								this.dataSelect()
							}
						})
					} else {
						this.$message({
							message: data.msg,
							type: 'warning',
							duration: 1500,
							onClose: () => {
								this.dataSelect()
							}
						})
					}

				})
			},
			// 取消会员
			quxiaoVip(row) {
				this.$confirm(`确定要取消会员?`, '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.$http({
						url: this.$http.adornUrl('vipDetails/cancelUserVip'),
						method: 'post',
						// data: this.$http.adornData({
						params: this.$http.adornParams({
							'userId': row.userId,
							'vipType': 1,
						})
					}).then(({
						data
					}) => {
						if (data.code == 0) {
							this.$message({
								message: '操作成功',
								type: 'success',
								duration: 1500,
								onClose: () => {
									this.dataSelect()
								}
							})
						} else {
							this.$message({
								message: data.msg,
								type: 'warning',
								duration: 1500,
								onClose: () => {}
							})
						}

					})
				})
			},
		},
		mounted() {
			var userResumesStatusN = this.$route.query.userResumesStatus
			if (userResumesStatusN) {
				this.activeName = 'ruzhi'
				this.userResumesStatus = 3
			} else {
				this.activeName = 'first'
				this.userResumesStatus = ''
			}


			// this.homeSelect()
			this.dataSelect()
		}
	}
</script>

<style scoped="scoped">
	.el-button+.el-button {
		margin-left: 0 !important;
		margin-top: 5px !important;
	}
</style>