yujinwen 3 ماه پیش
والد
کامیت
480ed26f97
4فایلهای تغییر یافته به همراه73 افزوده شده و 4 حذف شده
  1. 18 0
      src/router/modules/system.js
  2. 15 2
      src/views/AutoLogin.vue
  3. 38 0
      src/views/system/CommonSet.vue
  4. 2 2
      vite.config.js

+ 18 - 0
src/router/modules/system.js

@@ -18,5 +18,23 @@ export default[
         },
       },
     ]
+  },
+  {
+    path:'/system',
+    name:'SystemSet',
+    component:LayoutIndex,
+    meta:{
+      title:'个性化设置'
+    },
+    children:[
+      {
+        path:'commonSet',
+        name:'SystemCommonSet',
+        component:()=>import('@/views/system/CommonSet.vue'),
+        meta:{
+          title:'个性化设置'
+        },
+      },
+    ]
   }
 ]

+ 15 - 2
src/views/AutoLogin.vue

@@ -1,10 +1,23 @@
 <script setup>
-import {apiSystemSet} from '@/api/system'
+import {apiSystemSet,apiSystemCommon} from '@/api/system'
 import { useRoute, useRouter } from 'vue-router'
 
 const route=useRoute()
 const router=useRouter()
 
+// 获取有菜单跳转
+async function handleNavigation(){
+    const res=await apiSystemCommon.menuList()
+    if(res.Ret!==200) return
+    const arr=res.Data.List||[]
+    if(arr.length===0){
+        MessagePlugin.waring('无任何菜单权限,请联系管理员')
+        return
+    }
+    const path=arr[0].Child[0].path
+    router.replace(path)
+}
+
 function init(){
     const code=route.query.code
     if(!code) return
@@ -14,7 +27,7 @@ function init(){
         if(res.Ret===200){
             sessionStorage.setItem('token',res.Data.Authorization)
             sessionStorage.setItem('userInfo',JSON.stringify(res.Data))
-            router.replace('/etaChart/index')
+            handleNavigation()
         }
     })
 }

+ 38 - 0
src/views/system/CommonSet.vue

@@ -0,0 +1,38 @@
+<script setup>
+
+
+</script>
+
+<template>
+  <div class="bg-white common-set-page">
+    <h3>设置图表水印</h3>
+    <t-upload
+        ref="uploadRef1"
+        v-model="file1"
+        :image-viewer-props="imageViewerProps"
+        :size-limit="sizeLimit"
+        action="https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com/api/upload-demo"
+        theme="image"
+        tips="单张图片文件上传(上传成功状态演示)"
+        accept="image/*"
+        :disabled="disabled"
+        :auto-upload="autoUpload"
+        :show-image-file-name="showImageFileName"
+        :upload-all-files-in-one-request="uploadAllFilesInOneRequest"
+        :locale="{
+          triggerUploadText: {
+            image: '请选择图片',
+          },
+        }"
+        @fail="handleFail"
+      />
+  </div>
+</template>
+
+<style lang="scss" scoped>
+.common-set-page{
+  padding: 20px;
+  border-radius: 4px;
+  height: calc(100vh - 160px);
+}
+</style>

+ 2 - 2
vite.config.js

@@ -92,8 +92,8 @@ export default defineConfig(({ mode }) => {
       port:8900,
       proxy:{
         '/v1': {
-          target: 'http://192.168.20.10:8912/v1',
-          // target: 'http://8.136.199.33:8900/v1',
+          // target: 'http://192.168.20.10:8912/v1',
+          target: 'http://8.136.199.33:8900/v1',
           // target: 'http://8.136.199.33:7777/adminapi/',
           changeOrigin: true,
           rewrite: (path) => path.replace(/^\/v1/, ''),