소스 검색

Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

吴昊天 2 년 전
부모
커밋
618a3dad3f

+ 1 - 1
template/admin/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.vue

@@ -3,7 +3,7 @@
     <Breadcrumb :style="{ fontSize: `${fontSize}px` }">
     <Breadcrumb :style="{ fontSize: `${fontSize}px` }">
       <BreadcrumbItem
       <BreadcrumbItem
         v-for="(item, index) in list"
         v-for="(item, index) in list"
-        :key="`${item.path}`"
+        :key="index"
         :to="index !== 1 ? item.path : ''"
         :to="index !== 1 ? item.path : ''"
         v-if="listLast[0].path !== homePath"
         v-if="listLast[0].path !== homePath"
       >
       >

+ 25 - 3
template/admin/src/pages/account/login/index.vue

@@ -159,7 +159,7 @@ export default {
     swiperData() {
     swiperData() {
       loginInfoApi()
       loginInfoApi()
         .then((res) => {
         .then((res) => {
-          window.document.title = `${res.data.site_name} - 登录`
+          window.document.title = `${res.data.site_name} - 登录`;
           localStorage.setItem('ADMIN_TITLE', res.data.site_name || '');
           localStorage.setItem('ADMIN_TITLE', res.data.site_name || '');
           let data = res.data || {};
           let data = res.data || {};
           this.login_logo = data.login_logo ? data.login_logo : require('@/assets/images/logo.png');
           this.login_logo = data.login_logo ? data.login_logo : require('@/assets/images/logo.png');
@@ -239,8 +239,10 @@ export default {
 
 
             this.checkSocket();
             this.checkSocket();
           } catch (e) {}
           } catch (e) {}
-
-          return this.$router.replace({ path: res.data.menus[0].path || this.$routeProStr + '/' });
+          // console.log(this.findFirstNonNullChildren(res.data.menus), 1111);
+          return this.$router.replace({
+            path: this.findFirstNonNullChildren(res.data.menus).path || this.$routeProStr + '/',
+          });
         })
         })
         .catch((res) => {
         .catch((res) => {
           msg();
           msg();
@@ -252,6 +254,26 @@ export default {
         this.loading = false;
         this.loading = false;
       }, 1000);
       }, 1000);
     },
     },
+    findFirstNonNullChildren(arr) {
+      // 如果数组为空,返回null
+      if (!arr || arr.length === 0) {
+        return null;
+      }
+      // 找到第一个对象
+      const firstObj = arr[0];
+      // 如果第一个对象没有children属性,返回该对象
+      if (!firstObj.children) {
+        return firstObj;
+      }
+
+      // 如果第一个对象的children属性是数组,
+      // 递归查找children属性中的第一个非null children属性
+      if (Array.isArray(firstObj.children)) {
+        return this.findFirstNonNullChildren(firstObj.children);
+      }
+      // 如果数组中没有非null children属性,返回null
+      return null;
+    },
     checkSocket() {
     checkSocket() {
       getWorkermanUrl().then((res) => {
       getWorkermanUrl().then((res) => {
         let url = res.data.admin;
         let url = res.data.admin;

+ 8 - 5
template/admin/src/styles/style.css

@@ -3,6 +3,10 @@
 .ivu-date-picker .ivu-select-dropdown {
 .ivu-date-picker .ivu-select-dropdown {
   /* top: 33px!important; */
   /* top: 33px!important; */
 }
 }
+.vxe-tree-cell,
+.vxe-cell {
+  font-size: 12px;
+}
 .plusColor {
 .plusColor {
   color: #e83323;
   color: #e83323;
 }
 }
@@ -204,7 +208,7 @@ body {
 }
 }
 
 
 /*表格公共样式*/
 /*表格公共样式*/
-.ivu-table-header .ivu-table-cell{
+.ivu-table-header .ivu-table-cell {
   color: #999;
   color: #999;
   font-size: 13px;
   font-size: 13px;
   padding: 10px 5px !important;
   padding: 10px 5px !important;
@@ -519,7 +523,7 @@ body {
   padding: 10px 20px;
   padding: 10px 20px;
   border-bottom: 1px solid #f2f2f2;
   border-bottom: 1px solid #f2f2f2;
   margin-bottom: 10px;
   margin-bottom: 10px;
-  border-radius:5px;
+  border-radius: 5px;
   display: -webkit-box;
   display: -webkit-box;
   display: -ms-flexbox;
   display: -ms-flexbox;
   display: flex;
   display: flex;
@@ -542,11 +546,10 @@ body {
   overflow: auto;
   overflow: auto;
   background-color: #f5f7f9;
   background-color: #f5f7f9;
 }
 }
-.left-wrapper{
+.left-wrapper {
   height: calc(100vh - 120px);
   height: calc(100vh - 120px);
   background: #fff;
   background: #fff;
   border-right: 1px solid #f2f2f2;
   border-right: 1px solid #f2f2f2;
-
 }
 }
 .ivu-tabs-bar {
 .ivu-tabs-bar {
   margin-bottom: 0;
   margin-bottom: 0;
@@ -710,6 +713,6 @@ body {
   margin-top: 3px;
   margin-top: 3px;
   color: rgb(153, 153, 153);
   color: rgb(153, 153, 153);
 }
 }
-.pt10{
+.pt10 {
   padding-top: 10px;
   padding-top: 10px;
 }
 }