|
|
@ -1,13 +1,13 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="sys-menu-container">
|
|
|
|
<div class="sys-menu-container">
|
|
|
|
<el-dialog v-model="state.isShowDialog" draggable :close-on-click-modal="false" width="700px">
|
|
|
|
<el-dialog v-model="state.isShowDialog" draggable :close-on-click-modal="false" width="769px">
|
|
|
|
<template #header>
|
|
|
|
<template #header>
|
|
|
|
<div style="color: #fff">
|
|
|
|
<div style="color: #fff">
|
|
|
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>
|
|
|
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>
|
|
|
|
<span> {{ props.title }} </span>
|
|
|
|
<span> {{ props.title }} </span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
|
|
|
|
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="80px">
|
|
|
|
<el-row :gutter="35">
|
|
|
|
<el-row :gutter="35">
|
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
|
|
|
<el-form-item label="上级菜单">
|
|
|
|
<el-form-item label="上级菜单">
|
|
|
@ -29,9 +29,9 @@
|
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
|
|
|
<el-form-item label="菜单类型" prop="type" :rules="[{ required: true, message: '菜单类型不能为空', trigger: 'blur' }]">
|
|
|
|
<el-form-item label="菜单类型" prop="type" :rules="[{ required: true, message: '菜单类型不能为空', trigger: 'blur' }]">
|
|
|
|
<el-radio-group v-model="state.ruleForm.type">
|
|
|
|
<el-radio-group v-model="state.ruleForm.type">
|
|
|
|
<el-radio :value="1">目录</el-radio>
|
|
|
|
<el-radio :label="1">目录</el-radio>
|
|
|
|
<el-radio :value="2">菜单</el-radio>
|
|
|
|
<el-radio :label="2">菜单</el-radio>
|
|
|
|
<el-radio :value="3">按钮</el-radio>
|
|
|
|
<el-radio :label="3">按钮</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -58,7 +58,7 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-form-item label="菜单图标">
|
|
|
|
<el-form-item label="菜单图标">
|
|
|
|
<IconSelector v-model="state.ruleForm.icon" :size="getGlobalComponentSize" placeholder="菜单图标" type="all" />
|
|
|
|
<IconSelector v-model="state.ruleForm.icon" placeholder="菜单图标" type="all" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
@ -79,32 +79,32 @@
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-form-item label="是否隐藏">
|
|
|
|
<el-form-item label="是否隐藏">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isHide">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isHide">
|
|
|
|
<el-radio :value="true">隐藏</el-radio>
|
|
|
|
<el-radio :label="true">隐藏</el-radio>
|
|
|
|
<el-radio :value="false">不隐藏</el-radio>
|
|
|
|
<el-radio :label="false">不隐藏</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-form-item label="是否缓存">
|
|
|
|
<el-form-item label="是否缓存">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isKeepAlive">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isKeepAlive">
|
|
|
|
<el-radio :value="true">缓存</el-radio>
|
|
|
|
<el-radio :label="true">缓存</el-radio>
|
|
|
|
<el-radio :value="false">不缓存</el-radio>
|
|
|
|
<el-radio :label="false">不缓存</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-form-item label="是否固定">
|
|
|
|
<el-form-item label="是否固定">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isAffix">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isAffix">
|
|
|
|
<el-radio :value="true">固定</el-radio>
|
|
|
|
<el-radio :label="true">固定</el-radio>
|
|
|
|
<el-radio :value="false">不固定</el-radio>
|
|
|
|
<el-radio :label="false">不固定</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-form-item label="是否内嵌">
|
|
|
|
<el-form-item label="是否内嵌">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isIframe">
|
|
|
|
<el-radio-group v-model="state.ruleForm.isIframe">
|
|
|
|
<el-radio :value="true">内嵌</el-radio>
|
|
|
|
<el-radio :label="true">内嵌</el-radio>
|
|
|
|
<el-radio :value="false">不内嵌</el-radio>
|
|
|
|
<el-radio :label="false">不内嵌</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -124,8 +124,8 @@
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
|
|
<el-form-item label="是否启用">
|
|
|
|
<el-form-item label="是否启用">
|
|
|
|
<el-radio-group v-model="state.ruleForm.status">
|
|
|
|
<el-radio-group v-model="state.ruleForm.status">
|
|
|
|
<el-radio :value="1">启用</el-radio>
|
|
|
|
<el-radio :label="1">启用</el-radio>
|
|
|
|
<el-radio :value="2">不启用</el-radio>
|
|
|
|
<el-radio :label="2">不启用</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -147,11 +147,10 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup name="sysEditMenu">
|
|
|
|
<script lang="ts" setup name="sysEditMenu">
|
|
|
|
import { computed, reactive, ref } from 'vue';
|
|
|
|
import { reactive, ref } from 'vue';
|
|
|
|
import IconSelector from '/@/components/iconSelector/index.vue';
|
|
|
|
import IconSelector from '/@/components/iconSelector/index.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import { getAPI } from '/@/utils/axios-utils';
|
|
|
|
import { getAPI } from '/@/utils/axios-utils';
|
|
|
|
import other from '/@/utils/other';
|
|
|
|
|
|
|
|
import { SysMenuApi } from '/@/api-services/api';
|
|
|
|
import { SysMenuApi } from '/@/api-services/api';
|
|
|
|
import { SysMenu, UpdateMenuInput } from '/@/api-services/models';
|
|
|
|
import { SysMenu, UpdateMenuInput } from '/@/api-services/models';
|
|
|
|
|
|
|
|
|
|
|
@ -166,16 +165,10 @@ const state = reactive({
|
|
|
|
ruleForm: {} as UpdateMenuInput,
|
|
|
|
ruleForm: {} as UpdateMenuInput,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 获取全局组件大小
|
|
|
|
|
|
|
|
const getGlobalComponentSize = computed(() => {
|
|
|
|
|
|
|
|
return other.globalComponentSize();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 打开弹窗
|
|
|
|
// 打开弹窗
|
|
|
|
const openDialog = (row: any) => {
|
|
|
|
const openDialog = (row: any) => {
|
|
|
|
state.ruleForm = JSON.parse(JSON.stringify(row));
|
|
|
|
state.ruleForm = JSON.parse(JSON.stringify(row));
|
|
|
|
state.isShowDialog = true;
|
|
|
|
state.isShowDialog = true;
|
|
|
|
ruleFormRef.value?.resetFields();
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭弹窗
|
|
|
|
// 关闭弹窗
|
|
|
|