Selaa lähdekoodia

修改菜单显示

zs 1 vuosi sitten
vanhempi
commit
bd5b584a36

+ 7 - 3
src/assets/icon/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4293191 */
-  src: url('iconfont.woff2?t=1697767042230') format('woff2'),
-       url('iconfont.woff?t=1697767042230') format('woff'),
-       url('iconfont.ttf?t=1697767042230') format('truetype');
+  src: url('iconfont.woff2?t=1697783878471') format('woff2'),
+       url('iconfont.woff?t=1697783878471') format('woff'),
+       url('iconfont.ttf?t=1697783878471') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-shouyefill:before {
+  content: "\e750";
+}
+
 .icon-icon-person-hushi:before {
   content: "\e606";
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
src/assets/icon/iconfont.js


+ 7 - 0
src/assets/icon/iconfont.json

@@ -5,6 +5,13 @@
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "577363",
+      "name": "首页-fill",
+      "font_class": "shouyefill",
+      "unicode": "e750",
+      "unicode_decimal": 59216
+    },
     {
       "icon_id": "31850940",
       "name": "icon-person-hushi",

BIN
src/assets/icon/iconfont.ttf


BIN
src/assets/icon/iconfont.woff


BIN
src/assets/icon/iconfont.woff2


+ 0 - 2
src/components/admin-frame/parts/Sidebar.vue

@@ -68,7 +68,6 @@ const route = useRoute();
 let onRoutes = route.path;
 let user: Ref<any> = ref({});
 const styleInfo: Ref<any> = ref(menuInfo.info);
-const menuList: Ref<any> = ref(menuInfo.menuList);
 let items: Ref<any> = ref([]);
 onMounted(async () => {
   user.value = store.state.user;
@@ -77,7 +76,6 @@ onMounted(async () => {
 const getMenu = async () => {
   let res: IQueryResult = await roleAxios.um();
   if (res.errcode == 0) items.value = res.data;
-  items.value = menuList.value;
 };
 
 watch(

+ 1 - 33
src/layout/site.ts

@@ -10,37 +10,5 @@ export const menuInfo = {
     mode: 'horizontal',
     backColor: '#242f42',
     textColor: '#ffffff'
-  },
-  // 菜单
-  menuList: [
-    { icon: 'icon-yonghu', _id: 'admin_1', path: '/homeIndex', name: '系统首页' },
-    {
-      icon: 'icon-shezhi',
-      _id: 'admin_2',
-      name: '系统设置',
-      index: '2',
-      type: '0',
-      children: [
-        { icon: 'icon-shezhi', _id: 'admin_2_1', path: '/system/config', name: '基础设置' },
-        { icon: 'icon-shezhi', _id: 'admin_2_2', path: '/system/menus', name: '菜单设置' },
-        { icon: 'icon-shezhi', _id: 'admin_2_3', path: '/system/role', name: '角色设置' }
-      ]
-    },
-    { icon: 'icon-yishengguanli', _id: 'admin_3', path: '/doctor', name: '医生管理' },
-    { icon: 'icon--_bingren', _id: 'admin_4', path: '/patient', name: '病人管理' },
-    { icon: 'icon-qunzu', _id: 'admin_5', path: '/group', name: '群组管理' },
-    { icon: 'icon-tubiao_-', _id: 'admin_6', path: '/article', name: '医疗科普管理' },
-    { icon: 'icon-guanggaoguanli', _id: 'admin_7', path: '/advert', name: '广告管理' },
-    {
-      icon: 'icon-yonghuxinxi',
-      _id: 'admin_8',
-      name: '账号管理',
-      index: '8',
-      type: '0',
-      children: [
-        { icon: 'icon-yonghuxinxi', _id: 'admin_8_1', path: '/acccount/information', name: '账号信息' },
-        { icon: 'icon-yonghuxinxi', _id: 'admin_8_1', path: '/acccount/updatepd', name: '修改密码' }
-      ]
-    }
-  ]
+  }
 };

+ 3 - 3
src/views/acccount/updatepd/index.vue

@@ -56,9 +56,9 @@ onMounted(async () => {
 const toSave = async (data: any) => {
   let user: any = store.state.user;
   let res: IQueryResult;
-  if (user.type == '0') await loginAxios.adminRp({ _id: user._id, password: data.password }); //管理员
-  else if (user.type == '1') await loginAxios.doctorRp({ _id: user._id, password: data.password }); //医生
-  else res = await loginAxios.nurseRp({ _id: user._id, password: data.password }); //护士
+  if (user.role == 'admin') await loginAxios.adminRp({ _id: user._id, password: data.password }); //管理员
+  else if (user.role == 'doctor') await loginAxios.doctorRp({ _id: user._id, password: data.password }); //医生
+  else if (user.role == 'nurse') res = await loginAxios.nurseRp({ _id: user._id, password: data.password }); //护士
   if (res.errcode == '0') {
     ElMessage({ type: 'success', message: '修改密码成功' });
     // 退出登录

+ 1 - 0
src/views/system/menus/index.vue

@@ -121,6 +121,7 @@ const is_useList: Ref<any> = ref([
   { label: '否', value: '1' }
 ]);
 const iconList: Ref<any> = ref([
+  { label: 'icon-shouyefill', value: 'icon-shouyefill' },
   { label: 'icon-yonghu', value: 'icon-yonghu' },
   { label: 'icon-shezhi', value: 'icon-shezhi' },
   { label: 'icon-yishengguanli', value: 'icon-yishengguanli' },