瀏覽代碼

底部菜单

CzRger 1 年之前
父節點
當前提交
ea4e40fcdb
共有 44 個文件被更改,包括 606 次插入1032 次删除
  1. 6 6
      src/api/request.ts
  2. 二進制
      src/assets/images/layout/background.png
  3. 二進制
      src/assets/images/layout/background_home.png
  4. 二進制
      src/assets/images/layout/head-bg.png
  5. 二進制
      src/assets/images/layout/head-com-avatar.png
  6. 二進制
      src/assets/images/layout/head-com-bg.png
  7. 二進制
      src/assets/images/layout/head-com-dropdown.png
  8. 二進制
      src/assets/images/layout/head-com-info-center.png
  9. 二進制
      src/assets/images/layout/head-com-search.png
  10. 二進制
      src/assets/images/layout/layout_bg.png
  11. 二進制
      src/assets/images/layout/logo_icon.png
  12. 二進制
      src/assets/images/layout/logo_name.png
  13. 二進制
      src/assets/images/layout/menu-active-special.png
  14. 二進制
      src/assets/images/layout/menu-bg-special.png
  15. 二進制
      src/assets/images/layout/menu-item-bg-active.png
  16. 二進制
      src/assets/images/layout/menu-item-bg.png
  17. 二進制
      src/assets/images/layout/menu-top-title.png
  18. 二進制
      src/assets/images/layout/menu_bg.png
  19. 二進制
      src/assets/images/layout/menu_icon-1.png
  20. 二進制
      src/assets/images/layout/menu_icon-2.png
  21. 0 47
      src/components/vue-count-to/requestAnimationFrame.js
  22. 0 202
      src/components/vue-count-to/vue-countTo.vue
  23. 10 101
      src/layout/header/head-com.vue
  24. 0 146
      src/layout/header/navigation.vue
  25. 72 161
      src/layout/index.vue
  26. 30 101
      src/layout/menu/menu.vue
  27. 9 12
      src/router/index.ts
  28. 0 251
      src/router/modules/demo.ts
  29. 20 0
      src/router/modules/staging.ts
  30. 115 0
      src/router/modules/system.ts
  31. 2 3
      src/store/modules/app.ts
  32. 二進制
      src/style/PangMenZhengDao.ttf
  33. 4 0
      src/style/font.scss
  34. 1 0
      src/style/index.scss
  35. 4 2
      src/views/global/login.vue
  36. 37 0
      src/views/staging/index.vue
  37. 37 0
      src/views/system/daily-manage/index.vue
  38. 37 0
      src/views/system/dict-manage/index.vue
  39. 37 0
      src/views/system/login-log/index.vue
  40. 37 0
      src/views/system/notice-announcement/index.vue
  41. 37 0
      src/views/system/operation-records/index.vue
  42. 37 0
      src/views/system/public-configuration/index.vue
  43. 37 0
      src/views/system/sign-manage/index.vue
  44. 37 0
      src/views/system/weekly-manage/index.vue

+ 6 - 6
src/api/request.ts

@@ -26,8 +26,8 @@ export class HttpRequest {
       }
       this.axios.get(paramUrl, {
         headers: {
-          sessionToken: localStorage.getItem('sc_token'),
-          Authorization: localStorage.getItem('sc_token')
+          sessionToken: sessionStorage.getItem('sg_token'),
+          Authorization: sessionStorage.getItem('sg_token')
         },
         ...config
       }).then((res: any) => {
@@ -41,8 +41,8 @@ export class HttpRequest {
     return new Promise((resolve, reject) => {
       this.axios.post(url, params, {
         headers: {
-          sessionToken: localStorage.getItem('sc_token'),
-          Authorization: localStorage.getItem('sc_token'),
+          sessionToken: sessionStorage.getItem('sg_token'),
+          Authorization: sessionStorage.getItem('sg_token'),
         },
         ...config
       }).then((res: any) => {
@@ -71,8 +71,8 @@ export class HttpRequest {
       }
       this.axios.get(paramUrl, {
         headers: {
-          sessionToken: localStorage.getItem('sc_token'),
-          Authorization: localStorage.getItem('sc_token'),
+          sessionToken: sessionStorage.getItem('sg_token'),
+          Authorization: sessionStorage.getItem('sg_token'),
         },
         responseType: 'arraybuffer',
         ...config

二進制
src/assets/images/layout/background.png


二進制
src/assets/images/layout/background_home.png


二進制
src/assets/images/layout/head-bg.png


二進制
src/assets/images/layout/head-com-avatar.png


二進制
src/assets/images/layout/head-com-bg.png


二進制
src/assets/images/layout/head-com-dropdown.png


二進制
src/assets/images/layout/head-com-info-center.png


二進制
src/assets/images/layout/head-com-search.png


二進制
src/assets/images/layout/layout_bg.png


二進制
src/assets/images/layout/logo_icon.png


二進制
src/assets/images/layout/logo_name.png


二進制
src/assets/images/layout/menu-active-special.png


二進制
src/assets/images/layout/menu-bg-special.png


二進制
src/assets/images/layout/menu-item-bg-active.png


二進制
src/assets/images/layout/menu-item-bg.png


二進制
src/assets/images/layout/menu-top-title.png


二進制
src/assets/images/layout/menu_bg.png


二進制
src/assets/images/layout/menu_icon-1.png


二進制
src/assets/images/layout/menu_icon-2.png


+ 0 - 47
src/components/vue-count-to/requestAnimationFrame.js

@@ -1,47 +0,0 @@
-let lastTime = 0
-const prefixes = 'webkit moz ms o'.split(' ') // 各浏览器前缀
-
-let requestAnimationFrame
-let cancelAnimationFrame
-
-// 判断是否是服务器环境
-const isServer = typeof window === 'undefined'
-if (isServer) {
-  requestAnimationFrame = function() {
-    return
-  }
-  cancelAnimationFrame = function() {
-    return
-  }
-} else {
-  requestAnimationFrame = window.requestAnimationFrame
-  cancelAnimationFrame = window.cancelAnimationFrame
-  let prefix
-  // 通过遍历各浏览器前缀,来得到requestAnimationFrame和cancelAnimationFrame在当前浏览器的实现形式
-  for (let i = 0; i < prefixes.length; i++) {
-    if (requestAnimationFrame && cancelAnimationFrame) { break }
-    prefix = prefixes[i]
-    requestAnimationFrame = requestAnimationFrame || window[prefix + 'RequestAnimationFrame']
-    cancelAnimationFrame = cancelAnimationFrame || window[prefix + 'CancelAnimationFrame'] || window[prefix + 'CancelRequestAnimationFrame']
-  }
-
-  // 如果当前浏览器不支持requestAnimationFrame和cancelAnimationFrame,则会退到setTimeout
-  if (!requestAnimationFrame || !cancelAnimationFrame) {
-    requestAnimationFrame = function(callback) {
-      const currTime = new Date().getTime()
-      // 为了使setTimteout的尽可能的接近每秒60帧的效果
-      const timeToCall = Math.max(0, 16 - (currTime - lastTime))
-      const id = window.setTimeout(() => {
-        callback(currTime + timeToCall)
-      }, timeToCall)
-      lastTime = currTime + timeToCall
-      return id
-    }
-
-    cancelAnimationFrame = function(id) {
-      window.clearTimeout(id)
-    }
-  }
-}
-
-export { requestAnimationFrame, cancelAnimationFrame }

+ 0 - 202
src/components/vue-count-to/vue-countTo.vue

@@ -1,202 +0,0 @@
-<template>
-  {{ state.displayValue }}
-</template>
-
-<script setup>  // vue3.2新的语法糖, 编写代码更加简洁高效
-import { onMounted, onUnmounted, reactive } from "@vue/runtime-core";
-import { watch, computed } from 'vue';
-import { requestAnimationFrame, cancelAnimationFrame } from './requestAnimationFrame.js'
-// 定义父组件传递的参数
-const props = defineProps({
-  startVal: {
-    type: Number,
-    required: false,
-    default: 0
-  },
-  endVal: {
-    type: Number,
-    required: false,
-    default: 2021
-  },
-  duration: {
-    type: Number,
-    required: false,
-    default: 5000
-  },
-  autoPlay: {
-    type: Boolean,
-    required: false,
-    default: true
-  },
-  decimals: {
-    type: Number,
-    required: false,
-    default: 0,
-    validator (value) {
-      return value >= 0
-    }
-  },
-  decimal: {
-    type: String,
-    required: false,
-    default: '.'
-  },
-  separator: {
-    type: String,
-    required: false,
-    default: ','
-  },
-  prefix: {
-    type: String,
-    required: false,
-    default: ''
-  },
-  suffix: {
-    type: String,
-    required: false,
-    default: ''
-  },
-  useEasing: {
-    type: Boolean,
-    required: false,
-    default: true
-  },
-  easingFn: {
-    type: Function,
-    default(t, b, c, d) {
-      return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
-    }
-  }
-})
-
-const isNumber = (val) => {
-  return !isNaN(parseFloat(val))
-}
-
-// 格式化数据,返回想要展示的数据格式
-const formatNumber = (val) => {
-  val = val.toFixed(props.default)
-  val += ''
-  const x = val.split('.')
-  let x1 = x[0]
-  const x2 = x.length > 1 ? props.decimal + x[1] : ''
-  const rgx = /(\d+)(\d{3})/
-  if (props.separator && !isNumber(props.separator)) {
-    while (rgx.test(x1)) {
-      x1 = x1.replace(rgx, '$1' + props.separator + '$2')
-    }
-  }
-  return props.prefix + x1 + x2 + props.suffix
-}
-
-// 相当于vue2中的data中所定义的变量部分
-const state = reactive({
-  localStart: props.startVal,
-  displayValue: formatNumber(props.startVal),
-  printVal: null,
-  paused: false,
-  localDuration: props.duration,
-  startTime: null,
-  timestamp: null,
-  remaining: null,
-  rAF: null
-})
-
-// 定义一个计算属性,当开始数字大于结束数字时返回true
-const stopCount = computed(() => {
-  return props.startVal > props.endVal
-})
-// 定义父组件的自定义事件,子组件以触发父组件的自定义事件
-const emits = defineEmits(['onMountedcallback', 'callback'])
-
-const startCount = () => {
-  state.localStart = props.startVal
-  state.startTime = null
-  state.localDuration = props.duration
-  state.paused = false
-  state.rAF = requestAnimationFrame(count)
-}
-
-watch(() => props.startVal, () => {
-  if (props.autoPlay) {
-    startCount()
-  }
-})
-
-watch(() => props.endVal, () => {
-  if (props.autoPlay) {
-    startCount()
-  }
-})
-// dom挂在完成后执行一些操作
-onMounted(() => {
-  if (props.autoPlay) {
-    startCount()
-  }
-  emits('onMountedcallback')
-})
-// 暂停计数
-const pause = () => {
-  cancelAnimationFrame(state.rAF)
-}
-// 恢复计数
-const resume = () => {
-  state.startTime = null
-  state.localDuration = +state.remaining
-  state.localStart = +state.printVal
-  requestAnimationFrame(count)
-}
-
-const pauseResume = () => {
-  if (state.paused) {
-    resume()
-    state.paused = false
-  } else {
-    pause()
-    state.paused = true
-  }
-}
-
-const reset = () => {
-  state.startTime = null
-  cancelAnimationFrame(state.rAF)
-  state.displayValue = formatNumber(props.startVal)
-}
-
-const count = (timestamp) => {
-  if (!state.startTime) state.startTime = timestamp
-  state.timestamp = timestamp
-  const progress = timestamp - state.startTime
-  state.remaining = state.localDuration - progress
-  // 是否使用速度变化曲线
-  if (props.useEasing) {
-    if (stopCount.value) {
-      state.printVal = state.localStart - props.easingFn(progress, 0, state.localStart - props.endVal, state.localDuration)
-    } else {
-      state.printVal = props.easingFn(progress, state.localStart, props.endVal - state.localStart, state.localDuration)
-    }
-  } else {
-    if (stopCount.value) {
-      state.printVal = state.localStart - ((state.localStart - props.endVal) * (progress / state.localDuration))
-    } else {
-      state.printVal = state.localStart + (props.endVal - state.localStart) * (progress / state.localDuration)
-    }
-  }
-  if (stopCount.value) {
-    state.printVal = state.printVal < props.endVal ? props.endVal : state.printVal
-  } else {
-    state.printVal = state.printVal > props.endVal ? props.endVal : state.printVal
-  }
-
-  state.displayValue = formatNumber(state.printVal)
-  if (progress < state.localDuration) {
-    state.rAF = requestAnimationFrame(count)
-  } else {
-    emits('callback')
-  }
-}
-// 组件销毁时取消动画
-onUnmounted(() => {
-  cancelAnimationFrame(state.rAF)
-})
-</script>

+ 10 - 101
src/layout/header/head-com.vue

@@ -1,37 +1,9 @@
 <template>
   <div class="head-com">
-    <div class="head-com-content">
-      <div class="hcc-search __hover">
-        <img src="@/assets/images/layout/head-com-search.png"/>
-      </div>
-      <el-divider direction="vertical" style="border-color: #0276e9;"/>
-      <div class="hcc-info-center __hover">
-        <el-badge :value="newInfoCenterNum" :max="99" class="item" :hidden="newInfoCenterNum === 0">
-          <img src="@/assets/images/layout/head-com-info-center.png"/>
-        </el-badge>
-      </div>
-      <div class="hcc-user">
-        <img class="avatar" src="@/assets/images/layout/head-com-avatar.png"/>
-        <el-dropdown>
-          <div class="hcc-user-info __hover">
-            <div class="label">
-              <span class="name">{{$store.state.app.userInfo.nickName}}</span>
-              <span class="dept">{{$store.state.app.userInfo.deptName}}</span>
-            </div>
-            <img src="@/assets/images/layout/head-com-dropdown.png"/>
-          </div>
-          <template #dropdown>
-            <el-dropdown-menu>
-              <el-dropdown-item>Action 1</el-dropdown-item>
-              <el-dropdown-item>Action 2</el-dropdown-item>
-              <el-dropdown-item>Action 3</el-dropdown-item>
-              <el-dropdown-item disabled>Action 4</el-dropdown-item>
-              <el-dropdown-item divided>Action 5</el-dropdown-item>
-            </el-dropdown-menu>
-          </template>
-        </el-dropdown>
-      </div>
+    <div class="head-com-left">
+      <CusEllipsis :value="dutyPeopleCpt"/>
     </div>
+    <div class="head-com-right"></div>
   </div>
 </template>
 
@@ -60,10 +32,15 @@ export default defineComponent({
     const route = useRoute();
     const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
     const state = reactive({
-      newInfoCenterNum: 88
+    })
+    const dutyPeopleCpt = computed(() => {
+      let str = ''
+      str += '值班厅领导:XXX     总值班:XXX    带班领导:XXX    值班员:XXX、XXX、XXX'
+      return str
     })
     return {
-      ...toRefs(state)
+      ...toRefs(state),
+      dutyPeopleCpt
     }
   },
 })
@@ -71,76 +48,8 @@ export default defineComponent({
 
 <style scoped lang="scss">
   .head-com {
-    background-image: url("@/assets/images/layout/head-com-bg.png");
-    background-position-x: left;
-    background-position-y: bottom;
-    background-repeat: no-repeat;
-    width: 331px;
-    height: 48px;
-    display: flex;
-    align-items: flex-end;
     position: absolute;
     top: 0;
     right: 0;
-    .head-com-content {
-      width: 100%;
-      height: 40px;
-      display: flex;
-      align-items: center;
-      .el-divider {
-        margin: 0;
-      }
-      .hcc-search {
-        width: 20px;
-        height: 20px;
-        margin-left: 30px;
-        margin-right: 18px;
-        >img {
-          width: 100%;
-          height: 100%;
-        }
-      }
-      .hcc-info-center {
-        margin-left: 14px;
-        width: 18px;
-        height: 20px;
-        :deep(.el-badge__content) {
-          height: 16px;
-          top: 7px;
-          right: 8px;
-          border: none;
-        }
-      }
-      .hcc-user {
-        display: flex;
-        align-items: center;
-        margin-left: auto;
-        margin-right: 7px;
-        .avatar {
-          width: 25px;
-          height: 25px;
-          margin-right: 30px;
-        }
-        .hcc-user-info {
-          display: flex;
-          align-items: center;
-          .label {
-            display: flex;
-            flex-direction: column;
-            font-family: Microsoft YaHei;
-            font-weight: 400;
-            color: #FFFFFF;
-            text-shadow: 0px 1px 2px rgba(41,111,208,0.2);
-            margin-right: 13px;
-            .name {
-              font-size: 14px;
-            }
-            .dept {
-              font-size: 12px;
-            }
-          }
-        }
-      }
-    }
   }
 </style>

+ 0 - 146
src/layout/header/navigation.vue

@@ -1,146 +0,0 @@
-<template>
-  <div class="navigation-main">
-    <div class="list" ref="ref_list">
-      <template v-for="(item, index) in $store.state.menu.navigations">
-        <div class="navigation __hover" :class="{active: item.name === $route.name}" :style="`transform: translateX(${-8 * index}px);`" @click="toNavigation(item, index)">
-          <div class="title">{{item.title}}</div>
-          <SvgIcon class="close" name="close_1" @click.stop="closeNavigation(item, index)"/>
-        </div>
-      </template>
-    </div>
-  </div>
-</template>
-
-<script lang="ts">
-import {
-  defineComponent,
-  computed,
-  onMounted,
-  ref,
-  reactive,
-  watch,
-  getCurrentInstance,
-  ComponentInternalInstance,
-  toRefs,
-  nextTick
-} from 'vue'
-import {useStore} from 'vuex'
-import {useRouter, useRoute} from 'vue-router'
-
-export default defineComponent({
-  name: '',
-  components: {},
-  setup() {
-    const store = useStore();
-    const router = useRouter();
-    const route = useRoute();
-    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
-    const state = reactive({})
-    const ref_list = ref()
-    const closeNavigation = (item: any, index: number) => {
-      if (item.name === route.name) {
-        const len = store.state.menu.navigations?.length
-        if (len === 1) {
-          router.push({
-            name: store.state.menu.homeRouterName
-          })
-        } else if (index === len - 1) {
-          router.push({
-            name: store.state.menu.navigations[index - 1].name
-          })
-        } else {
-          router.push({
-            name: store.state.menu.navigations[index + 1].name
-          })
-        }
-      }
-      store.dispatch('menu/LOAD_NAVIGATION_DEL', item.name)
-    }
-    const toNavigation = (item: any, index: number) => {
-      autoScroll(index)
-      router.push({name: item.name})
-    }
-    const autoScroll = (index: number) => {
-      const el = ref_list.value.children[index]
-      const relaLeft = el.offsetLeft - el.parentNode.offsetLeft
-      ref_list.value.scrollTo({
-        left: relaLeft - ref_list.value.clientWidth / 2,
-        behavior: "smooth",
-      })
-    }
-    const initScroll = () => {
-      let index = 0
-      store.state.menu.navigations.forEach((v: any, i: number) => {
-        if (v.name === route.name) {
-          index = i
-        }
-      })
-      autoScroll(index)
-    }
-    watch(() => [store.state.menu.navigations, route], (n: any) => {
-      initScroll()
-    }, {deep: true})
-    onMounted(() => {
-      initScroll()
-    })
-    return {
-      ...toRefs(state),
-      closeNavigation,
-      toNavigation,
-      ref_list
-    }
-  },
-})
-</script>
-
-<style scoped lang="scss">
-  .navigation-main {
-    margin: 10px 0 0 10px;
-    width: 100%;
-    .list {
-      width: 100%;
-      height: 32px;
-      display: flex;
-      align-items: flex-end;
-      overflow-x: auto;
-      &::-webkit-scrollbar { width: 0px; height: 0px; }
-      .navigation {
-        height: 28px;
-        box-sizing: border-box;
-        padding: 0 18px;
-        background-color: #0062E9;
-        clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        font-size: 12px;
-        font-family: Microsoft YaHei;
-        font-weight: 400;
-        color: #FFFFFF;
-        white-space: nowrap;
-        line-height: 1;
-        &:first-child {
-          clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
-        }
-        &.active {
-          font-size: 14px;
-          color: #333333;
-          height: 100%;
-          background-color: #FFFFFF;
-          border-radius: 2px 2px 0 0;
-          z-index: 2;
-        }
-        .title {
-          min-width: 48px;
-          text-align: center;
-          padding-bottom: 2px;
-        }
-        .close {
-          margin-left: 14px;
-          width: 10px;
-          height: 10px;
-        }
-      }
-    }
-  }
-</style>

+ 72 - 161
src/layout/index.vue

@@ -1,43 +1,60 @@
 <template>
-  <template v-if="isSpecial">
-    <div class="layout-special">
-      <div class="layout-head-title">
-        <div class="lh-logo __hover" @click="goIndexPage">
-          <img class="lh-logo-icon" src="@/assets/images/layout/logo_icon.png"/>
-          <div class="lh-logo-title">综合态势防控平台</div>
-        </div>
-        <SvgIcon name="arrow_1" color="#ffffff" size="20" class="lh-expend __hover" :class="{not: !$store.state.menu.menuExpend}" @click="$store.dispatch('menu/LOAD_SWITCH_MENU_EXPEND')"/>
-      </div>
-      <MenuCom class="menu" :isSpecial="isSpecial" v-if="$store.state.menu.menuExpend"/>
-      <HeadCom class="head"/>
-      <RouterViewCom class="content"/>
+  <div class="layout">
+    <div class="layout-head">
+      <HeadCom/>
     </div>
-  </template>
-  <template v-else>
-    <div class="layout">
-      <div class="layout-head">
-        <div class="bg"/>
-        <div class="layout-head-title">
-          <div class="lh-logo __hover" @click="goIndexPage">
-            <img class="lh-logo-icon" src="@/assets/images/layout/logo_icon.png"/>
-            <div class="lh-logo-title">综合态势防控平台</div>
-          </div>
-          <SvgIcon name="arrow_1" color="#ffffff" size="20" class="lh-expend __hover" :class="{not: !$store.state.menu.menuExpend}" @click="$store.dispatch('menu/LOAD_SWITCH_MENU_EXPEND')"/>
-        </div>
-        <MenuCom class="menu" :isSpecial="isSpecial"/>
-        <HeadCom class="head"/>
+    <div class="layout-content">
+      <div class="layout-sub-menu" v-if="hasSubMenu">
+        <SubMenuCom/>
       </div>
-      <div class="layout-bottom">
-        <div class="layout-sub-menu" :class="{expend: $store.state.menu.menuExpend}" v-if="hasSubMenu">
-          <SubMenuCom :isExpend="$store.state.menu.menuExpend"/>
-        </div>
-        <div class="layout-content">
-          <NavigationCom v-if="hasSubMenu"/>
-          <RouterViewCom class="content"/>
-        </div>
+      <div class="layout-content">
+<!--        <NavigationCom v-if="hasSubMenu"/>-->
+<!--        <RouterViewCom class="content"/>-->
       </div>
     </div>
-  </template>
+    <div class="layout-foot">
+      <MenuCom/>
+    </div>
+  </div>
+<!--  <template v-if="isSpecial">-->
+<!--    <div class="layout-special">-->
+<!--      <div class="layout-head-title">-->
+<!--        <div class="lh-logo __hover" @click="goIndexPage">-->
+<!--          <img class="lh-logo-icon" src="@/assets/images/layout/logo_icon.png"/>-->
+<!--          <div class="lh-logo-title">综合态势防控平台</div>-->
+<!--        </div>-->
+<!--        <SvgIcon name="arrow_1" color="#ffffff" size="20" class="lh-expend __hover" :class="{not: !$store.state.menu.menuExpend}" @click="$store.dispatch('menu/LOAD_SWITCH_MENU_EXPEND')"/>-->
+<!--      </div>-->
+<!--      <MenuCom class="menu" :isSpecial="isSpecial" v-if="$store.state.menu.menuExpend"/>-->
+<!--      <HeadCom class="head"/>-->
+<!--      <RouterViewCom class="content"/>-->
+<!--    </div>-->
+<!--  </template>-->
+<!--  <template v-else>-->
+<!--    <div class="layout">-->
+<!--      <div class="layout-head">-->
+<!--        <div class="bg"/>-->
+<!--        <div class="layout-head-title">-->
+<!--          <div class="lh-logo __hover" @click="goIndexPage">-->
+<!--            <img class="lh-logo-icon" src="@/assets/images/layout/logo_icon.png"/>-->
+<!--            <div class="lh-logo-title">综合态势防控平台</div>-->
+<!--          </div>-->
+<!--          <SvgIcon name="arrow_1" color="#ffffff" size="20" class="lh-expend __hover" :class="{not: !$store.state.menu.menuExpend}" @click="$store.dispatch('menu/LOAD_SWITCH_MENU_EXPEND')"/>-->
+<!--        </div>-->
+<!--        <MenuCom class="menu" :isSpecial="isSpecial"/>-->
+<!--        <HeadCom class="head"/>-->
+<!--      </div>-->
+<!--      <div class="layout-bottom">-->
+<!--        <div class="layout-sub-menu" :class="{expend: $store.state.menu.menuExpend}" v-if="hasSubMenu">-->
+<!--          <SubMenuCom :isExpend="$store.state.menu.menuExpend"/>-->
+<!--        </div>-->
+<!--        <div class="layout-content">-->
+<!--          <NavigationCom v-if="hasSubMenu"/>-->
+<!--          <RouterViewCom class="content"/>-->
+<!--        </div>-->
+<!--      </div>-->
+<!--    </div>-->
+<!--  </template>-->
 </template>
 
 <script lang="ts">
@@ -58,12 +75,11 @@ import {useRouter, useRoute} from 'vue-router'
 import RouterViewCom from './router-view.vue'
 import MenuCom from './menu/menu.vue'
 import SubMenuCom from './menu/sub-menu.vue'
-import NavigationCom from './header/navigation.vue'
 import HeadCom from './header/head-com.vue'
 
 export default defineComponent({
   name: '',
-  components: {RouterViewCom, MenuCom, SubMenuCom, NavigationCom, HeadCom},
+  components: {RouterViewCom, MenuCom, SubMenuCom, HeadCom},
   setup() {
     const store = useStore();
     const router = useRouter();
@@ -71,145 +87,40 @@ export default defineComponent({
     const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
     const state = reactive({
     })
-    const goIndexPage = () => {
-      // @ts-ignore
-      window.open(`http://${window.location.hostname}:${window.cusConfig.portalPort}`);
-    }
     const hasSubMenu = computed(() => {
       return store.state.menu.subMenuRouter?.length > 0
           && ![store.state.menu.homeRouterName].includes(route.name as string)
     })
-    const isSpecial = computed(() => {
-      return [store.state.menu.homeRouterName].includes(route.name as string)
-    })
     // 测试切换分支
     return {
       ...toRefs(state),
-      goIndexPage,
       hasSubMenu,
-      isSpecial
     }
   },
 })
 </script>
 
 <style scoped lang="scss">
-  .layout-head-title {
-    background-image: url("@/assets/images/layout/menu-top-title.png");
-    background-repeat: no-repeat;
-    width: 470px;
-    height: 69px;
-    display: flex;
-    align-items: center;
-    z-index: 2;
-    .lh-logo {
-      display: flex;
-      align-items: center;
-      .lh-logo-icon {
-        margin-left: 28px;
-        width: 40px;
-        height: 41px;
-      }
-      .lh-logo-title {
-        font-size: 30px;
-        font-family: Microsoft YaHei;
-        font-weight: bold;
-        color: #FFFFFF;
-        margin-left: 7px;
-        user-select: none;
-        padding-bottom: 2px;
-      }
-    }
-    .lh-expend {
-      width: 18px;
-      height: 16px;
-      margin-left: 41px;
-      margin-top: 28px;
-      transform: rotate(180deg) !important;
-      transition: 0.2s;
-      &.not {
-        transform: rotate(0deg) !important;
-      }
-    }
-  }
-  .layout-special {
+.layout {
+  width: 100%;
+  height: 100vh;
+  background-image: url("@/assets/images/layout/layout_bg.png");
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  position: relative;
+  .layout-head {
     width: 100%;
-    height: 100vh;
-    position: relative;
-    .layout-head-title {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 2;
-    }
-    .menu {
-      position: absolute;
-      z-index: 1;
-      top: 0;
-      left: 429px;
-    }
-    .head {
-      height: 40px;
-      position: absolute;
-      top: 0;
-      right: 0;
-      z-index: 1;
-    }
-    .content {
-      width: 100%;
-      height: 100%;
-      z-index: 1;
-    }
+    height: 70px;
   }
-  .layout {
-    display: flex;
-    flex-direction: column;
-    width: 100%;
-    height: 100vh;
-    $layoutHeadHeight: 69px;
-    background-color: #082e94;
-    .layout-head {
-      width: 100%;
-      height: $layoutHeadHeight;
-      display: flex;
-      align-items: center;
-      .bg {
-        background-image: url("@/assets/images/layout/head-bg.png");
-        background-repeat: no-repeat;
-        background-position-x: right;
-        width: 100%;
-        height: 59px;
-        position: absolute;
-        top: 0;
-        left: 0;
-      }
-      .menu {
-        z-index: 1;
-      }
-      .head {
-        top: 11px;
-      }
-    }
-    .layout-bottom {
-      width: 100%;
-      height: calc(100% - #{$layoutHeadHeight});
-      display: flex;
-      .layout-sub-menu {
-        width: 44px;
-        height: 100%;
-        &.expend {
-          width: 204px;
-        }
-      }
-      .layout-content {
-        flex: 1;
-        overflow: hidden;
-        display: flex;
-        flex-direction: column;
-        .content {
-          flex: 1;
-        }
-      }
-    }
+  .layout-content {
+    flex: 1;
+  }
+  .layout-foot {
+    position: absolute;
+    bottom: 0;
   }
+}
 </style>

+ 30 - 101
src/layout/menu/menu.vue

@@ -1,25 +1,15 @@
 <!--顶部一级菜单-->
 <template>
-  <template v-if="isSpecial">
-    <div class="menu-special">
-      <template v-for="(item, index) in $store.state.menu.allRouters">
-        <div class="menu-item-special __hover" :class="{active: deepRouteName(item)}" @click="toMenu(item)">
+  <div class="menu">
+    <template v-for="(item, index) in $store.state.menu.allRouters">
+      <div class="menu-item __hover" @click="toMenu(item)">
+        <img :src="item.meta.icon"/>
+        <div class="menu-item-title">
           {{item.meta.title}}
         </div>
-      </template>
-    </div>
-  </template>
-  <template v-else>
-    <div class="menu-normal">
-      <template v-for="(item, index) in $store.state.menu.allRouters">
-        <div class="menu-normal-item __hover" :class="{active: deepRouteName(item)}" :style="`width: ${128 + 16 * (item.meta.title.length - 4 > 0 ? item.meta.title.length - 4 : 0)}px;`" @click="toMenu(item)">
-          <div class="menu-normal-item-title">
-            {{item.meta.title}}
-          </div>
-        </div>
-      </template>
-    </div>
-  </template>
+      </div>
+    </template>
+  </div>
 </template>
 
 <script lang="ts">
@@ -42,7 +32,6 @@ export default defineComponent({
   name: '',
   components: {},
   props: {
-    isSpecial: {}
   },
   setup() {
     const store = useStore();
@@ -53,105 +42,45 @@ export default defineComponent({
     })
     const toMenu = (menu: any) => {
       if (!route.matched.some(v => menu.path === v.path)) {
-        const homeRouteName = store.state.menu.homeRouterName
-        if (route.name === homeRouteName || menu.name === homeRouteName) {
-          const to = router.resolve({
-            path: menu.redirect || menu.path,
-          });
-          window.open(to.href, "_blank")
-        } else {
-          router.push({
-            path: menu.redirect || menu.path
-          })
-        }
-      }
-    }
-    const deepRouteName = (item: any) => {
-      let bool = false
-      const deep = (obj: any) => {
-        if (obj.name === route.name) {
-          bool = true
-        }
-        if (obj.children?.length > 0) {
-          obj.children.forEach((v: any) => {
-            deep(v)
-          })
-        }
+        router.push({
+          path: menu.redirect || menu.path
+        })
       }
-      deep(item)
-      return bool
     }
     return {
       ...toRefs(state),
       toMenu,
-      deepRouteName
     }
   },
 })
 </script>
 
 <style scoped lang="scss">
-  .menu-special {
-    height: 42px;
-    background-image: url("@/assets/images/layout/menu-bg-special.png");
-    background-position-x: right;
-    background-position-y: bottom;
+  .menu {
+    width: 1198px;
+    height: 49px;
+    background-image: url("@/assets/images/layout/menu_bg.png");
     background-repeat: no-repeat;
+    background-size: 100% 100%;
     display: flex;
-    align-items: center;
-    align-self: flex-start;
-    font-size: 14px;
-    font-family: Microsoft YaHei;
-    font-weight: 400;
-    color: #ffffff;
-    padding: 0 29px 0 34px;
-    .menu-item-special {
-      padding: 0 16px;
-      &.active {
-        position: relative;
-        font-size: 16px;
-        font-weight: bold;
-        text-shadow: 0px 3px 7px rgba(18,79,188,0.7);
-        &:before {
-          content: '';
-          position: absolute;
-          background-image: url("@/assets/images/layout/menu-active-special.png");
-          background-repeat: no-repeat;
-          background-size: 100%;
-          width: 100%;
-          height: 13px;
-          top: 17px;
-          left: 0;
-        }
-      }
-    }
-  }
-  .menu-normal {
-    display: flex;
-    align-items: center;
-    margin-top: 12px;
-    margin-left: -42px;
-    .menu-normal-item {
-      $menuSkexX: -42deg;
-      background-image: url("@/assets/images/layout/menu-item-bg.png");
-      background-repeat: no-repeat;
-      background-size: 100% 100%;
-      height: 55px;
-      transform: skewX($menuSkexX);
+    justify-content: center;
+    position: relative;
+    .menu-item {
+      height: 26px;
       display: flex;
       align-items: center;
-      justify-content: center;
-      margin-right: -18px;
-      font-size: 16px;
-      font-family: Microsoft YaHei;
-      font-weight: bold;
+      font-family: PangMenZhengDao;
+      font-size: 20px;
+      font-weight: 400;
       color: #FFFFFF;
-      &.active {
-        background-image: url("@/assets/images/layout/menu-item-bg-active.png");
+      position: relative;
+      top: -9px;
+      margin-right: 24px;
+      &:last-child {
+        margin-right: 0;
       }
-      .menu-normal-item-title {
-        transform: skewX(-$menuSkexX);
-        margin-right: 20%;
+      >img {
+        margin-right: 8px;
       }
     }
   }

+ 9 - 12
src/router/index.ts

@@ -4,9 +4,13 @@ import staticRouter from './modules/static'
 import store from '@/store/index'
 import TempCom from '@/views/global/temp.vue'
 import * as api from '@/api/index'
-// import {getRoutes} from '@/api/modules/global/global'
 import RouterViewCom from "@/layout/router-view.vue";
+import {stagingRouterMap, stagingRouter} from './modules/staging'
+import {systemRouterMap, systemRouter} from './modules/system'
+
 export const RoutersMap = new Map([
+  ...stagingRouterMap,
+  ...systemRouterMap,
 ])
 
 const routes = [
@@ -86,18 +90,14 @@ export const toLogin = () => {
 export const initMainRouter = async () => {
     if (sessionStorage.getItem("sg_token") && location.pathname !== '/login') {
         await Promise.all([
-            // getRoutes(),
-            store.dispatch('app/LOAD_USER_INFO'),
             store.dispatch('app/LOAD_USER_INFO'),
-        ]).then(async ([r, u]) => {
-            await store.dispatch('app/LOAD_POWER_DEPT', u.deptId).then(() => {
-                setRouters(r)
-            })
+        ]).then(async ([u]) => {
+            setRouters()
         })
     }
 
 }
-const setRouters = (res: any) => {
+const setRouters = () => {
     const deep = (arr: Array<any>, parentArr: Array<any>) => {
         return arr.map((v, i) => {
             const _pA = [...parentArr, v]
@@ -128,10 +128,7 @@ const setRouters = (res: any) => {
             return item.path
         }
     }
-    const arr = res.data
-    if ((import.meta as any).env.DEV) {
-        arr.unshift(mockRouter)
-    }
+    const arr = [stagingRouter, systemRouter]
     const menuRouters = deep(arr, [])
     //  初始化一级菜单默认重定向地址
     menuRouters.forEach(v => {

+ 0 - 251
src/router/modules/demo.ts

@@ -1,251 +0,0 @@
-const routerMap = new Map([
-  ['f791211f-a318-49a3-9bf4-31148fe15486', {
-    title: '列表-普通',
-    component: () => import('@/views/demo/list/index.vue'),
-  }],
-  ['370980d3-fa42-4354-8d55-ad2190794576', {
-    title: '列表-插槽',
-    component: () => import('@/views/demo/list/slot.vue'),
-  }],
-  ['6fa55e50-d902-4229-96b6-f73aaed7fdef', {
-    title: 'vuex',
-    component: () => import('@/views/demo/vue/vuex/index.vue'),
-  }],
-  ['7a87de2c-3748-459e-9ee0-d9652b998c86', {
-    title: '自定义指令',
-    component: () => import('@/views/demo/vue/directive/index.vue'),
-  }],
-  ['e0b96113-b6be-4a86-8649-6ce8dc3c91af', {
-    title: '父子组件传值',
-    component: () => import('@/views/demo/vue/props/index.vue'),
-  }],
-  ['dd446cda-bd5b-4763-a5e0-21d402084d0d', {
-    title: '跨页面监听',
-    component: () => import('@/views/demo/vue/other/index.vue'),
-  }],
-  ['a013765d-8554-4025-be4d-3bae13873523', {
-    title: '校验',
-    component: () => import('@/views/demo/form/validate.vue'),
-  }],
-  ['276aedd0-7088-4717-ba1f-a100470a0810', {
-    title: '文本',
-    component: () => import('@/views/demo/form/input.vue'),
-  }],
-  ['6a56f662-760a-49f0-b37f-cf21ef647801', {
-    title: '下拉选项',
-    component: () => import('@/views/demo/form/select.vue'),
-  }],
-  ['e298b055-b790-4749-bab0-bce07675a405', {
-    title: '日期',
-    component: () => import('@/views/demo/form/date.vue'),
-  }],
-  ['47b3551f-1180-4907-a941-60dabd75d5ad', {
-    title: '日期时间',
-    component: () => import('@/views/demo/form/datetime.vue'),
-  }],
-  ['c086a656-ae1d-4e80-acae-2db8ccfd27f4', {
-    title: '级联',
-    component: () => import('@/views/demo/form/cascader.vue'),
-  }],
-  ['9f199384-90af-44e7-a2ae-197f7934c6d9', {
-    title: '开关',
-    component: () => import('@/views/demo/form/switch.vue'),
-  }],
-  ['f12c1ce2-5a47-4b7a-9e8f-68995107db1c', {
-    title: '单选',
-    component: () => import('@/views/demo/form/radio.vue'),
-  }],
-  ['228f885d-9008-4d33-bacd-3c74ec10802e', {
-    title: '多选',
-    component: () => import('@/views/demo/form/checkbox.vue'),
-  }],
-  ['d10a1da0-6e09-4da3-a865-00c09ba3531d', {
-    title: '特殊预设',
-    component: () => import('@/views/demo/form/special.vue'),
-  }],
-  ['05462233-931a-4c26-834b-05615c532ee8', {
-    title: '上传',
-    component: () => import('@/views/demo/form/upload.vue'),
-  }],
-  ['503a0f03-00cf-4441-9f33-540c1cf36dd1', {
-    title: '海康视频插件',
-    component: () => import('@/views/demo/hk/index.vue'),
-  }],
-  ['20cd9b7e-543e-4c43-9086-34bf0b7db4a5', {
-    title: '弹窗',
-    component: () => import('@/views/demo/dialog/index.vue'),
-  }],
-])
-
-export const mockRouter: any = {
-  menuCode: '0e0cf907-2e94-464d-b465-9c1b7906462c',
-  path: 'demo',
-  meta: {
-    title: '示例'
-  },
-  children: [
-    {
-      menuCode: 'c75ffaec-49e6-4b5c-a9e0-e5c2658632c5',
-      path: 'list',
-      meta: {
-        title: '列表'
-      },
-      children: [
-        {
-          menuCode: 'f791211f-a318-49a3-9bf4-31148fe15486',
-          path: 'normal',
-          meta: {
-            title: '普通'
-          },
-        },
-        {
-          menuCode: '370980d3-fa42-4354-8d55-ad2190794576',
-          path: 'slot',
-          meta: {
-            title: '插槽'
-          },
-        },
-      ]
-    },
-    {
-      menuCode: '2c474b09-64b5-4c91-abb2-37af95dd04dd',
-      path: 'vue',
-      meta: {
-        title: 'vue'
-      },
-      children: [
-        {
-          menuCode: '6fa55e50-d902-4229-96b6-f73aaed7fdef',
-          path: 'vuex',
-          meta: {
-            title: 'vuex'
-          },
-        },
-        {
-          menuCode: '7a87de2c-3748-459e-9ee0-d9652b998c86',
-          path: 'directive',
-          meta: {
-            title: '自定义指令'
-          },
-        },
-        {
-          menuCode: 'e0b96113-b6be-4a86-8649-6ce8dc3c91af',
-          path: 'props',
-          meta: {
-            title: '父子组件传值'
-          },
-        },
-        {
-          menuCode: 'dd446cda-bd5b-4763-a5e0-21d402084d0d',
-          path: 'other',
-          meta: {
-            title: '跨页面监听'
-          },
-        },
-      ]
-    },
-    {
-      menuCode: 'db68540b-0e6d-4fc2-8ed6-f58ded023cf2',
-      path: 'form',
-      meta: {
-        title: '表单'
-      },
-      children: [
-        {
-          menuCode: 'a013765d-8554-4025-be4d-3bae13873523',
-          path: 'validate',
-          meta: {
-            title: '校验'
-          },
-        },
-        {
-          menuCode: '276aedd0-7088-4717-ba1f-a100470a0810',
-          path: 'input',
-          meta: {
-            title: '文本'
-          },
-        },
-        {
-          menuCode: '6a56f662-760a-49f0-b37f-cf21ef647801',
-          path: 'select',
-          meta: {
-            title: '下拉选项'
-          },
-        },
-        {
-          menuCode: 'e298b055-b790-4749-bab0-bce07675a405',
-          path: 'date',
-          meta: {
-            title: '日期'
-          },
-        },
-        {
-          menuCode: '47b3551f-1180-4907-a941-60dabd75d5ad',
-          path: 'datetime',
-          meta: {
-            title: '日期时间'
-          },
-        },
-        {
-          menuCode: 'c086a656-ae1d-4e80-acae-2db8ccfd27f4',
-          path: 'cascader',
-          meta: {
-            title: '级联'
-          },
-        },
-        {
-          menuCode: '9f199384-90af-44e7-a2ae-197f7934c6d9',
-          path: 'switch',
-          meta: {
-            title: '开关'
-          },
-        },
-        {
-          menuCode: 'f12c1ce2-5a47-4b7a-9e8f-68995107db1c',
-          path: 'radio',
-          meta: {
-            title: '单选'
-          },
-        },
-        {
-          menuCode: '228f885d-9008-4d33-bacd-3c74ec10802e',
-          path: 'checkbox',
-          meta: {
-            title: '多选'
-          },
-        },
-        {
-          menuCode: 'd10a1da0-6e09-4da3-a865-00c09ba3531d',
-          path: 'special',
-          meta: {
-            title: '特殊预设'
-          },
-        },
-        {
-          menuCode: '05462233-931a-4c26-834b-05615c532ee8',
-          path: 'upload',
-          meta: {
-            title: '上传'
-          },
-        },
-      ]
-    },
-    {
-      menuCode: '503a0f03-00cf-4441-9f33-540c1cf36dd1',
-      path: 'hk',
-      meta: {
-        title: '海康视频插件'
-      }
-    },
-    {
-      menuCode: '20cd9b7e-543e-4c43-9086-34bf0b7db4a5',
-      path: 'dialog',
-      meta: {
-        title: '弹窗'
-      }
-    }
-  ]
-}
-
-// @ts-ignore
-export default routerMap

+ 20 - 0
src/router/modules/staging.ts

@@ -0,0 +1,20 @@
+// @ts-ignore
+import MenuIcon from '@/assets/images/layout/menu_icon-1.png'
+
+export const stagingRouterMap = new Map([
+  ['9e53ea05-1709-44e7-8107-d0f4492932bf', {
+    title: '工作台',
+    component: () => import('@/views/staging/index.vue'),
+  }],
+])
+
+export const stagingRouter: any = {
+  menuCode: '9e53ea05-1709-44e7-8107-d0f4492932bf',
+  path: 'staging',
+  meta: {
+    title: '工作台',
+    icon: MenuIcon
+  },
+  children: [
+  ]
+}

+ 115 - 0
src/router/modules/system.ts

@@ -0,0 +1,115 @@
+// @ts-ignore
+import MenuIcon from '@/assets/images/layout/menu_icon-2.png'
+
+export const systemRouterMap = new Map([
+  ['6ef6834c-ffa6-4d38-b5e8-9acd6ee37aad', {
+    title: '席位管理',
+    component: () => import('@/views/system/seat-manage/index.vue'),
+  }],
+  ['7d1096ea-871a-4ab6-9909-29cce6c399fa', {
+    title: '签卡管理',
+    component: () => import('@/views/system/sign-manage/index.vue'),
+  }],
+  ['271b733b-f08c-4628-bc98-eae5a40887da', {
+    title: '日志管理',
+    component: () => import('@/views/system/daily-manage/index.vue'),
+  }],
+  ['258df2a8-c2db-4fc6-9f9e-3845b58b9dd3', {
+    title: '周报管理',
+    component: () => import('@/views/system/weekly-manage/index.vue'),
+  }],
+  ['fc9664b6-69f3-4dc8-bedb-a391fdc3a0db', {
+    title: '通知公告',
+    component: () => import('@/views/system/notice-announcement/index.vue'),
+  }],
+  ['bef4db9b-4878-4913-95dc-5fe0cbfff8d2', {
+    title: '公共配置',
+    component: () => import('@/views/system/public-configuration/index.vue'),
+  }],
+  ['375eaf76-049c-46a4-90c5-5d42ecc3f27c', {
+    title: '字典管理',
+    component: () => import('@/views/system/dict-manage/index.vue'),
+  }],
+  ['59848b4b-3ef3-4fa6-be81-6944a663d084', {
+    title: '登录日志',
+    component: () => import('@/views/system/login-log/index.vue'),
+  }],
+  ['a54c0986-4de8-46f4-88cc-94903f103bf9', {
+    title: '操作记录',
+    component: () => import('@/views/system/operation-records/index.vue'),
+  }],
+])
+
+export const systemRouter: any = {
+  menuCode: '2c8f8412-68de-4212-9c72-e117c6ac05ed',
+  path: 'system',
+  meta: {
+    title: '后台管理',
+    icon: MenuIcon
+  },
+  children: [
+    {
+      menuCode: '6ef6834c-ffa6-4d38-b5e8-9acd6ee37aad',
+      path: 'seat',
+      meta: {
+        title: '席位管理'
+      },
+    },
+    {
+      menuCode: '7d1096ea-871a-4ab6-9909-29cce6c399fa',
+      path: 'sign',
+      meta: {
+        title: '签卡管理'
+      },
+    },
+    {
+      menuCode: '271b733b-f08c-4628-bc98-eae5a40887da',
+      path: 'daily',
+      meta: {
+        title: '日志管理'
+      },
+    },
+    {
+      menuCode: '258df2a8-c2db-4fc6-9f9e-3845b58b9dd3',
+      path: 'weekly',
+      meta: {
+        title: '周报管理'
+      },
+    },
+    {
+      menuCode: 'fc9664b6-69f3-4dc8-bedb-a391fdc3a0db',
+      path: 'notice',
+      meta: {
+        title: '通知公告'
+      },
+    },
+    {
+      menuCode: 'bef4db9b-4878-4913-95dc-5fe0cbfff8d2',
+      path: 'config',
+      meta: {
+        title: '公共配置'
+      },
+    },
+    {
+      menuCode: '375eaf76-049c-46a4-90c5-5d42ecc3f27c',
+      path: 'dict',
+      meta: {
+        title: '字典管理'
+      },
+    },
+    {
+      menuCode: '59848b4b-3ef3-4fa6-be81-6944a663d084',
+      path: 'login-log',
+      meta: {
+        title: '登录日志'
+      },
+    },
+    {
+      menuCode: 'a54c0986-4de8-46f4-88cc-94903f103bf9',
+      path: 'operation',
+      meta: {
+        title: '操作记录'
+      },
+    },
+  ]
+}

+ 2 - 3
src/store/modules/app.ts

@@ -22,9 +22,8 @@ const actions = {
 		return new Promise((resolve, reject) => {
 			if (refresh || !state.userInfo?.userId) {
 				getUserInfo().then((res: any) => {
-					if (res.code === 200) {
-						commit('SET_USER_INFO', res.user)
-						commit('SET_PERMISSIONS', res.permissions)
+					if (res.code === 0) {
+						commit('SET_USER_INFO', res.userInfo)
 						resolve(state.userInfo)
 					} else {
 						reject(res.msg)

二進制
src/style/PangMenZhengDao.ttf


+ 4 - 0
src/style/font.scss

@@ -0,0 +1,4 @@
+@font-face {
+  font-family: PangMenZhengDao;
+  src: url("@/style/PangMenZhengDao.ttf");
+}

+ 1 - 0
src/style/index.scss

@@ -1,5 +1,6 @@
 @import './webkit-scrollbar';
 @import './cus';
+@import './font';
 
 * {
   outline: none;  // dom元素选中带边框

+ 4 - 2
src/views/global/login.vue

@@ -76,8 +76,10 @@ export default defineComponent({
           that.$api.login(state.form).then(res => {
             if (res.code === 0) {
               ElMessage.success(res.msg)
-              // localStorage.setItem('sg_token', res.sessionToken)
-              // location.reload()
+              sessionStorage.setItem('sg_token', res.sessionToken)
+              location.replace('/')
+              // store.dispatch('app/LOAD_USER_INFO').then(info => {
+              // })
             } else {
               ElMessage.warning(res.msg)
             }

+ 37 - 0
src/views/staging/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/daily-manage/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/dict-manage/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/login-log/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/notice-announcement/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/operation-records/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/public-configuration/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/sign-manage/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 37 - 0
src/views/system/weekly-manage/index.vue

@@ -0,0 +1,37 @@
+<template>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>