Browse Source

Merge branch 'main' of http://221.182.8.141:2300/sujunling/xld-gis-admin

XiaXxxxxx 2 years ago
parent
commit
5eb73cadc7

BIN
.DS_Store


+ 33 - 0
index.html

@@ -19,6 +19,39 @@
       width: 22px !important;
       opacity: 0 !important;
     }
+
+    .ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-selected {
+      background: linear-gradient(157deg, #D6F5FF -4%, #FFFFFF 81%);
+      color: #fff !important;
+      height: 34px;
+      border-radius: 35px;
+      line-height: 35px;
+    }
+
+    .vben-basic-menu__sidebar-hor.ant-menu-horizontal.ant-menu-dark .ant-menu-item:hover {
+      height: 34px;
+      border-radius: 35px;
+      line-height: 35px;
+    }
+
+
+    .vben-basic-menu__sidebar-hor.ant-menu-horizontal.ant-menu-dark .ant-menu-item-selected {
+      background: linear-gradient(157deg, #D6F5FF -4%, #FFFFFF 81%);
+      height: 34px;
+      border-radius: 35px;
+      color: #0671DD !important;
+      line-height: 35px;
+    }
+
+    .ant-menu-dark .ant-menu-item-selected .anticon {
+      color: #0671DD !important;
+    }
+
+    ul li.vben-menu-item-active:not(.vben-menu-submenu) {
+      background: url("/static/img/menuBg.jpg")no-repeat;
+      background-size: 170px 50px;
+      color: #377dff !important;
+    }
   </style>
 </head>
 

BIN
public/static/img/menuBg.jpg


BIN
src/assets/images/menuBg.jpg


+ 92 - 76
src/components/Application/src/AppLogo.vue

@@ -1,94 +1,110 @@
 <template>
   <div class="anticon" :class="getAppLogoClass" @click="goHome">
-    <img v-if="getLogo" :src="getLogo" />
-    <img v-else src="/src/assets/images/logo.png" />
+    <!-- <img v-if="getLogo" :src="getLogo" />
+    <img v-else src="/src/assets/images/logo.png" /> -->
     <div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
-      <!-- {{ getTitle }} -->空间数据管理平台
+      <!-- {{ getTitle }} -->
+      空间数据管理平台
     </div>
   </div>
+  <!-- <div class="logo"></div> -->
 </template>
 <script lang="ts" setup>
-  import { computed, unref } from 'vue';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
-  import { useDesign } from '/@/hooks/web/useDesign';
-  import { useUserStore } from '/@/store/modules/user';
+import { computed, unref } from 'vue';
+import { useGlobSetting } from '/@/hooks/setting';
+import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
+import { useDesign } from '/@/hooks/web/useDesign';
+import { useUserStore } from '/@/store/modules/user';
 
-  const props = defineProps({
-    /**
-     * The theme of the current parent component
-     */
-    theme: { type: String, validator: (v: string) => ['light', 'dark'].includes(v) },
-    /**
-     * Whether to show title
-     */
-    showTitle: { type: Boolean, default: true },
-    /**
-     * The title is also displayed when the menu is collapsed
-     */
-    alwaysShowTitle: { type: Boolean },
-  });
+const props = defineProps({
+  /**
+   * The theme of the current parent component
+   */
+  theme: { type: String, validator: (v: string) => ['light', 'dark'].includes(v) },
+  /**
+   * Whether to show title
+   */
+  showTitle: { type: Boolean, default: true },
+  /**
+   * The title is also displayed when the menu is collapsed
+   */
+  alwaysShowTitle: { type: Boolean },
+});
 
-  const { prefixCls } = useDesign('app-logo');
-  const { getCollapsedShowTitle } = useMenuSetting();
-  const userStore = useUserStore();
-  const { title } = useGlobSetting();
+const { prefixCls } = useDesign('app-logo');
+const { getCollapsedShowTitle } = useMenuSetting();
+const userStore = useUserStore();
+const { title } = useGlobSetting();
 
-  const getAppLogoClass = computed(() => [
-    prefixCls,
-    props.theme,
-    { 'collapsed-show-title': unref(getCollapsedShowTitle) },
-  ]);
-  const getTitleClass = computed(() => [
-    `${prefixCls}__title`,
-    {
-      'xs:opacity-0': !props.alwaysShowTitle,
-    },
-  ]);
-  const getLogo = computed(() => {
-    return userStore.platInfo?.logo;
-  });
-  const getTitle = computed(() => {
-    // 设置icon
-    let link = (document.querySelector("link[rel*='icon']") ||
-      document.createElement('link')) as HTMLLinkElement;
-    link.type = 'image/x-icon';
-    link.rel = 'shortcut icon';
-    link.href = userStore.platInfo?.icon ?? '/favicon.ico';
-    document.getElementsByTagName('head')[0].appendChild(link);
-    // return userStore.platInfo?.name ?? title;
-    return '空间数据管理平台';
-  });
+const getAppLogoClass = computed(() => [
+  prefixCls,
+  props.theme,
+  { 'collapsed-show-title': unref(getCollapsedShowTitle) },
+]);
+const getTitleClass = computed(() => [
+  `${prefixCls}__title`,
+  {
+    'xs:opacity-0': !props.alwaysShowTitle,
+  },
+]);
+const getLogo = computed(() => {
+  return userStore.platInfo?.logo;
+});
+const getTitle = computed(() => {
+  // 设置icon
+  let link = (document.querySelector("link[rel*='icon']") ||
+    document.createElement('link')) as HTMLLinkElement;
+  link.type = 'image/x-icon';
+  link.rel = 'shortcut icon';
+  link.href = userStore.platInfo?.icon ?? '/favicon.ico';
+  document.getElementsByTagName('head')[0].appendChild(link);
+  // return userStore.platInfo?.name ?? title;
+  return '空间数据管理平台';
+});
 </script>
 <style lang="less" scoped>
-  @prefix-cls: ~'@{namespace}-app-logo';
-  .@{prefix-cls} {
-    display: flex;
-    align-items: center;
-    padding-left: 7px;
-    cursor: pointer;
-    transition: all 0.2s ease;
-    &.light {
-      border-bottom: 1px solid @border-color-base;
-    }
+div.logo {
+  display: flex;
+  align-items: center;
+  padding-left: 7px;
+  cursor: pointer;
+  transition: all 0.2s ease;
+  height: 48px;
+  min-width: 192px;
+  padding: 0 10px;
+  font-size: 14px;
+}
 
-    &.collapsed-show-title {
-      padding-left: 20px;
-    }
+@prefix-cls: ~'@{namespace}-app-logo';
 
-    &.light &__title {
-      color: @primary-color;
-    }
+.@{prefix-cls} {
+  display: flex;
+  align-items: center;
+  padding-left: 7px;
+  cursor: pointer;
+  transition: all 0.2s ease;
 
-    &.dark &__title {
-      color: @white;
-    }
+  &.light {
+    border-bottom: 1px solid @border-color-base;
+  }
+
+  &.collapsed-show-title {
+    padding-left: 20px;
+  }
+
+  &.light &__title {
+    color: @primary-color;
+  }
+
+  &.dark &__title {
+    color: @white;
+  }
 
-    &__title {
-      font-size: 16px;
-      font-weight: 700;
-      transition: all 0.5s;
-      line-height: normal;
-    }
+  &__title {
+    font-size: 16px;
+    font-weight: 700;
+    transition: all 0.5s;
+    line-height: normal;
   }
+}
 </style>

+ 171 - 175
src/components/Scrollbar/src/Scrollbar.vue

@@ -1,11 +1,7 @@
 <template>
   <div class="scrollbar">
-    <div
-      ref="wrap"
-      :class="[wrapClass, 'scrollbar__wrap', native ? '' : 'scrollbar__wrap--hidden-default']"
-      :style="style"
-      @scroll="handleScroll"
-    >
+    <div ref="wrap" :class="[wrapClass, 'scrollbar__wrap', native ? '' : 'scrollbar__wrap--hidden-default']"
+      :style="style" @scroll="handleScroll">
       <component :is="tag" ref="resize" :class="['scrollbar__view', viewClass]" :style="viewStyle">
         <slot></slot>
       </component>
@@ -17,191 +13,191 @@
   </div>
 </template>
 <script lang="ts">
-  import { addResizeListener, removeResizeListener } from '/@/utils/event';
-  import componentSetting from '/@/settings/componentSetting';
-  const { scrollbar } = componentSetting;
-  import { toObject } from './util';
-  import {
-    defineComponent,
-    ref,
-    onMounted,
-    onBeforeUnmount,
-    nextTick,
-    provide,
-    computed,
-    unref,
-  } from 'vue';
-  import Bar from './bar';
-
-  export default defineComponent({
-    name: 'Scrollbar',
-    // inheritAttrs: false,
-    components: { Bar },
-    props: {
-      native: {
-        type: Boolean,
-        default: scrollbar?.native ?? false,
-      },
-      wrapStyle: {
-        type: [String, Array],
-        default: '',
-      },
-      wrapClass: {
-        type: [String, Array],
-        default: '',
-      },
-      viewClass: {
-        type: [String, Array],
-        default: '',
-      },
-      viewStyle: {
-        type: [String, Array],
-        default: '',
-      },
-      noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
-      tag: {
-        type: String,
-        default: 'div',
-      },
+import { addResizeListener, removeResizeListener } from '/@/utils/event';
+import componentSetting from '/@/settings/componentSetting';
+const { scrollbar } = componentSetting;
+import { toObject } from './util';
+import {
+  defineComponent,
+  ref,
+  onMounted,
+  onBeforeUnmount,
+  nextTick,
+  provide,
+  computed,
+  unref,
+} from 'vue';
+import Bar from './bar';
+
+export default defineComponent({
+  name: 'Scrollbar',
+  // inheritAttrs: false,
+  components: { Bar },
+  props: {
+    native: {
+      type: Boolean,
+      default: scrollbar?.native ?? false,
     },
-    setup(props) {
-      const sizeWidth = ref('0');
-      const sizeHeight = ref('0');
-      const moveX = ref(0);
-      const moveY = ref(0);
-      const wrap = ref();
-      const resize = ref();
-
-      provide('scroll-bar-wrap', wrap);
-
-      const style = computed(() => {
-        if (Array.isArray(props.wrapStyle)) {
-          return toObject(props.wrapStyle);
-        }
-        return props.wrapStyle;
-      });
-
-      const handleScroll = () => {
-        if (!props.native) {
-          moveY.value = (unref(wrap).scrollTop * 100) / unref(wrap).clientHeight;
-          moveX.value = (unref(wrap).scrollLeft * 100) / unref(wrap).clientWidth;
-        }
-      };
-
-      const update = () => {
-        if (!unref(wrap)) return;
-
-        const heightPercentage = (unref(wrap).clientHeight * 100) / unref(wrap).scrollHeight;
-        const widthPercentage = (unref(wrap).clientWidth * 100) / unref(wrap).scrollWidth;
-
-        sizeHeight.value = heightPercentage < 100 ? heightPercentage + '%' : '';
-        sizeWidth.value = widthPercentage < 100 ? widthPercentage + '%' : '';
-      };
-
-      onMounted(() => {
-        if (props.native) return;
-        nextTick(update);
-        if (!props.noresize) {
-          addResizeListener(unref(resize), update);
-          addResizeListener(unref(wrap), update);
-          addEventListener('resize', update);
-        }
-      });
-
-      onBeforeUnmount(() => {
-        if (props.native) return;
-        if (!props.noresize) {
-          removeResizeListener(unref(resize), update);
-          removeResizeListener(unref(wrap), update);
-          removeEventListener('resize', update);
-        }
-      });
-
-      return {
-        moveX,
-        moveY,
-        sizeWidth,
-        sizeHeight,
-        style,
-        wrap,
-        resize,
-        update,
-        handleScroll,
-      };
+    wrapStyle: {
+      type: [String, Array],
+      default: '',
     },
-  });
+    wrapClass: {
+      type: [String, Array],
+      default: '',
+    },
+    viewClass: {
+      type: [String, Array],
+      default: '',
+    },
+    viewStyle: {
+      type: [String, Array],
+      default: '',
+    },
+    noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
+    tag: {
+      type: String,
+      default: 'div',
+    },
+  },
+  setup(props) {
+    const sizeWidth = ref('0');
+    const sizeHeight = ref('0');
+    const moveX = ref(0);
+    const moveY = ref(0);
+    const wrap = ref();
+    const resize = ref();
+
+    provide('scroll-bar-wrap', wrap);
+
+    const style = computed(() => {
+      if (Array.isArray(props.wrapStyle)) {
+        return toObject(props.wrapStyle);
+      }
+      return props.wrapStyle;
+    });
+
+    const handleScroll = () => {
+      if (!props.native) {
+        moveY.value = (unref(wrap).scrollTop * 100) / unref(wrap).clientHeight;
+        moveX.value = (unref(wrap).scrollLeft * 100) / unref(wrap).clientWidth;
+      }
+    };
+
+    const update = () => {
+      if (!unref(wrap)) return;
+
+      const heightPercentage = (unref(wrap).clientHeight * 100) / unref(wrap).scrollHeight;
+      const widthPercentage = (unref(wrap).clientWidth * 100) / unref(wrap).scrollWidth;
+
+      sizeHeight.value = heightPercentage < 100 ? heightPercentage + '%' : '';
+      sizeWidth.value = widthPercentage < 100 ? widthPercentage + '%' : '';
+    };
+
+    onMounted(() => {
+      if (props.native) return;
+      nextTick(update);
+      if (!props.noresize) {
+        addResizeListener(unref(resize), update);
+        addResizeListener(unref(wrap), update);
+        addEventListener('resize', update);
+      }
+    });
+
+    onBeforeUnmount(() => {
+      if (props.native) return;
+      if (!props.noresize) {
+        removeResizeListener(unref(resize), update);
+        removeResizeListener(unref(wrap), update);
+        removeEventListener('resize', update);
+      }
+    });
+
+    return {
+      moveX,
+      moveY,
+      sizeWidth,
+      sizeHeight,
+      style,
+      wrap,
+      resize,
+      update,
+      handleScroll,
+    };
+  },
+});
 </script>
 <style lang="less">
-  .scrollbar {
-    position: relative;
-    height: 100%;
-    overflow: hidden;
+.scrollbar {
+  position: relative;
+  height: 100%;
+  overflow: hidden;
 
-    &__wrap {
-      height: 100%;
-      overflow: auto;
+  &__wrap {
+    height: 100%;
+    overflow: auto;
 
-      &--hidden-default {
-        scrollbar-width: none;
+    &--hidden-default {
+      scrollbar-width: none;
 
-        &::-webkit-scrollbar {
-          display: none;
-          width: 0;
-          height: 0;
-          opacity: 0;
-        }
+      &::-webkit-scrollbar {
+        display: none;
+        width: 0;
+        height: 0;
+        opacity: 0;
       }
     }
+  }
 
-    &__thumb {
-      position: relative;
-      display: block;
-      width: 0;
-      height: 0;
-      cursor: pointer;
-      background-color: rgba(144, 147, 153, 0.3);
-      border-radius: inherit;
-      transition: 0.3s background-color;
-
-      &:hover {
-        background-color: rgba(144, 147, 153, 0.5);
-      }
+  &__thumb {
+    position: relative;
+    display: block;
+    width: 0;
+    height: 0;
+    cursor: pointer;
+    background-color: rgba(144, 147, 153, 0.3);
+    border-radius: inherit;
+    transition: 0.3s background-color;
+
+    &:hover {
+      background-color: rgba(144, 147, 153, 0.5);
     }
+  }
 
-    &__bar {
-      position: absolute;
-      right: 2px;
-      bottom: 2px;
-      z-index: 1;
-      border-radius: 4px;
-      opacity: 0;
-      -webkit-transition: opacity 80ms ease;
-      transition: opacity 80ms ease;
-
-      &.is-vertical {
-        top: 2px;
-        width: 6px;
-
-        & > div {
-          width: 100%;
-        }
+  &__bar {
+    position: absolute;
+    right: 2px;
+    bottom: 2px;
+    z-index: 1;
+    border-radius: 4px;
+    opacity: 0;
+    -webkit-transition: opacity 80ms ease;
+    transition: opacity 80ms ease;
+
+    &.is-vertical {
+      top: 2px;
+      width: 6px;
+
+      &>div {
+        width: 100%;
       }
+    }
 
-      &.is-horizontal {
-        left: 2px;
-        height: 6px;
+    &.is-horizontal {
+      left: 2px;
+      height: 6px;
 
-        & > div {
-          height: 100%;
-        }
+      &>div {
+        height: 100%;
       }
     }
   }
-
-  .scrollbar:active > .scrollbar__bar,
-  .scrollbar:focus > .scrollbar__bar,
-  .scrollbar:hover > .scrollbar__bar {
-    opacity: 1;
-    transition: opacity 340ms ease-out;
-  }
+}
+
+.scrollbar:active>.scrollbar__bar,
+.scrollbar:focus>.scrollbar__bar,
+.scrollbar:hover>.scrollbar__bar {
+  opacity: 1;
+  transition: opacity 340ms ease-out;
+}
 </style>

+ 125 - 136
src/components/SimpleMenu/src/SimpleMenu.vue

@@ -1,160 +1,149 @@
 <template>
-  <Menu
-    v-bind="getBindValues"
-    :activeName="activeName"
-    :openNames="getOpenKeys"
-    :class="prefixCls"
-    :activeSubMenuNames="activeSubMenuNames"
-    @select="handleSelect"
-  >
+  <Menu v-bind="getBindValues" :activeName="activeName" :openNames="getOpenKeys" :class="prefixCls"
+    :activeSubMenuNames="activeSubMenuNames" @select="handleSelect">
     <template v-for="item in items" :key="item.path">
-      <SimpleSubMenu
-        :item="item"
-        :parent="true"
-        :collapsedShowTitle="collapsedShowTitle"
-        :collapse="collapse"
-      />
+      <SimpleSubMenu :item="item" :parent="true" :collapsedShowTitle="collapsedShowTitle" :collapse="collapse" />
     </template>
   </Menu>
 </template>
 <script lang="ts">
-  import type { MenuState } from './types';
-  import type { Menu as MenuType } from '/@/router/types';
-  import type { RouteLocationNormalizedLoaded } from 'vue-router';
-  import { defineComponent, computed, ref, unref, reactive, toRefs, watch } from 'vue';
-  import { useDesign } from '/@/hooks/web/useDesign';
-  import Menu from './components/Menu.vue';
-  import SimpleSubMenu from './SimpleSubMenu.vue';
-  import { listenerRouteChange } from '/@/logics/mitt/routeChange';
-  import { propTypes } from '/@/utils/propTypes';
-  import { REDIRECT_NAME } from '/@/router/constant';
-  import { useRouter } from 'vue-router';
-  import { isFunction, isUrl } from '/@/utils/is';
-  import { openWindow } from '/@/utils';
-
-  import { useOpenKeys } from './useOpenKeys';
-  export default defineComponent({
-    name: 'SimpleMenu',
-    components: {
-      Menu,
-      SimpleSubMenu,
+import type { MenuState } from './types';
+import type { Menu as MenuType } from '/@/router/types';
+import type { RouteLocationNormalizedLoaded } from 'vue-router';
+import { defineComponent, computed, ref, unref, reactive, toRefs, watch } from 'vue';
+import { useDesign } from '/@/hooks/web/useDesign';
+import Menu from './components/Menu.vue';
+import SimpleSubMenu from './SimpleSubMenu.vue';
+import { listenerRouteChange } from '/@/logics/mitt/routeChange';
+import { propTypes } from '/@/utils/propTypes';
+import { REDIRECT_NAME } from '/@/router/constant';
+import { useRouter } from 'vue-router';
+import { isFunction, isUrl } from '/@/utils/is';
+import { openWindow } from '/@/utils';
+
+import { useOpenKeys } from './useOpenKeys';
+export default defineComponent({
+  name: 'SimpleMenu',
+  components: {
+    Menu,
+    SimpleSubMenu,
+  },
+  inheritAttrs: false,
+  props: {
+    items: {
+      type: Array as PropType<MenuType[]>,
+      default: () => [],
     },
-    inheritAttrs: false,
-    props: {
-      items: {
-        type: Array as PropType<MenuType[]>,
-        default: () => [],
-      },
-      collapse: propTypes.bool,
-      mixSider: propTypes.bool,
-      theme: propTypes.string,
-      accordion: propTypes.bool.def(true),
-      collapsedShowTitle: propTypes.bool,
-      beforeClickFn: {
-        type: Function as PropType<(key: string) => Promise<boolean>>,
-      },
-      isSplitMenu: propTypes.bool,
+    collapse: propTypes.bool,
+    mixSider: propTypes.bool,
+    theme: propTypes.string,
+    accordion: propTypes.bool.def(true),
+    collapsedShowTitle: propTypes.bool,
+    beforeClickFn: {
+      type: Function as PropType<(key: string) => Promise<boolean>>,
     },
-    emits: ['menuClick'],
-    setup(props, { attrs, emit }) {
-      const currentActiveMenu = ref('');
-      const isClickGo = ref(false);
-
-      const menuState = reactive<MenuState>({
-        activeName: '',
-        openNames: [],
-        activeSubMenuNames: [],
-      });
-
-      const { currentRoute } = useRouter();
-      const { prefixCls } = useDesign('simple-menu');
-      const { items, accordion, mixSider, collapse } = toRefs(props);
-
-      const { setOpenKeys, getOpenKeys } = useOpenKeys(
-        menuState,
-        items,
-        accordion,
-        mixSider,
-        collapse
-      );
-
-      const getBindValues = computed(() => ({ ...attrs, ...props }));
-
-      watch(
-        () => props.collapse,
-        (collapse) => {
-          if (collapse) {
-            menuState.openNames = [];
-          } else {
-            setOpenKeys(currentRoute.value.path);
-          }
-        },
-        { immediate: true }
-      );
-
-      watch(
-        () => props.items,
-        () => {
-          if (!props.isSplitMenu) {
-            return;
-          }
+    isSplitMenu: propTypes.bool,
+  },
+  emits: ['menuClick'],
+  setup(props, { attrs, emit }) {
+    const currentActiveMenu = ref('');
+    const isClickGo = ref(false);
+
+    const menuState = reactive<MenuState>({
+      activeName: '',
+      openNames: [],
+      activeSubMenuNames: [],
+    });
+
+    const { currentRoute } = useRouter();
+    const { prefixCls } = useDesign('simple-menu');
+    const { items, accordion, mixSider, collapse } = toRefs(props);
+
+    const { setOpenKeys, getOpenKeys } = useOpenKeys(
+      menuState,
+      items,
+      accordion,
+      mixSider,
+      collapse
+    );
+
+    const getBindValues = computed(() => ({ ...attrs, ...props }));
+
+    watch(
+      () => props.collapse,
+      (collapse) => {
+        if (collapse) {
+          menuState.openNames = [];
+        } else {
           setOpenKeys(currentRoute.value.path);
-        },
-        { flush: 'post' }
-      );
-
-      listenerRouteChange((route) => {
-        if (route.name === REDIRECT_NAME) return;
-
-        currentActiveMenu.value = route.meta?.currentActiveMenu as string;
-        handleMenuChange(route);
-
-        if (unref(currentActiveMenu)) {
-          menuState.activeName = unref(currentActiveMenu);
-          setOpenKeys(unref(currentActiveMenu));
         }
-      });
+      },
+      { immediate: true }
+    );
 
-      async function handleMenuChange(route?: RouteLocationNormalizedLoaded) {
-        if (unref(isClickGo)) {
-          isClickGo.value = false;
+    watch(
+      () => props.items,
+      () => {
+        if (!props.isSplitMenu) {
           return;
         }
-        const path = (route || unref(currentRoute)).path;
+        setOpenKeys(currentRoute.value.path);
+      },
+      { flush: 'post' }
+    );
+
+    listenerRouteChange((route) => {
+      if (route.name === REDIRECT_NAME) return;
 
-        menuState.activeName = path;
+      currentActiveMenu.value = route.meta?.currentActiveMenu as string;
+      handleMenuChange(route);
 
-        setOpenKeys(path);
+      if (unref(currentActiveMenu)) {
+        menuState.activeName = unref(currentActiveMenu);
+        setOpenKeys(unref(currentActiveMenu));
       }
+    });
 
-      async function handleSelect(key: string) {
-        if (isUrl(key)) {
-          openWindow(key);
-          return;
-        }
-        const { beforeClickFn } = props;
-        if (beforeClickFn && isFunction(beforeClickFn)) {
-          const flag = await beforeClickFn(key);
-          if (!flag) return;
-        }
+    async function handleMenuChange(route?: RouteLocationNormalizedLoaded) {
+      if (unref(isClickGo)) {
+        isClickGo.value = false;
+        return;
+      }
+      const path = (route || unref(currentRoute)).path;
 
-        emit('menuClick', key);
+      menuState.activeName = path;
 
-        isClickGo.value = true;
-        setOpenKeys(key);
-        menuState.activeName = key;
+      setOpenKeys(path);
+    }
+
+    async function handleSelect(key: string) {
+      if (isUrl(key)) {
+        openWindow(key);
+        return;
+      }
+      const { beforeClickFn } = props;
+      if (beforeClickFn && isFunction(beforeClickFn)) {
+        const flag = await beforeClickFn(key);
+        if (!flag) return;
       }
 
-      return {
-        prefixCls,
-        getBindValues,
-        handleSelect,
-        getOpenKeys,
-        ...toRefs(menuState),
-      };
-    },
-  });
+      emit('menuClick', key);
+
+      isClickGo.value = true;
+      setOpenKeys(key);
+      menuState.activeName = key;
+    }
+
+    return {
+      prefixCls,
+      getBindValues,
+      handleSelect,
+      getOpenKeys,
+      ...toRefs(menuState),
+    };
+  },
+});
 </script>
 <style lang="less">
-  @import './index.less';
+@import './index.less';
 </style>

+ 22 - 11
src/components/SimpleMenu/src/components/menu.less

@@ -28,7 +28,7 @@
   }
 
   .@{menu-prefix-cls} {
-    &-opened > * > &-submenu-title-icon {
+    &-opened>*>&-submenu-title-icon {
       transform: translateY(-50%) rotate(90deg) !important;
     }
 
@@ -51,6 +51,7 @@
     }
 
     &-dark {
+
       .@{menu-prefix-cls}-item,
       .@{menu-prefix-cls}-submenu-title {
         color: @menu-dark-subsidiary-color;
@@ -68,6 +69,7 @@
     }
 
     &-light {
+
       .@{menu-prefix-cls}-item,
       .@{menu-prefix-cls}-submenu-title {
         color: @text-color-base;
@@ -89,6 +91,7 @@
 }
 
 .content();
+
 .content() {
   .@{menu-prefix-cls} {
     position: relative;
@@ -141,12 +144,12 @@
       }
     }
 
-    &-item > i {
+    &-item>i {
       margin-right: 6px;
     }
 
-    &-submenu-title > i,
-    &-submenu-title span > i {
+    &-submenu-title>i,
+    &-submenu-title span>i {
       margin-right: 8px;
     }
 
@@ -170,6 +173,7 @@
         padding: 12px 0;
         text-align: center;
       }
+
       .@{menu-prefix-cls}-submenu-popup {
         padding: 12px 0;
       }
@@ -181,6 +185,7 @@
         justify-content: center;
         align-items: center;
       }
+
       .@{menu-prefix-cls}-submenu-collapsed-show-tit {
         flex-direction: column;
       }
@@ -202,7 +207,7 @@
       transition: transform @transition-time @ease-in-out;
     }
 
-    &-vertical &-opened > * > &-submenu-title-icon {
+    &-vertical &-opened>*>&-submenu-title-icon {
       transform: translateY(-50%) rotate(180deg);
     }
 
@@ -210,6 +215,7 @@
       &-nested {
         padding-left: 20px;
       }
+
       .@{menu-prefix-cls}-item {
         padding-left: 43px;
       }
@@ -223,13 +229,15 @@
 
         .light-border();
       }
+
       &-active.@{menu-prefix-cls}-submenu {
         color: @primary-color;
       }
     }
 
     &-light&-vertical&-collapse {
-      > li.@{menu-prefix-cls}-item-active,
+
+      >li.@{menu-prefix-cls}-item-active,
       .@{menu-prefix-cls}-submenu-active {
         position: relative;
         background-color: fade(@primary-color, 5);
@@ -253,8 +261,9 @@
     &-dark&-vertical &-item,
     &-dark&-vertical &-submenu-title {
       color: @menu-dark-subsidiary-color;
+
       &-active:not(.@{menu-prefix-cls}-submenu) {
-        color: #fff !important;
+        color: #fff; //sjl 之前有这个!important
         background-color: @primary-color !important;
       }
 
@@ -264,10 +273,11 @@
     }
 
     &-dark&-vertical&-collapse {
-      > li.@{menu-prefix-cls}-item-active,
+
+      >li.@{menu-prefix-cls}-item-active,
       .@{menu-prefix-cls}-submenu-active {
         position: relative;
-        color: #fff !important;
+        color: #fff; //sjl 之前有这个!important
         background-color: @sider-dark-darken-bg-color !important;
 
         &::before {
@@ -287,6 +297,7 @@
     }
 
     &-dark&-vertical &-submenu &-item {
+
       &-active,
       &-active:hover {
         color: #fff;
@@ -294,7 +305,7 @@
       }
     }
 
-    &-dark&-vertical &-child-item-active > &-submenu-title {
+    &-dark&-vertical &-child-item-active>&-submenu-title {
       color: #fff;
     }
 
@@ -306,4 +317,4 @@
       }
     }
   }
-}
+}

BIN
src/menuBg.jpg


+ 4 - 3
src/settings/designSetting.ts

@@ -19,7 +19,7 @@ export const APP_PRESET_COLOR_LIST: string[] = [
 
 // header preset color
 export const HEADER_PRESET_BG_COLOR_LIST: string[] = [
-  '#ffffff',
+  '#0671DD',//ffffff
   '#151515',
   '#009688',
   '#5172DC',
@@ -30,14 +30,15 @@ export const HEADER_PRESET_BG_COLOR_LIST: string[] = [
   '#394664',
   '#001529',
   '#383f45',
+  '#0671DD',
 ];
 
 // sider preset color
 export const SIDE_BAR_BG_COLOR_LIST: string[] = [
   '#001529',
   '#212121',
-  '#273352',
-  '#ffffff',
+  '#41567c',//273352
+  '#41567c',//ffffff//324166
   '#191b24',
   '#191a23',
   '#304156',

+ 3 - 3
src/settings/projectSetting.ts

@@ -93,15 +93,15 @@ const setting: ProjectConfig = {
     // Whether to show dom
     hidden: false,
     // Menu width
-    menuWidth: 210,
+    menuWidth: 170,//210
     // Menu mode
     mode: MenuModeEnum.INLINE,
     // Menu type
-    type: MenuTypeEnum.SIDEBAR,
+    type: MenuTypeEnum.MIX,//MIX_SIDEBAR,//TOP_MENU,//SIDEBAR
     // Menu theme
     theme: ThemeEnum.DARK,
     // Split menu
-    split: false,
+    split: true,//
     // Top menu layout
     topMenuAlign: 'center',
     // Fold trigger position

+ 1 - 1
src/views/resource/plat/index.vue

@@ -14,7 +14,7 @@
     </div>
     <Tabs>
       <template v-for="item in  achieveList " :key="item.type">
-        <TabPane :tab="[`${item.typeName}成果(${item.count})`]">
+        <TabPane :tab="[`${item.typeName}资源(${item.count})`]">
           <component :is="item.type == 'MR'?'MapData':'FileData'" :listData="item.items" :numb="1" />
           <!-- <MapData v-if="item.type == 'MR'" :listData="item.items" /> -->
           <!-- <FileData v-if="item.type == 'DR'" :listData="item.items" /> -->

+ 4 - 0
src/views/systemAdmin/system/account/AccountModal.vue

@@ -44,6 +44,8 @@ import { PlusOutlined } from '@ant-design/icons-vue';
 import { useDrawer } from '/@/components/Drawer';
 import RoleDrawer from '../role/RoleDrawer.vue';
 import { v4 as uuidv4 } from 'uuid';
+import md5 from 'js-md5';
+
 
 export default defineComponent({
   name: 'AccountModal',
@@ -161,6 +163,8 @@ export default defineComponent({
         const values = await validate(['loginName', 'userName', 'pwd', 'mobile', 'sex', 'sszw', 'ssgw', 'userjs']);
         Object.assign(postData, values);
         postData.userid = uuidv4();
+        postData.loginName = postData.loginName.toUpperCase();
+        postData.pwd = md5(postData.pwd)
         await SaveOrUpdateUserInfo(postData as any, unref(isUpdate));
         closeModal();
         emit('success');