Преглед на файлове

调整页面不显示角色和菜单节点

xusl преди 1 година
родител
ревизия
71cf207aad
променени са 2 файла, в които са добавени 27 реда и са изтрити 30 реда
  1. 5 5
      backend/src/main/resources/mapper/system/SysMenuMapper.xml
  2. 22 25
      ui/src/views/sysManager/userManager/index.vue

+ 5 - 5
backend/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -37,13 +37,13 @@
     <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
     <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
 		<include refid="selectMenuVo"/>
 		<include refid="selectMenuVo"/>
 		<where>
 		<where>
-			del_flag=0
+			del_flag=0 and visible = '0'
 			<if test="menuName != null and menuName != ''">
 			<if test="menuName != null and menuName != ''">
 				AND menu_name like concat('%', #{menuName}, '%')
 				AND menu_name like concat('%', #{menuName}, '%')
 			</if>
 			</if>
-			<if test="visible != null and visible != ''">
-				AND visible = #{visible}
-			</if>
+<!--			<if test="visible != null and visible != ''">-->
+<!--				AND visible = #{visible}-->
+<!--			</if>-->
 			<if test="status != null and status != ''">
 			<if test="status != null and status != ''">
 				AND status = #{status}
 				AND status = #{status}
 			</if>
 			</if>
@@ -86,7 +86,7 @@
 			 left join sys_user_role ur on rm.role_id = ur.role_id
 			 left join sys_user_role ur on rm.role_id = ur.role_id
 			 left join sys_role ro on ur.role_id = ro.role_id
 			 left join sys_role ro on ur.role_id = ro.role_id
 			 left join sys_user u on ur.user_id = u.id
 			 left join sys_user u on ur.user_id = u.id
-		where u.id = #{userId} and m.menu_type in ('M', 'C') and m.del_flag=0 and u.del_flag=0 and rm.del_flag=0 and ur.del_flag=0 and ro.del_flag=0
+		where u.id = #{userId} and m.menu_type in ('M', 'C') and m.del_flag=0 and u.del_flag=0 and rm.del_flag=0 and ur.del_flag=0 and ro.del_flag=0 and visible='0'
 		order by m.parent_id, m.order_num
 		order by m.parent_id, m.order_num
 	</select>
 	</select>
 
 

+ 22 - 25
ui/src/views/sysManager/userManager/index.vue

@@ -269,7 +269,7 @@
             :data="menuOptions"
             :data="menuOptions"
             ref="menu"
             ref="menu"
             node-key="id"
             node-key="id"
-            empty-text="无数据,请选择字符标识!"
+            empty-text="无数据,请选择角色类型!"
             :props="defaultProps"
             :props="defaultProps"
           ></el-tree>
           ></el-tree>
         </el-form-item>
         </el-form-item>
@@ -816,7 +816,6 @@ export default {
           type: 'error',
           type: 'error',
           message: '创建密码失败!'
           message: '创建密码失败!'
         });
         });
-        console.log(error)
         this.loading = false
         this.loading = false
       })
       })
     }, 1000),
     }, 1000),
@@ -1060,7 +1059,6 @@ export default {
           type: 'error',
           type: 'error',
           message: '解锁失败!'
           message: '解锁失败!'
         });
         });
-        console.log(error)
         this.loading = false
         this.loading = false
       })
       })
     }, 1000),
     }, 1000),
@@ -1071,7 +1069,6 @@ export default {
      * @returns {Promise<unknown>}
      * @returns {Promise<unknown>}
      */
      */
     getMenu(rowRoleId){
     getMenu(rowRoleId){
-      console.log("rowRoleId="+rowRoleId)
       const a = this.$axios
       const a = this.$axios
       const _this = this
       const _this = this
       return new Promise(async function (resolve, reject) {
       return new Promise(async function (resolve, reject) {
@@ -1102,27 +1099,27 @@ export default {
       const a = this.$axios
       const a = this.$axios
       const _this = this
       const _this = this
       return new Promise(async function (resolve, reject) {
       return new Promise(async function (resolve, reject) {
-        let sysTime
-        let lk
-        await a.get('/sysPolicyController/getLicenseKey').then((res) => {
-          sysTime = res.data.sysTime
-          lk = res.data.lk
-        }).catch((error) => {
-        })
-
-        var userRoleParams = {
-          userId: userid,
-          sysTime: sysTime,
-          lk: lk
-        }
-        await a.get('/sysUserController/getUserRole',
-          {params: userRoleParams}).then(res => {
-
-          _this.userRoleId = res.data.roleId
-
-          // 返回userRole对象
-          resolve(res.data)
-        })
+        // let sysTime
+        // let lk
+        // await a.get('/sysPolicyController/getLicenseKey').then((res) => {
+        //   sysTime = res.data.sysTime
+        //   lk = res.data.lk
+        // }).catch((error) => {
+        // })
+        //
+        // var userRoleParams = {
+        //   userId: userid,
+        //   sysTime: sysTime,
+        //   lk: lk
+        // }
+        // await a.get('/sysUserController/getUserRole',
+        //   {params: userRoleParams}).then(res => {
+        // console.log(res)
+        //   _this.userRoleId = res.data.roleId
+        //
+        //   // 返回userRole对象
+        //   resolve(res.data)
+        // })
 
 
         let sysTime1
         let sysTime1
         let lk1
         let lk1