浏览代码

屏蔽权限

chenrui 4 年之前
父节点
当前提交
00d1a1f463
共有 2 个文件被更改,包括 41 次插入8 次删除
  1. 19 5
      src/views/power/role/roleList.vue
  2. 22 3
      src/views/power/user/userList.vue

+ 19 - 5
src/views/power/role/roleList.vue

@@ -41,14 +41,20 @@
       bordered>
       <!-- 启用禁用 -->
       <span slot="status" slot-scope="text, record">
-        <a-switch
+        <!-- <a-switch
           v-if="$hasPermissions('B_powerMD_role_enable')"
           checkedChildren="启用"
           unCheckedChildren="禁用"
           id="roleList-isEnable"
           v-model="record.isEnable"
           @change="changeFlagHandle(text, record)" />
-        <span v-else>{{ record.isEnable==1?'已启用':'已禁用' }}</span>
+        <span v-else>{{ record.isEnable==1?'已启用':'已禁用' }}</span> -->
+		<a-switch
+		  checkedChildren="启用"
+		  unCheckedChildren="禁用"
+		  id="roleList-isEnable"
+		  v-model="record.isEnable"
+		  @change="changeFlagHandle(text, record)" />
       </span>
       <!-- 角色描述 -->
       <template slot="remarks" slot-scope="text, record">
@@ -56,15 +62,23 @@
       </template>
       <!-- 操作 -->
       <span slot="action" slot-scope="text, record">
-        <a-icon v-if="$hasPermissions('M_powerMD_role_menu')" type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
+        <!-- <a-icon v-if="$hasPermissions('M_powerMD_role_menu')" type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
         <a-icon v-if="$hasPermissions('B_powerMD_role_edit')" type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
         <a-icon
           type="delete"
           title="删除"
           :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
           v-if="!record.isEnable && $hasPermissions('B_powerMD_role_del')"
-          @click="delect(record)" />
-      </span>
+          @click="delect(record)" /> -->
+		<a-icon type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
+		<a-icon type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
+		<a-icon
+			type="delete"
+			title="删除"
+			:style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
+			v-if="!record.isEnable"
+			@click="delect(record)" />
+		</span>
     </s-table>
     <roleModal :visible="showModal" :data="itemData" @refresh="refreshTable" @close="showModal = false"></roleModal>
     <menuModal :visible="showMenuModal" :data="menuData" @close="showMenuModal = false"></menuModal>

+ 22 - 3
src/views/power/user/userList.vue

@@ -39,11 +39,12 @@
       bordered
     >
       <span slot="status" slot-scope="text, record">
-        <a-switch v-if="$hasPermissions('B_powerMD_user_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
-        <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span>
+        <!-- <a-switch v-if="$hasPermissions('B_powerMD_user_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+        <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
+		<a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
       </span>
       <span slot="action" slot-scope="text, record">
-        <a-icon
+        <!-- <a-icon
           type="edit"
           title="编辑"
           :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
@@ -61,6 +62,24 @@
           title="删除"
           :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
           v-if="record.loginFlag==0 && $hasPermissions('B_powerMD_user_del')"
+          @click="delect(record)"/> -->
+        <a-icon
+          type="edit"
+          title="编辑"
+          :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
+          @click="handleEdit(record)"
+        />
+        <a-icon
+          type="unlock"
+          title="重置密码"
+          v-if="record.loginFlag==1"
+          :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
+          @click="resetPassword(record)" />
+        <a-icon
+          type="delete"
+          title="删除"
+          :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
+          v-if="record.loginFlag==0"
           @click="delect(record)"/>
       </span>
     </s-table>