多幼儿园后 不显示管理员问题

This commit is contained in:
zhanglipeng 2021-08-09 18:49:45 +08:00
parent e7dafbeb1e
commit 22fc4dcd02
2 changed files with 47 additions and 1 deletions

View File

@ -146,7 +146,7 @@
:data="userList" :data="userList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="40" align="center" /> <el-table-column :selectable="isShow" type="selection" width="40" align="center" />
<!-- <el-table-column label="用户编号" align="center" prop="userId" /> --> <!-- <el-table-column label="用户编号" align="center" prop="userId" /> -->
<el-table-column <el-table-column
fixed fixed
@ -173,6 +173,7 @@
v-model="scope.row.status" v-model="scope.row.status"
active-value="0" active-value="0"
inactive-value="1" inactive-value="1"
:disabled="!isShow(scope.row)"
@change="handleStatusChange(scope.row)" @change="handleStatusChange(scope.row)"
></el-switch> ></el-switch>
</template> </template>
@ -200,6 +201,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-show="isShow(scope.row)"
v-hasPermi="['system:user:edit']" v-hasPermi="['system:user:edit']"
>修改</el-button >修改</el-button
> >
@ -209,6 +211,7 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-show="isShow(scope.row)"
v-hasPermi="['system:user:remove']" v-hasPermi="['system:user:remove']"
>删除</el-button >删除</el-button
> >
@ -217,6 +220,7 @@
type="text" type="text"
icon="el-icon-key" icon="el-icon-key"
@click="handleResetPwd(scope.row)" @click="handleResetPwd(scope.row)"
v-show="isShow(scope.row)"
v-hasPermi="['system:user:resetPwd']" v-hasPermi="['system:user:resetPwd']"
>重置</el-button >重置</el-button
> >
@ -531,6 +535,14 @@ export default {
}); });
}, },
methods: { methods: {
//
isShow(row) {
if (row.remark == "xn") {
return false;
} else {
return true;
}
},
/** 查询用户列表 */ /** 查询用户列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -93,6 +93,40 @@
</if> </if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${dataScope} ${dataScope}
union all
select u.user_id, f.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, 'xn' as remark, d.dept_name, d.leader from
sys_user u
right join sys_user_dept f on u.user_id=f.user_id
left join sys_dept d on d.dept_id = f.dept_id
where u.del_flag = '0'
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="openId != null and openId != ''">
AND u.open_id = #{openId}
</if>
<if test="status != null and status != ''">
AND u.status = #{status}
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
<if test="deptId != null and deptId != 0">
AND (f.dept_id = #{deptId} OR f.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET
(#{deptId},ancestors) ))
</if>
<!-- 数据范围过滤 -->
${dataScope}
</select> </select>
<select id="selectUserListAll" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectUserListAll" parameterType="SysUser" resultMap="SysUserResult">