import { ax as ElPopover, y as ElInput, a5 as ElTabs, a6 as ElTabPane, F as ElScrollbar, l as ElTooltip, i as ElIcon, d as ElementPlusIconsVue, x as ElFormItem, aq as ElSelect, ar as ElOption, h as ElButton, t as ElLink, w as ElForm, U as ElRow, V as ElCol, m as ElDropdown, n as ElDropdownMenu, o as ElDropdownItem, al as ElTable, am as ElTableColumn, q as ElTag, u as ElEmpty, ao as vLoading, T as ElCard, a3 as ElDescriptions, a4 as ElDescriptionsItem, aH as ElTreeSelect, P as ElRadioGroup, Q as ElRadio, av as ElInputNumber, L as ElDrawer, D as ElMessageBox } from "./element-plus.CkEW9frc.js"; import { _ as __vitePreload, u as useAppStore, f as useUserStore, D as DeviceEnum } from "./index.CMd5bD1r.js"; import { J as defineComponent, ev as useModel, r as ref, eC as onClickOutside, t as onMounted, aO as resolveComponent, S as openBlock, _ as createElementBlock, a2 as normalizeStyle, $ as createVNode, o as unref, a0 as withCtx, a1 as createBaseVNode, z as isRef, H as Fragment, ay as renderList, a3 as normalizeClass, T as createBlock, a7 as resolveDynamicComponent, R as renderSlot, aw as withModifiers, a8 as createCommentVNode, ez as mergeModels, j as computed, ak as reactive, aP as resolveDirective, a6 as withDirectives, a9 as createTextVNode, aa as toDisplayString, ax as createSlots } from "./.pnpm.BW3P1y8f.js"; import { _ as _export_sfc } from "./_plugin-vue_export-helper.1tPrXgE0.js"; import { D as DatePicker } from "./index.Cu5O_6Z1.js"; import { M as MenuAPI } from "./menu.uy9JHUjy.js"; import { M as MenuTypeEnum } from "./menu.enum.Q9hatFRE.js"; import { f as formatTree } from "./common.ySZAMJjg.js"; import { f as formatToDateTime } from "./dateUtil.SHphbRyf.js"; import "./codemirror.CvJAcn2d.js"; const _hoisted_1$1 = { class: "icon-grid" }; const _hoisted_2$1 = ["onClick"]; const _hoisted_3$1 = { class: "icon-grid" }; const _hoisted_4$1 = ["onClick"]; const _sfc_main$1 = /* @__PURE__ */ defineComponent({ __name: "index", props: /* @__PURE__ */ mergeModels({ modelValue: { type: String, default: "" }, width: { type: String, default: "500px" } }, { "modelValue": { type: String, required: true, default: "" }, "modelModifiers": {} }), emits: /* @__PURE__ */ mergeModels(["update:modelValue"], ["update:modelValue"]), setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; const iconSelectRef = ref(); const popoverContentRef = ref(); const popoverVisible = ref(false); const activeTab = ref("svg"); const svgIcons = ref([]); const elementIcons = ref(Object.keys(ElementPlusIconsVue)); const selectedIcon = useModel(__props, "modelValue"); const filterText = ref(""); const filteredSvgIcons = ref([]); const filteredElementIcons = ref(elementIcons.value); const isElementIcon = computed(() => { return selectedIcon.value && selectedIcon.value.startsWith("el-icon"); }); function loadIcons() { const icons = /* @__PURE__ */ Object.assign({ "../../assets/icons/ai.svg": () => __vitePreload(() => import("./ai.Cf67jpdB.js"), true ? [] : void 0), "../../assets/icons/api.svg": () => __vitePreload(() => import("./api.l2b6jUI8.js"), true ? [] : void 0), "../../assets/icons/backtop.svg": () => __vitePreload(() => import("./backtop.CCrlZ6DW.js"), true ? [] : void 0), "../../assets/icons/bell.svg": () => __vitePreload(() => import("./bell.COgEvfUU.js"), true ? [] : void 0), "../../assets/icons/bilibili.svg": () => __vitePreload(() => import("./bilibili.Cm8g2EuW.js"), true ? [] : void 0), "../../assets/icons/browser.svg": () => __vitePreload(() => import("./browser.DMysThoX.js"), true ? [] : void 0), "../../assets/icons/captcha.svg": () => __vitePreload(() => import("./captcha.1vRMn3QA.js"), true ? [] : void 0), "../../assets/icons/cascader.svg": () => __vitePreload(() => import("./cascader.BuOGRWAt.js"), true ? [] : void 0), "../../assets/icons/client.svg": () => __vitePreload(() => import("./client.DbSnLnBW.js"), true ? [] : void 0), "../../assets/icons/close.svg": () => __vitePreload(() => import("./close.CcKySo1D.js"), true ? [] : void 0), "../../assets/icons/close_all.svg": () => __vitePreload(() => import("./close_all.RVlc-Muj.js"), true ? [] : void 0), "../../assets/icons/close_left.svg": () => __vitePreload(() => import("./close_left.Ct6_5Rdv.js"), true ? [] : void 0), "../../assets/icons/close_other.svg": () => __vitePreload(() => import("./close_other.CR-Zm5Wk.js"), true ? [] : void 0), "../../assets/icons/close_right.svg": () => __vitePreload(() => import("./close_right.Sw3LAzEG.js"), true ? [] : void 0), "../../assets/icons/cnblogs.svg": () => __vitePreload(() => import("./cnblogs.Cnl0uwlj.js"), true ? [] : void 0), "../../assets/icons/code.svg": () => __vitePreload(() => import("./code.B6RkDdZW.js"), true ? [] : void 0), "../../assets/icons/collapse.svg": () => __vitePreload(() => import("./collapse.C7n3W7WQ.js"), true ? [] : void 0), "../../assets/icons/csdn.svg": () => __vitePreload(() => import("./csdn.D4sMADXk.js"), true ? [] : void 0), "../../assets/icons/dict.svg": () => __vitePreload(() => import("./dict.DXhYZbiw.js"), true ? [] : void 0), "../../assets/icons/document.svg": () => __vitePreload(() => import("./document.D6H9J6FJ.js"), true ? [] : void 0), "../../assets/icons/down.svg": () => __vitePreload(() => import("./down.BAyd2bp1.js"), true ? [] : void 0), "../../assets/icons/download.svg": () => __vitePreload(() => import("./download.CQwZ95Ts.js"), true ? [] : void 0), "../../assets/icons/enter.svg": () => __vitePreload(() => import("./enter.Cr5JgEAl.js"), true ? [] : void 0), "../../assets/icons/esc.svg": () => __vitePreload(() => import("./esc.G4tY5jp6.js"), true ? [] : void 0), "../../assets/icons/file.svg": () => __vitePreload(() => import("./file.B2KeudPq.js"), true ? [] : void 0), "../../assets/icons/fullscreen-exit.svg": () => __vitePreload(() => import("./fullscreen-exit.naRBo3z1.js"), true ? [] : void 0), "../../assets/icons/fullscreen.svg": () => __vitePreload(() => import("./fullscreen.DoFVIQAe.js"), true ? [] : void 0), "../../assets/icons/gitcode.svg": () => __vitePreload(() => import("./gitcode.D9ZPXluz.js"), true ? [] : void 0), "../../assets/icons/gitee.svg": () => __vitePreload(() => import("./gitee.BtenfK5P.js"), true ? [] : void 0), "../../assets/icons/github.svg": () => __vitePreload(() => import("./github.CNBHlQQa.js"), true ? [] : void 0), "../../assets/icons/homepage.svg": () => __vitePreload(() => import("./homepage.DfQh6yqE.js"), true ? [] : void 0), "../../assets/icons/java.svg": () => __vitePreload(() => import("./java.C0GV_Cjb.js"), true ? [] : void 0), "../../assets/icons/juejin.svg": () => __vitePreload(() => import("./juejin.DVYJr425.js"), true ? [] : void 0), "../../assets/icons/language.svg": () => __vitePreload(() => import("./language.B3rIcKBu.js"), true ? [] : void 0), "../../assets/icons/menu.svg": () => __vitePreload(() => import("./menu.ChzwFmc0.js"), true ? [] : void 0), "../../assets/icons/message.svg": () => __vitePreload(() => import("./message.B6Quu42i.js"), true ? [] : void 0), "../../assets/icons/monitor.svg": () => __vitePreload(() => import("./monitor.BSyzfv0x.js"), true ? [] : void 0), "../../assets/icons/project.svg": () => __vitePreload(() => import("./project.XjFff9nj.js"), true ? [] : void 0), "../../assets/icons/python.svg": () => __vitePreload(() => import("./python.D_Z4CZVy.js"), true ? [] : void 0), "../../assets/icons/qq.svg": () => __vitePreload(() => import("./qq.DTxJA0AE.js"), true ? [] : void 0), "../../assets/icons/refresh.svg": () => __vitePreload(() => import("./refresh.CqWaxVEi.js"), true ? [] : void 0), "../../assets/icons/role.svg": () => __vitePreload(() => import("./role.8tXq_2Gi.js"), true ? [] : void 0), "../../assets/icons/search.svg": () => __vitePreload(() => import("./search.CV925Gyl.js"), true ? [] : void 0), "../../assets/icons/setting.svg": () => __vitePreload(() => import("./setting.DK3SiLcn.js"), true ? [] : void 0), "../../assets/icons/size.svg": () => __vitePreload(() => import("./size.CI4tFiut.js"), true ? [] : void 0), "../../assets/icons/sql.svg": () => __vitePreload(() => import("./sql.Sz9dBC9o.js"), true ? [] : void 0), "../../assets/icons/system.svg": () => __vitePreload(() => import("./system.Afd1pne6.js"), true ? [] : void 0), "../../assets/icons/table.svg": () => __vitePreload(() => import("./table.D_fEZ9jt.js"), true ? [] : void 0), "../../assets/icons/todo.svg": () => __vitePreload(() => import("./todo.Dgowz3ls.js"), true ? [] : void 0), "../../assets/icons/tree.svg": () => __vitePreload(() => import("./tree.DYKDdUYx.js"), true ? [] : void 0), "../../assets/icons/typescript.svg": () => __vitePreload(() => import("./typescript.B4mPtSqT.js"), true ? [] : void 0), "../../assets/icons/up.svg": () => __vitePreload(() => import("./up.Db84LfX4.js"), true ? [] : void 0), "../../assets/icons/user.svg": () => __vitePreload(() => import("./user.B1n1Qs30.js"), true ? [] : void 0), "../../assets/icons/visitor.svg": () => __vitePreload(() => import("./visitor.CqHLD15H.js"), true ? [] : void 0), "../../assets/icons/vue.svg": () => __vitePreload(() => import("./vue.CjoOGL0S.js"), true ? [] : void 0), "../../assets/icons/wechat.svg": () => __vitePreload(() => import("./wechat.COjJPdQs.js"), true ? [] : void 0), "../../assets/icons/xml.svg": () => __vitePreload(() => import("./xml.CMJUyG--.js"), true ? [] : void 0) }); for (const path in icons) { const iconName = path.replace(/.*\/(.*)\.svg$/, "$1"); svgIcons.value.push(iconName); } filteredSvgIcons.value = svgIcons.value; } function handleTabClick(tabPane) { activeTab.value = tabPane.props.name; filterIcons(); } function filterIcons() { if (activeTab.value === "svg") { filteredSvgIcons.value = filterText.value ? svgIcons.value.filter((icon) => icon.toLowerCase().includes(filterText.value.toLowerCase())) : svgIcons.value; } else { filteredElementIcons.value = filterText.value ? elementIcons.value.filter( (icon) => icon.toLowerCase().includes(filterText.value.toLowerCase()) ) : elementIcons.value; } } function selectIcon(icon) { const iconName = activeTab.value === "element" ? "el-icon-" + icon : icon; emit("update:modelValue", iconName); popoverVisible.value = false; } function togglePopover() { popoverVisible.value = !popoverVisible.value; } onClickOutside(iconSelectRef, () => popoverVisible.value = false, { ignore: [popoverContentRef] }); function clearSelectedIcon() { selectedIcon.value = ""; } onMounted(() => { loadIcons(); if (selectedIcon.value) { if (elementIcons.value.includes(selectedIcon.value.replace("el-icon-", ""))) { activeTab.value = "element"; } else { activeTab.value = "svg"; } } }); return (_ctx, _cache) => { const _component_el_icon = ElIcon; const _component_CircleClose = resolveComponent("CircleClose"); const _component_ArrowDown = resolveComponent("ArrowDown"); const _component_el_input = ElInput; const _component_el_tooltip = ElTooltip; const _component_el_scrollbar = ElScrollbar; const _component_el_tab_pane = ElTabPane; const _component_el_tabs = ElTabs; const _component_el_popover = ElPopover; return openBlock(), createElementBlock("div", { ref_key: "iconSelectRef", ref: iconSelectRef, style: normalizeStyle({ width: props.width }) }, [ createVNode(_component_el_popover, { visible: unref(popoverVisible), width: props.width, placement: "bottom-end" }, { reference: withCtx(() => [ createBaseVNode("div", { onClick: _cache[1] || (_cache[1] = ($event) => popoverVisible.value = !unref(popoverVisible)) }, [ renderSlot(_ctx.$slots, "default", {}, () => [ createVNode(_component_el_input, { modelValue: selectedIcon.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedIcon.value = $event), readonly: "", placeholder: "点击选择图标", class: "reference" }, { prepend: withCtx(() => [ unref(isElementIcon) ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(selectedIcon.value.replace("el-icon-", "")))) ]), _: 1 })) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(`i-svg:${selectedIcon.value}`) }, null, 2)) ]), suffix: withCtx(() => [ selectedIcon.value ? (openBlock(), createBlock(_component_el_icon, { key: 0, style: { "margin-right": "8px" }, onClick: withModifiers(clearSelectedIcon, ["stop"]) }, { default: withCtx(() => [ createVNode(_component_CircleClose) ]), _: 1 })) : createCommentVNode("", true), createVNode(_component_el_icon, { style: normalizeStyle({ transform: unref(popoverVisible) ? "rotate(180deg)" : "rotate(0)", transition: "transform .5s" }) }, { default: withCtx(() => [ createVNode(_component_ArrowDown, { onClick: withModifiers(togglePopover, ["stop"]) }) ]), _: 1 }, 8, ["style"]) ]), _: 1 }, 8, ["modelValue"]) ], true) ]) ]), default: withCtx(() => [ createBaseVNode("div", { ref_key: "popoverContentRef", ref: popoverContentRef }, [ createVNode(_component_el_input, { modelValue: unref(filterText), "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(filterText) ? filterText.value = $event : null), placeholder: "搜索图标", clearable: "", onInput: filterIcons }, null, 8, ["modelValue"]), createVNode(_component_el_tabs, { modelValue: unref(activeTab), "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(activeTab) ? activeTab.value = $event : null), onTabClick: handleTabClick }, { default: withCtx(() => [ createVNode(_component_el_tab_pane, { label: "SVG 图标", name: "svg" }, { default: withCtx(() => [ createVNode(_component_el_scrollbar, { height: "300px" }, { default: withCtx(() => [ createBaseVNode("ul", _hoisted_1$1, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredSvgIcons), (icon) => { return openBlock(), createElementBlock("li", { key: "svg-" + icon, class: "icon-grid-item", onClick: ($event) => selectIcon(icon) }, [ createVNode(_component_el_tooltip, { content: icon, placement: "bottom", effect: "light" }, { default: withCtx(() => [ createBaseVNode("div", { class: normalizeClass(`i-svg:${icon}`) }, null, 2) ]), _: 2 }, 1032, ["content"]) ], 8, _hoisted_2$1); }), 128)) ]) ]), _: 1 }) ]), _: 1 }), createVNode(_component_el_tab_pane, { label: "Element 图标", name: "element" }, { default: withCtx(() => [ createVNode(_component_el_scrollbar, { height: "300px" }, { default: withCtx(() => [ createBaseVNode("ul", _hoisted_3$1, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredElementIcons), (icon) => { return openBlock(), createElementBlock("li", { key: icon, class: "icon-grid-item", onClick: ($event) => selectIcon(icon) }, [ createVNode(_component_el_icon, null, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(icon))) ]), _: 2 }, 1024) ], 8, _hoisted_4$1); }), 128)) ]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ], 512) ]), _: 3 }, 8, ["visible", "width"]) ], 4); }; } }); const __unplugin_components_26 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-035033a6"]]); const _hoisted_1 = { class: "app-container" }; const _hoisted_2 = { class: "search-container" }; const _hoisted_3 = { class: "card-header" }; const _hoisted_4 = { class: "data-table__toolbar" }; const _hoisted_5 = { class: "data-table__toolbar--left" }; const _hoisted_6 = { class: "data-table__toolbar--right" }; const _hoisted_7 = { class: "flex-y-center" }; const _hoisted_8 = { class: "flex-y-center" }; const _hoisted_9 = { class: "flex-y-center" }; const _hoisted_10 = { class: "flex-y-center" }; const _hoisted_11 = { key: 0 }; const _hoisted_12 = { key: 1 }; const _hoisted_13 = { class: "flex-y-center" }; const _hoisted_14 = { class: "flex-y-center" }; const _hoisted_15 = { class: "dialog-footer" }; const _sfc_main = /* @__PURE__ */ defineComponent({ ...{ name: "SysMenu", inheritAttrs: false }, __name: "index", setup(__props) { const appStore = useAppStore(); const userStore = useUserStore(); const queryFormRef = ref(); const dataFormRef = ref(); const selectIds = ref([]); const loading = ref(false); const isExpand = ref(false); const isExpandable = ref(true); const pageTableData = ref([]); const detailFormData = ref({}); const queryFormData = reactive({ name: void 0, status: void 0, created_time: void 0 }); const formData = reactive({ id: void 0, name: void 0, type: MenuTypeEnum.CATALOG, icon: void 0, order: 999, permission: "", route_name: "", route_path: "", component_path: void 0, redirect: void 0, parent_id: void 0, keep_alive: false, hidden: false, always_show: false, title: "", params: void 0, affix: false, status: "0", description: void 0 }); const dialogVisible = reactive({ title: "", visible: false, type: "create" }); const drawerSize = computed(() => appStore.device === DeviceEnum.DESKTOP ? "600px" : "90%"); const menuOptions = ref([]); const rules = reactive({ name: [ { required: true, message: "请输入菜单名称", trigger: "blur" }, { min: 2, max: 50, message: "长度 2 到 50 个字符", trigger: "blur" } ], parent_id: [{ required: true, message: "请选择父级菜单", trigger: "blur" }], type: [{ required: true, message: "请选择菜单类型", trigger: "blur" }], order: [{ required: true, message: "请输入排序", trigger: "blur" }], permission: [{ required: true, message: "请输入权限标识", trigger: "blur" }], route_name: [{ required: true, message: "请输入路由名称", trigger: "blur" }], route_path: [ { required: true, message: "请输入路由路径", trigger: "blur" }, { validator: (rule, value, callback) => { if (value && !value.startsWith("/")) { callback(new Error("目录和菜单路由必须以/开头")); } else { callback(); } }, trigger: "blur" } ], component_path: [{ required: true, message: "请输入组件路径", trigger: "blur" }], title: [ { required: true, message: "请输入菜单标题", trigger: "blur" }, { min: 2, max: 50, message: "长度 2 到 50 个字符", trigger: "blur" } ], keep_alive: [{ required: true, message: "请选择是否缓存", trigger: "change" }], hidden: [{ required: true, message: "请选择是否隐藏", trigger: "change" }], always_show: [{ required: true, message: "请选择始终显示", trigger: "change" }], status: [{ required: true, message: "请选择状态", trigger: "change" }] }); const selectedMenuId = ref(); const dateRange = ref([]); function handleDateRangeChange(range) { dateRange.value = range; if (range && range.length === 2) { queryFormData.created_time = [formatToDateTime(range[0]), formatToDateTime(range[1])]; } else { queryFormData.created_time = void 0; } } async function handleRefresh() { loading.value = true; try { const response = await MenuAPI.listMenu(queryFormData); pageTableData.value = response.data.data; } catch (error) { console.error(error); } finally { loading.value = false; } } const filterMenuTypes = (nodes) => { return nodes.filter((node) => node.type === MenuTypeEnum.CATALOG || node.type === MenuTypeEnum.MENU).map((node) => ({ ...node, children: node.children ? filterMenuTypes(node.children) : [] })); }; async function loadingData() { loading.value = true; try { const response = await MenuAPI.listMenu(queryFormData); pageTableData.value = response.data.data; menuOptions.value = formatTree(filterMenuTypes(response.data.data)); } catch (error) { console.error(error); } finally { loading.value = false; } } async function handleQuery() { loadingData(); } async function handleResetQuery() { queryFormRef.value.resetFields(); dateRange.value = []; queryFormData.created_time = void 0; handleQuery(); } const initialFormData = { id: void 0, name: void 0, type: MenuTypeEnum.MENU, icon: void 0, order: 1, permission: "", route_name: "", route_path: "", component_path: "", redirect: "", parent_id: void 0, keep_alive: false, hidden: false, always_show: false, title: "", params: [], affix: false, status: "0", description: void 0 }; async function resetForm() { if (dataFormRef.value) { dataFormRef.value.resetFields(); dataFormRef.value.clearValidate(); } Object.assign(formData, initialFormData); } async function handleSelectionChange(selection) { selectIds.value = selection.map((item) => item.id); } async function handleRowClick(row) { selectedMenuId.value = row.id; } async function handleCloseDialog() { dialogVisible.visible = false; resetForm(); } async function handleOpenDialog(type, id, parentId) { dialogVisible.type = type; if (id) { const response = await MenuAPI.detailMenu(id); if (type === "detail") { dialogVisible.title = "菜单详情"; Object.assign(detailFormData.value, response.data.data); } else if (type === "update") { dialogVisible.title = "修改菜单"; Object.assign(formData, response.data.data); } } else { dialogVisible.title = "新增菜单"; Object.assign(formData, initialFormData); if (parentId) { formData.parent_id = parentId; } } dialogVisible.visible = true; } function handleMenuTypeChange() { if (formData.type !== formData.type) { if (formData.type === MenuTypeEnum.MENU) { formData.component_path = ""; } } } async function handleSubmit() { dataFormRef.value.validate(async (valid) => { if (valid) { loading.value = true; const id = formData.id; try { if (id) { await MenuAPI.updateMenu(id, formData); } else { await MenuAPI.createMenu(formData); } await userStore.getUserInfo(); dialogVisible.visible = false; resetForm(); handleResetQuery(); } catch (error) { console.error(error); } finally { loading.value = false; } } }); } async function handleDelete(ids) { ElMessageBox.confirm("确认删除该项数据?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(async () => { try { loading.value = true; await MenuAPI.deleteMenu(ids); await userStore.getUserInfo(); handleResetQuery(); } catch (error) { console.error(error); } finally { loading.value = false; } }).catch(() => { ElMessageBox.close(); }); } async function handleMoreClick(status) { ElMessageBox.confirm(`确认${status === "0" ? "启用" : "停用"}该项数据?`, "警告", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(async () => { try { loading.value = true; await MenuAPI.batchMenu({ ids: selectIds.value, status }); handleResetQuery(); } catch (error) { console.error(error); } finally { loading.value = false; } }).catch(() => { ElMessageBox.close(); }); } onMounted(() => { handleQuery(); }); return (_ctx, _cache) => { const _component_el_input = ElInput; const _component_el_form_item = ElFormItem; const _component_el_option = ElOption; const _component_el_select = ElSelect; const _component_DatePicker = DatePicker; const _component_el_button = ElButton; const _component_ArrowUp = resolveComponent("ArrowUp"); const _component_ArrowDown = resolveComponent("ArrowDown"); const _component_el_icon = ElIcon; const _component_el_link = ElLink; const _component_el_form = ElForm; const _component_QuestionFilled = resolveComponent("QuestionFilled"); const _component_el_tooltip = ElTooltip; const _component_el_col = ElCol; const _component_el_dropdown_item = ElDropdownItem; const _component_el_dropdown_menu = ElDropdownMenu; const _component_el_dropdown = ElDropdown; const _component_el_row = ElRow; const _component_el_empty = ElEmpty; const _component_el_table_column = ElTableColumn; const _component_el_tag = ElTag; const _component_el_table = ElTable; const _component_el_card = ElCard; const _component_el_descriptions_item = ElDescriptionsItem; const _component_el_descriptions = ElDescriptions; const _component_el_tree_select = ElTreeSelect; const _component_el_radio = ElRadio; const _component_el_radio_group = ElRadioGroup; const _component_CirclePlusFilled = resolveComponent("CirclePlusFilled"); const _component_DeleteFilled = resolveComponent("DeleteFilled"); const _component_el_input_number = ElInputNumber; const _component_icon_select = __unplugin_components_26; const _component_el_drawer = ElDrawer; const _directive_hasPerm = resolveDirective("hasPerm"); const _directive_loading = vLoading; return openBlock(), createElementBlock("div", _hoisted_1, [ createBaseVNode("div", _hoisted_2, [ createVNode(_component_el_form, { ref_key: "queryFormRef", ref: queryFormRef, model: unref(queryFormData), inline: true, "label-suffix": ":", onSubmit: withModifiers(handleQuery, ["prevent"]) }, { default: withCtx(() => [ createVNode(_component_el_form_item, { prop: "name", label: "菜单名称" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(queryFormData).name, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(queryFormData).name = $event), placeholder: "请输入菜单名称", clearable: "" }, null, 8, ["modelValue"]) ]), _: 1 }), createVNode(_component_el_form_item, { prop: "status", label: "状态" }, { default: withCtx(() => [ createVNode(_component_el_select, { modelValue: unref(queryFormData).status, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(queryFormData).status = $event), placeholder: "请选择状态", style: { "width": "167.5px" }, clearable: "" }, { default: withCtx(() => [ createVNode(_component_el_option, { value: "0", label: "启用" }), createVNode(_component_el_option, { value: "1", label: "停用" }) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }), unref(isExpand) ? (openBlock(), createBlock(_component_el_form_item, { key: 0, prop: "start_time", label: "创建时间" }, { default: withCtx(() => [ createVNode(_component_DatePicker, { modelValue: unref(dateRange), "onUpdate:modelValue": [ _cache[2] || (_cache[2] = ($event) => isRef(dateRange) ? dateRange.value = $event : null), handleDateRangeChange ] }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), createVNode(_component_el_form_item, { class: "search-buttons" }, { default: withCtx(() => [ withDirectives((openBlock(), createBlock(_component_el_button, { type: "primary", icon: "search", "native-type": "submit" }, { default: withCtx(() => [..._cache[29] || (_cache[29] = [ createTextVNode(" 查询 ", -1) ])]), _: 1 })), [ [_directive_hasPerm, ["module_system:menu:query"]] ]), withDirectives((openBlock(), createBlock(_component_el_button, { icon: "refresh", onClick: handleResetQuery }, { default: withCtx(() => [..._cache[30] || (_cache[30] = [ createTextVNode(" 重置 ", -1) ])]), _: 1 })), [ [_directive_hasPerm, ["module_system:menu:query"]] ]), unref(isExpandable) ? (openBlock(), createBlock(_component_el_link, { key: 0, class: "ml-3", type: "primary", underline: "never", onClick: _cache[3] || (_cache[3] = ($event) => isExpand.value = !unref(isExpand)) }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(isExpand) ? "收起" : "展开") + " ", 1), createVNode(_component_el_icon, null, { default: withCtx(() => [ unref(isExpand) ? (openBlock(), createBlock(_component_ArrowUp, { key: 0 })) : (openBlock(), createBlock(_component_ArrowDown, { key: 1 })) ]), _: 1 }) ]), _: 1 })) : createCommentVNode("", true) ]), _: 1 }) ]), _: 1 }, 8, ["model"]) ]), createVNode(_component_el_card, { class: "data-table" }, { header: withCtx(() => [ createBaseVNode("div", _hoisted_3, [ createBaseVNode("span", null, [ createVNode(_component_el_tooltip, { content: "菜单管理系统的菜单和权限。" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled, { class: "w-4 h-4 mx-1" }) ]), _: 1 }), _cache[31] || (_cache[31] = createTextVNode(" 菜单列表 ", -1)) ]) ]) ]), default: withCtx(() => [ createBaseVNode("div", _hoisted_4, [ createBaseVNode("div", _hoisted_5, [ createVNode(_component_el_row, { gutter: 10 }, { default: withCtx(() => [ createVNode(_component_el_col, { span: 1.5 }, { default: withCtx(() => [ withDirectives((openBlock(), createBlock(_component_el_button, { type: "success", icon: "plus", onClick: _cache[4] || (_cache[4] = ($event) => handleOpenDialog("create")) }, { default: withCtx(() => [..._cache[32] || (_cache[32] = [ createTextVNode(" 新增 ", -1) ])]), _: 1 })), [ [_directive_hasPerm, ["module_system:menu:create"]] ]) ]), _: 1 }), createVNode(_component_el_col, { span: 1.5 }, { default: withCtx(() => [ withDirectives((openBlock(), createBlock(_component_el_button, { type: "danger", icon: "delete", disabled: unref(selectIds).length === 0, onClick: _cache[5] || (_cache[5] = ($event) => handleDelete(unref(selectIds))) }, { default: withCtx(() => [..._cache[33] || (_cache[33] = [ createTextVNode(" 批量删除 ", -1) ])]), _: 1 }, 8, ["disabled"])), [ [_directive_hasPerm, ["module_system:menu:delete"]] ]) ]), _: 1 }), createVNode(_component_el_col, { span: 1.5 }, { default: withCtx(() => [ withDirectives((openBlock(), createBlock(_component_el_dropdown, { trigger: "click" }, { dropdown: withCtx(() => [ createVNode(_component_el_dropdown_menu, null, { default: withCtx(() => [ createVNode(_component_el_dropdown_item, { icon: "Check", onClick: _cache[6] || (_cache[6] = ($event) => handleMoreClick("0")) }, { default: withCtx(() => [..._cache[35] || (_cache[35] = [ createTextVNode(" 批量启用 ", -1) ])]), _: 1 }), createVNode(_component_el_dropdown_item, { icon: "CircleClose", onClick: _cache[7] || (_cache[7] = ($event) => handleMoreClick("1")) }, { default: withCtx(() => [..._cache[36] || (_cache[36] = [ createTextVNode(" 批量停用 ", -1) ])]), _: 1 }) ]), _: 1 }) ]), default: withCtx(() => [ createVNode(_component_el_button, { type: "default", disabled: unref(selectIds).length === 0, icon: "ArrowDown" }, { default: withCtx(() => [..._cache[34] || (_cache[34] = [ createTextVNode(" 更多 ", -1) ])]), _: 1 }, 8, ["disabled"]) ]), _: 1 })), [ [_directive_hasPerm, ["module_system:menu:patch"]] ]) ]), _: 1 }) ]), _: 1 }) ]), createBaseVNode("div", _hoisted_6, [ createVNode(_component_el_row, { gutter: 10 }, { default: withCtx(() => [ createVNode(_component_el_col, { span: 1.5 }, { default: withCtx(() => [ createVNode(_component_el_tooltip, { content: "刷新" }, { default: withCtx(() => [ withDirectives(createVNode(_component_el_button, { type: "primary", icon: "refresh", circle: "", onClick: handleRefresh }, null, 512), [ [_directive_hasPerm, ["module_system:menu:query"]] ]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]) ]), withDirectives((openBlock(), createBlock(_component_el_table, { ref: "dataTableRef", "row-key": "id", data: unref(pageTableData), "tree-props": { children: "children", hasChildren: "hasChildren" }, class: "data-table__content", height: "600", "max-height": "600", border: "", stripe: "", onSelectionChange: handleSelectionChange, onRowClick: handleRowClick }, { empty: withCtx(() => [ createVNode(_component_el_empty, { "image-size": 80, description: "暂无数据" }) ]), default: withCtx(() => [ createVNode(_component_el_table_column, { type: "selection", "min-width": "55", align: "center" }), createVNode(_component_el_table_column, { type: "index", fixed: "", label: "序号", "min-width": "60" }), createVNode(_component_el_table_column, { label: "菜单名称", prop: "name", "min-width": "240" }), createVNode(_component_el_table_column, { label: "图标", prop: "icon", "min-width": "80", align: "center" }, { default: withCtx((scope) => [ scope.row.icon && scope.row.icon.startsWith("el-icon") ? (openBlock(), createBlock(_component_el_icon, { key: 0, style: { "vertical-align": "-0.15em" } }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(scope.row.icon.replace("el-icon-", "")))) ]), _: 2 }, 1024)) : scope.row.icon ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(`i-svg:${scope.row.icon}`) }, null, 2)) : createCommentVNode("", true) ]), _: 1 }), createVNode(_component_el_table_column, { label: "状态", prop: "status", "min-width": "80", align: "center" }, { default: withCtx((scope) => [ createVNode(_component_el_tag, { type: scope.row.status === "0" ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(scope.row.status ? "启用" : "停用"), 1) ]), _: 2 }, 1032, ["type"]) ]), _: 1 }), createVNode(_component_el_table_column, { label: "类型", prop: "type", "min-width": "80", align: "center" }, { default: withCtx((scope) => [ scope.row.type === unref(MenuTypeEnum).CATALOG ? (openBlock(), createBlock(_component_el_tag, { key: 0, type: "warning" }, { default: withCtx(() => [..._cache[37] || (_cache[37] = [ createTextVNode("目录", -1) ])]), _: 1 })) : createCommentVNode("", true), scope.row.type === unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_tag, { key: 1, type: "success" }, { default: withCtx(() => [..._cache[38] || (_cache[38] = [ createTextVNode("菜单", -1) ])]), _: 1 })) : createCommentVNode("", true), scope.row.type === unref(MenuTypeEnum).BUTTON ? (openBlock(), createBlock(_component_el_tag, { key: 2, type: "danger" }, { default: withCtx(() => [..._cache[39] || (_cache[39] = [ createTextVNode("按钮", -1) ])]), _: 1 })) : createCommentVNode("", true), scope.row.type === unref(MenuTypeEnum).EXTLINK ? (openBlock(), createBlock(_component_el_tag, { key: 3, type: "info" }, { default: withCtx(() => [..._cache[40] || (_cache[40] = [ createTextVNode("外链", -1) ])]), _: 1 })) : createCommentVNode("", true) ]), _: 1 }), createVNode(_component_el_table_column, { label: "排序", prop: "order", "min-width": "80" }), createVNode(_component_el_table_column, { label: "重定向", prop: "redirect", "min-width": "200" }), createVNode(_component_el_table_column, { label: "是否缓存", prop: "keep_alive", "min-width": "100" }, { default: withCtx((scope) => [ createVNode(_component_el_tag, { type: scope.row.keep_alive ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(scope.row.keep_alive ? "是" : "否"), 1) ]), _: 2 }, 1032, ["type"]) ]), _: 1 }), createVNode(_component_el_table_column, { label: "是否隐藏", prop: "hidden", "min-width": "100" }, { default: withCtx((scope) => [ createVNode(_component_el_tag, { type: scope.row.hidden ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(scope.row.hidden ? "是" : "否"), 1) ]), _: 2 }, 1032, ["type"]) ]), _: 1 }), createVNode(_component_el_table_column, { label: "显示根路由", prop: "always_show", "min-width": "120" }, { default: withCtx((scope) => [ createVNode(_component_el_tag, { type: scope.row.always_show ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(scope.row.always_show ? "是" : "否"), 1) ]), _: 2 }, 1032, ["type"]) ]), _: 1 }), createVNode(_component_el_table_column, { label: "固定路由", prop: "affix", "min-width": "100" }, { default: withCtx((scope) => [ createVNode(_component_el_tag, { type: scope.row.affix ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(scope.row.affix ? "是" : "否"), 1) ]), _: 2 }, 1032, ["type"]) ]), _: 1 }), createVNode(_component_el_table_column, { label: "菜单标题", prop: "title", "min-width": "200" }), createVNode(_component_el_table_column, { label: "权限标识", prop: "permission", "show-overflow-tooltip": "", "min-width": "220" }), createVNode(_component_el_table_column, { label: "路由名称", prop: "route_name", "min-width": "200" }), createVNode(_component_el_table_column, { label: "路由路径", prop: "route_path", "min-width": "200" }), createVNode(_component_el_table_column, { label: "组件路径", prop: "component_path", "show-overflow-tooltip": "", "min-width": "200" }), createVNode(_component_el_table_column, { label: "路由参数", prop: "params", "min-width": "100" }), createVNode(_component_el_table_column, { label: "描述", prop: "description", "show-overflow-tooltip": "", "min-width": "200" }), createVNode(_component_el_table_column, { label: "创建时间", prop: "created_time", "min-width": "200", sortable: "" }), createVNode(_component_el_table_column, { label: "更新时间", prop: "updated_time", "min-width": "200", sortable: "" }), createVNode(_component_el_table_column, { fixed: "right", label: "操作", align: "center", "min-width": "260" }, { default: withCtx((scope) => [ scope.row.type == unref(MenuTypeEnum).CATALOG || scope.row.type == unref(MenuTypeEnum).MENU ? withDirectives((openBlock(), createBlock(_component_el_button, { key: 0, type: "success", link: "", size: "small", icon: "plus", onClick: withModifiers(($event) => handleOpenDialog("create", void 0, scope.row.id), ["stop"]) }, { default: withCtx(() => [..._cache[41] || (_cache[41] = [ createTextVNode(" 新增 ", -1) ])]), _: 1 }, 8, ["onClick"])), [ [_directive_hasPerm, ["module_system:menu:create"]] ]) : createCommentVNode("", true), withDirectives((openBlock(), createBlock(_component_el_button, { type: "info", size: "small", link: "", icon: "document", onClick: ($event) => handleOpenDialog("detail", scope.row.id) }, { default: withCtx(() => [..._cache[42] || (_cache[42] = [ createTextVNode(" 详情 ", -1) ])]), _: 1 }, 8, ["onClick"])), [ [_directive_hasPerm, ["module_system:menu:detail"]] ]), withDirectives((openBlock(), createBlock(_component_el_button, { type: "primary", size: "small", link: "", icon: "edit", onClick: ($event) => handleOpenDialog("update", scope.row.id) }, { default: withCtx(() => [..._cache[43] || (_cache[43] = [ createTextVNode(" 编辑 ", -1) ])]), _: 1 }, 8, ["onClick"])), [ [_directive_hasPerm, ["module_system:menu:update"]] ]), withDirectives((openBlock(), createBlock(_component_el_button, { type: "danger", size: "small", link: "", icon: "delete", onClick: ($event) => handleDelete([scope.row.id]) }, { default: withCtx(() => [..._cache[44] || (_cache[44] = [ createTextVNode(" 删除 ", -1) ])]), _: 1 }, 8, ["onClick"])), [ [_directive_hasPerm, ["module_system:menu:delete"]] ]) ]), _: 1 }) ]), _: 1 }, 8, ["data"])), [ [_directive_loading, unref(loading)] ]) ]), _: 1 }), createVNode(_component_el_drawer, { modelValue: unref(dialogVisible).visible, "onUpdate:modelValue": _cache[28] || (_cache[28] = ($event) => unref(dialogVisible).visible = $event), title: unref(dialogVisible).title, size: unref(drawerSize), onClose: handleCloseDialog }, { footer: withCtx(() => [ createBaseVNode("div", _hoisted_15, [ unref(dialogVisible).type !== "detail" ? (openBlock(), createBlock(_component_el_button, { key: 0, type: "primary", onClick: handleSubmit }, { default: withCtx(() => [..._cache[79] || (_cache[79] = [ createTextVNode(" 确定 ", -1) ])]), _: 1 })) : (openBlock(), createBlock(_component_el_button, { key: 1, type: "primary", onClick: handleCloseDialog }, { default: withCtx(() => [..._cache[80] || (_cache[80] = [ createTextVNode("确定", -1) ])]), _: 1 })), createVNode(_component_el_button, { onClick: handleCloseDialog }, { default: withCtx(() => [..._cache[81] || (_cache[81] = [ createTextVNode("取消", -1) ])]), _: 1 }) ]) ]), default: withCtx(() => [ unref(dialogVisible).type === "detail" ? (openBlock(), createBlock(_component_el_descriptions, { key: 0, column: 4, border: "" }, { default: withCtx(() => [ createVNode(_component_el_descriptions_item, { label: "编号", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).id), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "菜单名称", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).name), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "菜单类型", span: 2 }, { default: withCtx(() => [ unref(detailFormData).type === unref(MenuTypeEnum).CATALOG ? (openBlock(), createBlock(_component_el_tag, { key: 0, type: "warning" }, { default: withCtx(() => [..._cache[45] || (_cache[45] = [ createTextVNode("目录", -1) ])]), _: 1 })) : createCommentVNode("", true), unref(detailFormData).type === unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_tag, { key: 1, type: "success" }, { default: withCtx(() => [..._cache[46] || (_cache[46] = [ createTextVNode("菜单", -1) ])]), _: 1 })) : createCommentVNode("", true), unref(detailFormData).type === unref(MenuTypeEnum).BUTTON ? (openBlock(), createBlock(_component_el_tag, { key: 2, type: "danger" }, { default: withCtx(() => [..._cache[47] || (_cache[47] = [ createTextVNode("按钮", -1) ])]), _: 1 })) : createCommentVNode("", true), unref(detailFormData).type === unref(MenuTypeEnum).EXTLINK ? (openBlock(), createBlock(_component_el_tag, { key: 3, type: "info" }, { default: withCtx(() => [..._cache[48] || (_cache[48] = [ createTextVNode("外链", -1) ])]), _: 1 })) : createCommentVNode("", true) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "图标", span: 2 }, { default: withCtx(() => [ unref(detailFormData).icon && unref(detailFormData).icon.startsWith("el-icon") ? (openBlock(), createBlock(_component_el_icon, { key: 0, style: { "vertical-align": "-0.15em" } }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(detailFormData).icon.replace("el-icon-", "")))) ]), _: 1 })) : unref(detailFormData).icon ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(`i-svg:${unref(detailFormData).icon}`) }, null, 2)) : createCommentVNode("", true) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "排序", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).order), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "权限标识", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).permission), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "路由名称", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).route_name), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "路由路径", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).route_path), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "组件路径", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).component_path), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "重定向", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).redirect), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "父级编号", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).parent_id), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "父级菜单", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).parent_name), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "是否缓存", span: 2 }, { default: withCtx(() => [ createVNode(_component_el_tag, { type: unref(detailFormData).keep_alive ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).keep_alive ? "是" : "否"), 1) ]), _: 1 }, 8, ["type"]) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "是否显示", span: 2 }, { default: withCtx(() => [ createVNode(_component_el_tag, { type: unref(detailFormData).hidden ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).hidden ? "是" : "否"), 1) ]), _: 1 }, 8, ["type"]) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "是否显示根路由", span: 2 }, { default: withCtx(() => [ createVNode(_component_el_tag, { type: unref(detailFormData).always_show ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).always_show ? "是" : "否"), 1) ]), _: 1 }, 8, ["type"]) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "菜单标题", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).title), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "路由参数", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).params), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "是否固定路由", span: 2 }, { default: withCtx(() => [ createVNode(_component_el_tag, { type: unref(detailFormData).affix ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).affix ? "是" : "否"), 1) ]), _: 1 }, 8, ["type"]) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "状态", span: 2 }, { default: withCtx(() => [ createVNode(_component_el_tag, { type: unref(detailFormData).status ? "success" : "danger" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).status ? "启用" : "停用"), 1) ]), _: 1 }, 8, ["type"]) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "排序", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).order), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "创建时间", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).created_time), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "更新时间", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).updated_time), 1) ]), _: 1 }), createVNode(_component_el_descriptions_item, { label: "描述", span: 4 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(detailFormData).description), 1) ]), _: 1 }) ]), _: 1 })) : (openBlock(), createBlock(_component_el_form, { key: 1, ref_key: "dataFormRef", ref: dataFormRef, model: unref(formData), rules: unref(rules), "label-suffix": ":", "label-width": "auto", "label-position": "right" }, { default: withCtx(() => [ unref(formData).type !== unref(MenuTypeEnum).CATALOG ? (openBlock(), createBlock(_component_el_form_item, { key: 0, label: "父级菜单", prop: "parent_id" }, { default: withCtx(() => [ createVNode(_component_el_tree_select, { modelValue: unref(formData).parent_id, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(formData).parent_id = $event), placeholder: "选择上级菜单", data: unref(menuOptions), filterable: "", "check-strictly": "", "render-after-expand": false }, null, 8, ["modelValue", "data"]) ]), _: 1 })) : createCommentVNode("", true), createVNode(_component_el_form_item, { label: "菜单名称", prop: "name" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).name, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(formData).name = $event), placeholder: "请输入菜单名称" }, null, 8, ["modelValue"]) ]), _: 1 }), createVNode(_component_el_form_item, { label: "菜单标题", prop: "title" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).title, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(formData).title = $event), placeholder: "请输入菜单标题" }, null, 8, ["modelValue"]) ]), _: 1 }), createVNode(_component_el_form_item, { label: "菜单类型", prop: "type" }, { default: withCtx(() => [ createVNode(_component_el_radio_group, { modelValue: unref(formData).type, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(formData).type = $event), onChange: handleMenuTypeChange }, { default: withCtx(() => [ createVNode(_component_el_radio, { value: unref(MenuTypeEnum).CATALOG }, { default: withCtx(() => [..._cache[49] || (_cache[49] = [ createTextVNode("目录", -1) ])]), _: 1 }, 8, ["value"]), createVNode(_component_el_radio, { value: unref(MenuTypeEnum).MENU }, { default: withCtx(() => [..._cache[50] || (_cache[50] = [ createTextVNode("菜单", -1) ])]), _: 1 }, 8, ["value"]), createVNode(_component_el_radio, { value: unref(MenuTypeEnum).BUTTON }, { default: withCtx(() => [..._cache[51] || (_cache[51] = [ createTextVNode("按钮", -1) ])]), _: 1 }, 8, ["value"]), createVNode(_component_el_radio, { value: unref(MenuTypeEnum).EXTLINK }, { default: withCtx(() => [..._cache[52] || (_cache[52] = [ createTextVNode("外链", -1) ])]), _: 1 }, 8, ["value"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }), unref(formData).type == unref(MenuTypeEnum).EXTLINK ? (openBlock(), createBlock(_component_el_form_item, { key: 1, label: "外链地址", prop: "path" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).route_path, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(formData).route_path = $event), placeholder: "请输入外链完整路径" }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type !== unref(MenuTypeEnum).BUTTON ? (openBlock(), createBlock(_component_el_form_item, { key: 2, prop: "route_name" }, { label: withCtx(() => [ createBaseVNode("div", _hoisted_7, [ _cache[54] || (_cache[54] = createTextVNode(" 路由名称 ", -1)), createVNode(_component_el_tooltip, { placement: "bottom", effect: "light" }, { content: withCtx(() => [..._cache[53] || (_cache[53] = [ createTextVNode(" 如果需要开启缓存,需保证页面 defineOptions 中的 name 与此处一致,建议使用驼峰。 ", -1) ])]), default: withCtx(() => [ createVNode(_component_el_icon, { class: "ml-1 cursor-pointer" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled) ]), _: 1 }) ]), _: 1 }) ]) ]), default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).route_name, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(formData).route_name = $event), placeholder: "请输入路由名称" }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type == unref(MenuTypeEnum).CATALOG || unref(formData).type == unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 3, prop: "route_path" }, { label: withCtx(() => [ createBaseVNode("div", _hoisted_8, [ _cache[56] || (_cache[56] = createTextVNode(" 路由路径 ", -1)), createVNode(_component_el_tooltip, { placement: "bottom", effect: "light" }, { content: withCtx(() => [..._cache[55] || (_cache[55] = [ createTextVNode(" 定义应用中不同页面对应的 URL 路径,目录需以 / 开头,菜单项不用。例如:系统管理目录 /system,系统管理下的用户管理菜单 user。 ", -1) ])]), default: withCtx(() => [ createVNode(_component_el_icon, { class: "ml-1 cursor-pointer" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled) ]), _: 1 }) ]), _: 1 }) ]) ]), default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).route_path, "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(formData).route_path = $event), placeholder: "请输入路由路径,如:/system" }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type == unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 4, prop: "component" }, { label: withCtx(() => [ createBaseVNode("div", _hoisted_9, [ _cache[58] || (_cache[58] = createTextVNode(" 组件路径 ", -1)), createVNode(_component_el_tooltip, { placement: "bottom", effect: "light" }, { content: withCtx(() => [..._cache[57] || (_cache[57] = [ createTextVNode(" 组件页面完整路径,相对于 src/views/,如 system/user/index,缺省后缀 .vue ", -1) ])]), default: withCtx(() => [ createVNode(_component_el_icon, { class: "ml-1 cursor-pointer" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled) ]), _: 1 }) ]), _: 1 }) ]) ]), default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).component_path, "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(formData).component_path = $event), placeholder: "请输入组件路径,如system/user/index", style: { "width": "95%" } }, createSlots({ _: 2 }, [ unref(formData).type == unref(MenuTypeEnum).MENU ? { name: "prepend", fn: withCtx(() => [ _cache[59] || (_cache[59] = createTextVNode("src/views/", -1)) ]), key: "0" } : void 0, unref(formData).type == unref(MenuTypeEnum).MENU ? { name: "append", fn: withCtx(() => [ _cache[60] || (_cache[60] = createTextVNode(".vue", -1)) ]), key: "1" } : void 0 ]), 1032, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type == unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 5 }, { label: withCtx(() => [ createBaseVNode("div", _hoisted_10, [ _cache[62] || (_cache[62] = createTextVNode(" 路由参数 ", -1)), createVNode(_component_el_tooltip, { placement: "bottom", effect: "light" }, { content: withCtx(() => [..._cache[61] || (_cache[61] = [ createTextVNode(" 组件页面使用 `useRoute().query.参数名` 获取路由参数值。 ", -1) ])]), default: withCtx(() => [ createVNode(_component_el_icon, { class: "ml-1 cursor-pointer" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled) ]), _: 1 }) ]), _: 1 }) ]) ]), default: withCtx(() => [ !unref(formData).params || Array.isArray(unref(formData).params) && unref(formData).params.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_11, [ createVNode(_component_el_button, { type: "success", plain: "", onClick: _cache[16] || (_cache[16] = ($event) => unref(formData).params = [{ key: "", value: "" }]) }, { default: withCtx(() => [..._cache[63] || (_cache[63] = [ createTextVNode(" 添加路由参数 ", -1) ])]), _: 1 }) ])) : (openBlock(), createElementBlock("div", _hoisted_12, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(formData).params, (item, index) => { return openBlock(), createElementBlock("div", { key: index }, [ createVNode(_component_el_input, { modelValue: item.key, "onUpdate:modelValue": ($event) => item.key = $event, placeholder: "参数名", style: { "width": "100px" } }, null, 8, ["modelValue", "onUpdate:modelValue"]), _cache[64] || (_cache[64] = createBaseVNode("span", { class: "mx-1" }, "=", -1)), createVNode(_component_el_input, { modelValue: item.value, "onUpdate:modelValue": ($event) => item.value = $event, placeholder: "参数值", style: { "width": "100px" } }, null, 8, ["modelValue", "onUpdate:modelValue"]), unref(formData).params.indexOf(item) === unref(formData).params.length - 1 ? (openBlock(), createBlock(_component_el_icon, { key: 0, class: "ml-2 cursor-pointer color-[var(--el-color-success)]", style: { "vertical-align": "-0.15em" }, onClick: _cache[17] || (_cache[17] = ($event) => unref(formData).params.push({ key: "", value: "" })) }, { default: withCtx(() => [ createVNode(_component_CirclePlusFilled) ]), _: 1 })) : createCommentVNode("", true), createVNode(_component_el_icon, { class: "ml-2 cursor-pointer color-[var(--el-color-danger)]", style: { "vertical-align": "-0.15em" }, onClick: ($event) => unref(formData).params.splice(unref(formData).params.indexOf(item), 1) }, { default: withCtx(() => [ createVNode(_component_DeleteFilled) ]), _: 1 }, 8, ["onClick"]) ]); }), 128)) ])) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type !== unref(MenuTypeEnum).BUTTON ? (openBlock(), createBlock(_component_el_form_item, { key: 6 }, { label: withCtx(() => [ createBaseVNode("div", _hoisted_13, [ _cache[66] || (_cache[66] = createTextVNode(" 是否隐藏 ", -1)), createVNode(_component_el_tooltip, { placement: "bottom", effect: "light" }, { content: withCtx(() => [..._cache[65] || (_cache[65] = [ createTextVNode(' 选择"是", 菜单中隐藏 ', -1), createBaseVNode("br", null, null, -1), createTextVNode(' 选择"否",菜单中显示。 ', -1), createBaseVNode("br", null, null, -1) ])]), default: withCtx(() => [ createVNode(_component_el_icon, { class: "ml-1 cursor-pointer" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled) ]), _: 1 }) ]), _: 1 }) ]) ]), default: withCtx(() => [ createVNode(_component_el_radio_group, { modelValue: unref(formData).hidden, "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => unref(formData).hidden = $event) }, { default: withCtx(() => [ createVNode(_component_el_radio, { value: true }, { default: withCtx(() => [..._cache[67] || (_cache[67] = [ createTextVNode("是", -1) ])]), _: 1 }), createVNode(_component_el_radio, { value: false }, { default: withCtx(() => [..._cache[68] || (_cache[68] = [ createTextVNode("否", -1) ])]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type === unref(MenuTypeEnum).CATALOG || unref(formData).type === unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 7 }, { label: withCtx(() => [ createBaseVNode("div", _hoisted_14, [ _cache[70] || (_cache[70] = createTextVNode(" 始终显示 ", -1)), createVNode(_component_el_tooltip, { placement: "bottom", effect: "light" }, { content: withCtx(() => [..._cache[69] || (_cache[69] = [ createTextVNode(' 选择"是",即使目录或菜单下只有一个子节点,也会显示父节点。 ', -1), createBaseVNode("br", null, null, -1), createTextVNode(' 选择"否",如果目录或菜单下只有一个子节点,则只显示该子节点,隐藏父节点。 ', -1), createBaseVNode("br", null, null, -1), createTextVNode(' 如果是叶子节点,请选择"否"。 ', -1) ])]), default: withCtx(() => [ createVNode(_component_el_icon, { class: "ml-1 cursor-pointer" }, { default: withCtx(() => [ createVNode(_component_QuestionFilled) ]), _: 1 }) ]), _: 1 }) ]) ]), default: withCtx(() => [ createVNode(_component_el_radio_group, { modelValue: unref(formData).always_show, "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => unref(formData).always_show = $event) }, { default: withCtx(() => [ createVNode(_component_el_radio, { value: true }, { default: withCtx(() => [..._cache[71] || (_cache[71] = [ createTextVNode("是", -1) ])]), _: 1 }), createVNode(_component_el_radio, { value: false }, { default: withCtx(() => [..._cache[72] || (_cache[72] = [ createTextVNode("否", -1) ])]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type === unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 8, label: "缓存页面" }, { default: withCtx(() => [ createVNode(_component_el_radio_group, { modelValue: unref(formData).keep_alive, "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => unref(formData).keep_alive = $event) }, { default: withCtx(() => [ createVNode(_component_el_radio, { value: true }, { default: withCtx(() => [..._cache[73] || (_cache[73] = [ createTextVNode("开启", -1) ])]), _: 1 }), createVNode(_component_el_radio, { value: false }, { default: withCtx(() => [..._cache[74] || (_cache[74] = [ createTextVNode("关闭", -1) ])]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), createVNode(_component_el_form_item, { label: "排序", prop: "order" }, { default: withCtx(() => [ createVNode(_component_el_input_number, { modelValue: unref(formData).order, "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => unref(formData).order = $event), "controls-position": "right", min: 1 }, null, 8, ["modelValue"]) ]), _: 1 }), unref(formData).type == unref(MenuTypeEnum).BUTTON || unref(formData).type === unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 9, label: "权限标识", prop: "perm" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).permission, "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => unref(formData).permission = $event), placeholder: "请输入权限标识,如sys:user:add" }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type !== unref(MenuTypeEnum).BUTTON ? (openBlock(), createBlock(_component_el_form_item, { key: 10, label: "图标", prop: "icon" }, { default: withCtx(() => [ createVNode(_component_icon_select, { modelValue: unref(formData).icon, "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => unref(formData).icon = $event) }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type == unref(MenuTypeEnum).CATALOG || unref(formData).type === unref(MenuTypeEnum).MENU ? (openBlock(), createBlock(_component_el_form_item, { key: 11, label: "重定向", prop: "redirect" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).redirect, "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => unref(formData).redirect = $event), placeholder: "请输入重定向路由" }, null, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), unref(formData).type != unref(MenuTypeEnum).BUTTON ? (openBlock(), createBlock(_component_el_form_item, { key: 12, label: "常驻标签栏", prop: "affix" }, { default: withCtx(() => [ createVNode(_component_el_radio_group, { modelValue: unref(formData).affix, "onUpdate:modelValue": _cache[25] || (_cache[25] = ($event) => unref(formData).affix = $event) }, { default: withCtx(() => [ createVNode(_component_el_radio, { value: true }, { default: withCtx(() => [..._cache[75] || (_cache[75] = [ createTextVNode("是", -1) ])]), _: 1 }), createVNode(_component_el_radio, { value: false }, { default: withCtx(() => [..._cache[76] || (_cache[76] = [ createTextVNode("否", -1) ])]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 })) : createCommentVNode("", true), createVNode(_component_el_form_item, { label: "状态", prop: "status" }, { default: withCtx(() => [ createVNode(_component_el_radio_group, { modelValue: unref(formData).status, "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => unref(formData).status = $event) }, { default: withCtx(() => [ createVNode(_component_el_radio, { value: "0" }, { default: withCtx(() => [..._cache[77] || (_cache[77] = [ createTextVNode("启用", -1) ])]), _: 1 }), createVNode(_component_el_radio, { value: "1" }, { default: withCtx(() => [..._cache[78] || (_cache[78] = [ createTextVNode("禁用", -1) ])]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }), createVNode(_component_el_form_item, { label: "描述", prop: "description" }, { default: withCtx(() => [ createVNode(_component_el_input, { modelValue: unref(formData).description, "onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => unref(formData).description = $event), rows: 4, maxlength: 100, "show-word-limit": "", type: "textarea", placeholder: "请输入描述" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }, 8, ["model", "rules"])) ]), _: 1 }, 8, ["modelValue", "title", "size"]) ]); }; } }); export { _sfc_main as default };