You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
11 KiB

1 month ago
  1. {"ast":null,"code":"import { createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createTextVNode as _createTextVNode } from \"vue\";\nconst _hoisted_1 = {\n class: \"header-right\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_icon = _resolveComponent(\"el-icon\");\n const _component_el_menu_item = _resolveComponent(\"el-menu-item\");\n const _component_el_menu = _resolveComponent(\"el-menu\");\n const _component_el_aside = _resolveComponent(\"el-aside\");\n const _component_el_button = _resolveComponent(\"el-button\");\n const _component_el_header = _resolveComponent(\"el-header\");\n const _component_router_view = _resolveComponent(\"router-view\");\n const _component_el_main = _resolveComponent(\"el-main\");\n const _component_el_container = _resolveComponent(\"el-container\");\n return _openBlock(), _createBlock(_component_el_container, {\n class: \"layout-container\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_aside, {\n width: \"200px\"\n }, {\n default: _withCtx(() => [_cache[2] || (_cache[2] = _createElementVNode(\"div\", {\n class: \"logo\"\n }, \"物流管理系统\", -1 /* HOISTED */)), _createVNode(_component_el_menu, {\n router: true,\n \"default-active\": $setup.route.path\n }, {\n default: _withCtx(() => [_createCommentVNode(\" 管理员和物流管理员看到\\\"全部订单\\\",其他用户看到\\\"我的订单\\\" \"), _createVNode(_component_el_menu_item, {\n index: ['ROLE_ADMIN', 'ROLE_LOGISTICS_ADMIN'].includes($setup.userInfo.role) ? '/admin/orders' : '/orders/my'\n }, {\n default: _withCtx(() => [_createVNode(_component_el_icon, null, {\n default: _withCtx(() => [_createVNode($setup[\"Document\"])]),\n _: 1 /* STABLE */\n }), _createElementVNode(\"span\", null, _toDisplayString(['ROLE_ADMIN', 'ROLE_LOGISTICS_ADMIN'].includes($setup.userInfo.role) ? '全部订单' : '我的订单'), 1 /* TEXT */)]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"index\"]), _createCommentVNode(\" 仓库管理员可见 \"), $setup.userInfo.role === 'ROLE_WAREHOUSE_ADMIN' ? (_openBlock(), _createBlock(_component_el_menu_item, {\n key: 0,\n index: \"/orders/create\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_icon, null, {\n default: _withCtx(() => [_createVNode($setup[\"Plus\"])]),\n _: 1 /* STABLE */\n }), _cache[0] || (_cache[0] = _createElementVNode(\"span\", null, \"创建订单\", -1 /* HOISTED */))]),\n _: 1 /* STABLE */\n })) : _createCommentVNode(\"v-if\", true), _createCommentVNode(\" 只有管理员可见 \"), $setup.userInfo.role === 'ROLE_ADMIN' ? (_openBlock(), _createBlock(_component_el_menu_item, {\n key: 1,\n index: \"/admin/users\"\n }, {\n default: _withCtx(() => [_createVNode(_component_el_icon, null, {\n default: _withCtx(() => [_createVNode($setup[\"User\"])]),\n _: 1 /* STABLE */\n }), _cache[1] || (_cache[1] = _createElementVNode(\"span\", null, \"用户管理\", -1 /* HOISTED */))]),\n _: 1 /* STABLE */\n })) : _createCommentVNode(\"v-if\", true)]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"default-active\"])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_el_container, null, {\n default: _withCtx(() => [_createVNode(_component_el_header, null, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_1, [_createElementVNode(\"span\", null, _toDisplayString($setup.userInfo.username), 1 /* TEXT */), _createVNode(_component_el_button, {\n type: \"text\",\n onClick: $setup.handleLogout\n }, {\n default: _withCtx(() => _cache[