|
@@ -47,7 +47,7 @@
|
|
|
v-if="$hasPermissions('B_powerMD_role_enable')"
|
|
|
checkedChildren="启用"
|
|
|
unCheckedChildren="禁用"
|
|
|
- id="roleList-isEnable"
|
|
|
+ :id="'roleList-isEnable-'+record.id"
|
|
|
v-model="record.isEnable"
|
|
|
@change="changeFlagHandle(text, record)" />
|
|
|
<span v-else>{{ record.isEnable==1?'已启用':'已禁用' }}</span>
|
|
@@ -58,9 +58,22 @@
|
|
|
</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('B_powerMD_role_edit')" type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
|
|
|
<a-icon
|
|
|
+ :id="'roleList-menus-'+record.id"
|
|
|
+ v-if="$hasPermissions('M_powerMD_role_menu')"
|
|
|
+ type="setting"
|
|
|
+ title="菜单权限"
|
|
|
+ :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }"
|
|
|
+ @click="openMenuModal(record)" />
|
|
|
+ <a-icon
|
|
|
+ :id="'roleList-edit-'+record.id"
|
|
|
+ v-if="$hasPermissions('B_powerMD_role_edit')"
|
|
|
+ type="edit"
|
|
|
+ title="编辑"
|
|
|
+ :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
|
|
|
+ @click="handleEdit(record)" />
|
|
|
+ <a-icon
|
|
|
+ :id="'roleList-del-'+record.id"
|
|
|
type="delete"
|
|
|
title="删除"
|
|
|
:style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
|
|
@@ -132,8 +145,7 @@ export default {
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- optionAlertShow: false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
@@ -160,11 +172,12 @@ export default {
|
|
|
// 打开分配权限弹窗
|
|
|
openMenuModal (row) {
|
|
|
this.showMenuModal = true
|
|
|
- this.$nextTick(()=>{
|
|
|
+ this.$nextTick(() => {
|
|
|
this.$refs.menuData.getmenuData(row.id)
|
|
|
})
|
|
|
},
|
|
|
- closeMenu(){
|
|
|
+ // 关闭分配权限弹窗
|
|
|
+ closeMenu () {
|
|
|
this.showMenuModal = false
|
|
|
},
|
|
|
// 删除
|
|
@@ -190,6 +203,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 编辑
|
|
|
handleEdit (row) {
|
|
|
this.showModal = true
|
|
|
this.itemData = row
|