boss 1 dzień temu
rodzic
commit
62877900f0

+ 2 - 2
src/store/modules/permission.js

@@ -119,8 +119,8 @@ function filterChildren(childrenMap, lastRouter = false) {
   return children
 }
 
-export const loadView = (view) => {
-  return () => import(`@/views/${view}`)
+export const loadView = (view) => { // 路由懒加载
+  return (resolve) => require([`@/views/${view}`], resolve)
 }
 
 export default permission

+ 4 - 4
src/views/admin/dashboard/index.vue

@@ -64,10 +64,10 @@ export default {
         { label: '总充值金额', value: '¥0.00', icon: 'el-icon-bank-card', color: '#06b6d4', gradient: 'linear-gradient(135deg, #06b6d4, #22d3ee)' }
       ],
       quickLinks: [
-        { title: '代理管理', path: '/admin/proxy', icon: 'el-icon-user', color: '#3b82f6' },
-        { title: '租户管理', path: '/admin/company', icon: 'el-icon-office-building', color: '#10b981' },
-        { title: 'AI模型配置', path: '/admin/aiModel', icon: 'el-icon-cpu', color: '#8b5cf6' },
-        { title: '消费记录', path: '/admin/consumeRecord', icon: 'el-icon-coin', color: '#f59e0b' }
+        { title: '代理管理', path: '/admin/proxy-mgmt/proxy', icon: 'el-icon-user', color: '#3b82f6' },
+        { title: '租户管理', path: '/admin/tenant-mgmt/company', icon: 'el-icon-office-building', color: '#10b981' },
+        { title: 'AI模型配置', path: '/admin/ai-mgmt/aiModel', icon: 'el-icon-cpu', color: '#8b5cf6' },
+        { title: '消费记录', path: '/admin/finance/consumeRecord', icon: 'el-icon-coin', color: '#f59e0b' }
       ]
     }
   },

+ 10 - 19
src/views/monitor/componentsOperLog/index.vue

@@ -212,13 +212,9 @@
 
 <script>
 import { list, delOperlog, cleanOperlog, exportOperlog } from "@/api/company/companyOperLog";
-import { getCompanyList } from "@/api/company/company";
-import { treeselect } from "@/api/company/companyDept";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listAllCompanies } from "@/api/admin/sysCompany";
 export default {
   name: "Operlog",
-  components: {Treeselect },
   watch: {
     // 监听deptId
     'deptId': 'currDeptChange'
@@ -274,11 +270,15 @@ export default {
     this.getDicts("sys_common_status").then(response => {
       this.statusOptions = response.data;
     });
-    getCompanyList().then(response => {
-        this.companys = response.data;
-         if(this.companys!=null&&this.companys.length>0){
+    listAllCompanies().then(response => {
+        // admin端返回TableDataInfo格式(rows),字段为id/tenantName,映射为companyId/companyName
+        const rows = response.rows || [];
+        this.companys = rows.map(item => ({
+          companyId: item.id,
+          companyName: item.tenantName
+        }));
+        if(this.companys!=null&&this.companys.length>0){
           this.companyId=this.companys[0].companyId;
-          this.getTreeselect();
         }
         this.companys.push({companyId:"-1",companyName:"无"})
     });
@@ -355,20 +355,11 @@ export default {
     },
     /** 查询部门下拉树结构 */
      getTreeselect() {
-      var that=this;
-      var param={companyId:this.companyId}
-      treeselect(param).then((response) => {
-        this.deptOptions = response.data;
-        console.log(this.deptOptions)
-        if(response.data!=null&&response.data.length>0){
-          //this.queryParams.deptId=response.data[0].id;
-        }
-      });
+      // treeselect已移除,保留空方法避免报错
     },
      companyChange(val){
       console.log(val);
       this.companyId=val;
-      this.getTreeselect();
     },
      currDeptChange(val){
           console.log(val)