feat(role): 角色模块的增删改查
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<el-form-item>
|
||||
<el-button type="success" :icon="Plus" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="state.queryParams.name"
|
||||
@@ -169,7 +170,7 @@
|
||||
import {listTableMenus, getMenuDetail, listTreeSelectMenus, addMenu, deleteMenus, updateMenu} from "@/api/system/menu";
|
||||
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
|
||||
import {ElForm, ElMessage, ElMessageBox} from "element-plus";
|
||||
import {defineEmits, reactive, ref, unref, onMounted, watch, getCurrentInstance, computed} from "vue";
|
||||
import {defineEmits, reactive, ref, unref, onMounted} from "vue";
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue';
|
||||
import TreeSelect from '@/components/TreeSelect/index.vue';
|
||||
import IconSelect from '@/components/IconSelect/index.vue';
|
||||
@@ -230,8 +231,6 @@ function handleQuery() {
|
||||
state.menuList = data
|
||||
state.total = total
|
||||
state.loading = false
|
||||
}).catch(() => {
|
||||
state.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
@@ -331,7 +330,6 @@ function submitForm() {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function resetForm() {
|
||||
state.formData = {
|
||||
id: undefined,
|
||||
@@ -346,6 +344,7 @@ function resetForm() {
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
resetForm()
|
||||
state.dialog.visible = false
|
||||
}
|
||||
|
||||
@@ -375,7 +374,6 @@ function selected(name: string) {
|
||||
showChooseIcon.value = false;
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<template #header>
|
||||
<svg-icon color="#333" icon-class="perm"/>
|
||||
<span style="margin:0 5px;">权限列表</span>
|
||||
<el-tag type="success" v-if=" state.menuId">{{ state.menuName }}</el-tag>
|
||||
<el-tag type="success" v-if="state.menuId">{{ state.menuName }}</el-tag>
|
||||
<el-tag type="warning" v-else size="small">请点击左侧菜单列表选择</el-tag>
|
||||
</template>
|
||||
<perm-table :menuId="state.menuId" :menuName="state.menuName"/>
|
||||
@@ -37,7 +37,7 @@ const state = reactive({
|
||||
menuName: ''
|
||||
})
|
||||
|
||||
const handleMenuClick = (menuRow: any) => {
|
||||
function handleMenuClick (menuRow: any){
|
||||
if (menuRow) {
|
||||
state.menuId = menuRow.id
|
||||
state.menuName = menuRow.name
|
||||
|
||||
Reference in New Issue
Block a user