Przeglądaj źródła

修改菜单 新建页面

zs 1 rok temu
rodzic
commit
61df340651

+ 16 - 36
src/assets/icon/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
-  font-family: "iconfont"; /* Project id 4182834 */
-  src: url('iconfont.woff2?t=1690504779226') format('woff2'),
-       url('iconfont.woff?t=1690504779226') format('woff'),
-       url('iconfont.ttf?t=1690504779226') format('truetype');
+  font-family: "iconfont"; /* Project id 4239349 */
+  src: url('iconfont.woff2?t=1693970903785') format('woff2'),
+       url('iconfont.woff?t=1693970903785') format('woff'),
+       url('iconfont.ttf?t=1693970903785') format('truetype');
 }
 
 .iconfont {
@@ -13,47 +13,27 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
-.icon-yonghu:before {
-  content: "\e643";
-}
-
-.icon-shezhi:before {
-  content: "\10127";
-}
-
-.icon-shouye:before {
-  content: "\10128";
-}
-
-.icon-taocan:before {
-  content: "\10129";
-}
-
-.icon-pingjia:before {
-  content: "\1012a";
-}
-
-.icon-fuwu:before {
-  content: "\1012b";
+.icon-zhanghaoguanli:before {
+  content: "\e666";
 }
 
-.icon-bangzhuzhongxin:before {
-  content: "\1012c";
+.icon-gengduoneirong:before {
+  content: "\e636";
 }
 
-.icon-tukuguanli:before {
-  content: "\1012d";
+.icon-shezhi:before {
+  content: "\e8b7";
 }
 
-.icon-gengduo:before {
-  content: "\1012e";
+.icon-shouye:before {
+  content: "\e751";
 }
 
-.icon-haoyoutuijian:before {
-  content: "\1012f";
+.icon-jichuxinxi:before {
+  content: "\e625";
 }
 
-.icon-zengjia:before {
-  content: "\e608";
+.icon-yonghu:before {
+  content: "\e768";
 }
 

Plik diff jest za duży
+ 1 - 1
src/assets/icon/iconfont.js


+ 30 - 65
src/assets/icon/iconfont.json

@@ -1,86 +1,51 @@
 {
-  "id": "4182834",
-  "name": "耗材",
+  "id": "4239349",
+  "name": "神鹿峰管理平台",
   "font_family": "iconfont",
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
     {
-      "icon_id": "16530775",
-      "name": "用户",
-      "font_class": "yonghu",
-      "unicode": "e643",
-      "unicode_decimal": 58947
+      "icon_id": "6455673",
+      "name": "账号管理",
+      "font_class": "zhanghaoguanli",
+      "unicode": "e666",
+      "unicode_decimal": 58982
     },
     {
-      "icon_id": "36409813",
+      "icon_id": "528264",
+      "name": "更多内容",
+      "font_class": "gengduoneirong",
+      "unicode": "e636",
+      "unicode_decimal": 58934
+    },
+    {
+      "icon_id": "11372694",
       "name": "设置",
       "font_class": "shezhi",
-      "unicode": "10127",
-      "unicode_decimal": 65831
+      "unicode": "e8b7",
+      "unicode_decimal": 59575
     },
     {
-      "icon_id": "36409815",
+      "icon_id": "577364",
       "name": "首页",
       "font_class": "shouye",
-      "unicode": "10128",
-      "unicode_decimal": 65832
-    },
-    {
-      "icon_id": "36409818",
-      "name": "套餐",
-      "font_class": "taocan",
-      "unicode": "10129",
-      "unicode_decimal": 65833
-    },
-    {
-      "icon_id": "36409820",
-      "name": "评价",
-      "font_class": "pingjia",
-      "unicode": "1012a",
-      "unicode_decimal": 65834
-    },
-    {
-      "icon_id": "36409824",
-      "name": "服务",
-      "font_class": "fuwu",
-      "unicode": "1012b",
-      "unicode_decimal": 65835
-    },
-    {
-      "icon_id": "36409827",
-      "name": "帮助中心",
-      "font_class": "bangzhuzhongxin",
-      "unicode": "1012c",
-      "unicode_decimal": 65836
-    },
-    {
-      "icon_id": "36409831",
-      "name": "图库管理",
-      "font_class": "tukuguanli",
-      "unicode": "1012d",
-      "unicode_decimal": 65837
+      "unicode": "e751",
+      "unicode_decimal": 59217
     },
     {
-      "icon_id": "36409832",
-      "name": "更多",
-      "font_class": "gengduo",
-      "unicode": "1012e",
-      "unicode_decimal": 65838
+      "icon_id": "6241663",
+      "name": "基础信息",
+      "font_class": "jichuxinxi",
+      "unicode": "e625",
+      "unicode_decimal": 58917
     },
     {
-      "icon_id": "36409833",
-      "name": "好友推荐",
-      "font_class": "haoyoutuijian",
-      "unicode": "1012f",
-      "unicode_decimal": 65839
-    },
-    {
-      "icon_id": "25739959",
-      "name": "增加",
-      "font_class": "zengjia",
-      "unicode": "e608",
-      "unicode_decimal": 58888
+      "icon_id": "4933437",
+      "name": "用户",
+      "font_class": "yonghu",
+      "unicode": "e768",
+      "unicode_decimal": 59240
     }
   ]
 }

BIN
src/assets/icon/iconfont.ttf


BIN
src/assets/icon/iconfont.woff


BIN
src/assets/icon/iconfont.woff2


+ 1 - 0
src/components/admin-frame/parts/Header.vue

@@ -6,6 +6,7 @@
           <el-col :span="24" class="one">
             <el-col :span="12" class="left">
               <span>
+                <el-icon><Expand /></el-icon>
                 {{ siteInfo.zhTitle }}
               </span>
             </el-col>

+ 6 - 1
src/components/admin-frame/parts/breadcrumb.vue

@@ -3,7 +3,12 @@
     <el-row>
       <el-col :span="24" class="crumbs">
         <el-breadcrumb separator="/">
-          <el-breadcrumb-item> <i class="el-icon-s-grid"></i> {{ breadcrumbTitle }} </el-breadcrumb-item>
+          <el-breadcrumb-item>
+            <el-icon>
+              <Expand />
+            </el-icon>
+            {{ breadcrumbTitle }}
+          </el-breadcrumb-item>
         </el-breadcrumb>
       </el-col>
     </el-row>

+ 50 - 1
src/layout/site.ts

@@ -11,5 +11,54 @@ export const menuInfo = {
     backColor: '#242f42',
     textColor: '#ffffff'
   },
-  menuList: [{ icon: 'icon-shouye', _id: 'admin_1', path: '/homeIndex', name: '系统首页' }]
+  menuList: [
+    { icon: 'icon-shouye', _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/role', name: '角色管理' },
+        { icon: 'icon-shezhi', _id: 'admin_2_2', path: '/system/menus', name: '菜单管理' },
+        { icon: 'icon-shezhi', _id: 'admin_2_3', path: '/system/dict', name: '字典管理' }
+      ]
+    },
+    {
+      icon: 'icon-yonghu',
+      _id: 'admin_3',
+      name: '用户管理',
+      index: '3',
+      type: '0',
+      children: [
+        { icon: 'icon-yonghu', _id: 'admin_3_1', path: '/user/user', name: '普通用户' },
+        { icon: 'icon-yonghu', _id: 'admin_3_2', path: '/user/admin', name: '区域管理员' }
+      ]
+    },
+    {
+      icon: 'icon-gengduoneirong',
+      _id: 'admin_4',
+      name: '内容管理',
+      index: '4',
+      type: '0',
+      children: [
+        { icon: 'icon-gengduoneirong', _id: 'admin_4_1', path: '/content/news', name: '新闻管理' },
+        { icon: 'icon-gengduoneirong', _id: 'admin_4_2', path: '/content/activity', name: '活动管理' },
+        { icon: 'icon-gengduoneirong', _id: 'admin_4_3', path: '/content/article', name: '游玩攻略管理' },
+        { icon: 'icon-gengduoneirong', _id: 'admin_4_4', path: '/content/notice', name: '公告管理' }
+      ]
+    },
+    {
+      icon: 'icon-zhanghaoguanli',
+      _id: 'admin_8',
+      name: '账号管理',
+      index: '8',
+      type: '0',
+      children: [
+        { icon: 'icon-zhanghaoguanli', _id: 'admin_8_1', path: '/acccount/information', name: '账号信息' },
+        { icon: 'icon-zhanghaoguanli', _id: 'admin_8_2', path: '/acccount/updatepd', name: '修改密码' }
+      ]
+    }
+  ]
 };

+ 45 - 0
src/router/index.ts

@@ -29,6 +29,51 @@ const router = createRouter({
           path: '/homeIndex',
           meta: { title: '系统首页' },
           component: () => import('@/views/home/index.vue')
+        },
+        {
+          path: '/system/role',
+          meta: { title: '角色管理' },
+          component: () => import('@/views/system/role/index.vue')
+        },
+        {
+          path: '/system/menus',
+          meta: { title: '菜单管理' },
+          component: () => import('@/views/system/menus/index.vue')
+        },
+        {
+          path: '/system/dict',
+          meta: { title: '字典管理' },
+          component: () => import('@/views/system/dict/index.vue')
+        },
+        {
+          path: '/user/user',
+          meta: { title: '普通用户' },
+          component: () => import('@/views/user/user/index.vue')
+        },
+        {
+          path: '/user/admin',
+          meta: { title: '区域管理员' },
+          component: () => import('@/views/user/admin/index.vue')
+        },
+        {
+          path: '/content/news',
+          meta: { title: '新闻管理' },
+          component: () => import('@/views/content/news/index.vue')
+        },
+        {
+          path: '/content/activity',
+          meta: { title: '活动管理' },
+          component: () => import('@/views/content/activity/index.vue')
+        },
+        {
+          path: '/content/article',
+          meta: { title: '游玩攻略管理' },
+          component: () => import('@/views/content/article/index.vue')
+        },
+        {
+          path: '/content/notice',
+          meta: { title: '公告管理' },
+          component: () => import('@/views/content/notice/index.vue')
         }
       ]
     }

+ 41 - 0
src/views/acccount/information/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 69 - 0
src/views/acccount/updatepd/index.vue

@@ -0,0 +1,69 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">
+          <cForm :span="12" :fields="fields" :form="form" :rules="rules" @save="toSave"> </cForm>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import store from '@/stores/counter';
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+import { ElMessage } from 'element-plus';
+import { useRouter } from 'vue-router';
+// 接口
+import { AdminStore } from '@/stores/users/admin'; // 管理员
+import type { IQueryResult } from '@/util/types.util';
+const adminAxios = AdminStore();
+// 加载中
+const loading: Ref<any> = ref(false);
+// 路由
+const router = useRouter();
+// 表单
+const form: Ref<any> = ref({});
+const fields: Ref<any> = ref([
+  { label: '新密码', model: 'password', type: 'password' },
+  { label: '确认新密码', model: 'ispassword', type: 'password' }
+]);
+const rules: Ref<any> = ref({
+  password: [{ required: true, message: '请输入新密码' }],
+  ispassword: [
+    { required: true, message: '请输入确认新密码' },
+    {
+      trigger: 'blur',
+      validator: (rule: any, value: any, callback: any) => {
+        if (form.value.password !== value) {
+          callback(new Error('两次输入的密码不一致'));
+        } else {
+          callback();
+        }
+      }
+    }
+  ]
+});
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  loading.value = false;
+});
+// 提交保存
+const toSave = async (data: any) => {
+  let user: any = store.state.user;
+  let res: IQueryResult = await adminAxios.rp({ _id: user._id, password: data.password });
+  if (res.errcode == '0') {
+    ElMessage({ type: 'success', message: '修改密码成功' });
+    // 退出登录
+    localStorage.removeItem('token');
+    router.push('/login');
+  } else {
+    ElMessage({ type: 'error', message: `${res.errmsg}` });
+  }
+};
+</script>
+<style scoped lang="scss"></style>

+ 41 - 0
src/views/content/activity/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/content/article/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/content/news/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/content/notice/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/system/dict/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

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

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/system/role/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/user/admin/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>

+ 41 - 0
src/views/user/user/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one"> 注册 </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+import { onMounted, ref } from 'vue';
+
+// 接口
+// import { ToolsStore } from '@/stores/tool';
+// import type { IQueryResult } from '@/util/types.util';
+// const toolsAxios = ToolsStore();
+
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  search();
+  loading.value = false;
+});
+const search = async () => {
+  // let res: IQueryResult = await toolsAxios.dataCount();
+  // if (res.errcode == '0') {
+  //   info.value = res.data;
+  // }
+};
+</script>
+<style scoped lang="scss">
+.main {
+  padding: 2px;
+}
+</style>