任一存 2 years ago
commit
5b13b72d56

+ 4 - 0
.browserslistrc

@@ -0,0 +1,4 @@
+> 1%
+last 2 versions
+not dead
+not ie 11

+ 0 - 0
.env


+ 3 - 0
.env.dev

@@ -0,0 +1,3 @@
+CLI_MODE=dev
+NODE_ENV=development
+PUBLIC_PATH=/

+ 3 - 0
.env.prod

@@ -0,0 +1,3 @@
+CLI_MODE=prod
+NODE_ENV=production
+PUBLIC_PATH=/

+ 3 - 0
.env.test

@@ -0,0 +1,3 @@
+CLI_MODE=test
+NODE_ENV=production
+PUBLIC_PATH=/

+ 3 - 0
.eslintignore

@@ -0,0 +1,3 @@
+*/libs
+/node_modules
+/.vscode

+ 53 - 0
.eslintrc.js

@@ -0,0 +1,53 @@
+module.exports = {
+  root: true,
+  env: {
+    browser: true,
+    commonjs: true,
+    es6: true,
+    jest: true,
+    jquery: true,
+    node: true,
+  },
+  'extends': [
+    'plugin:vue/vue3-recommended',
+    'eslint:recommended'
+  ],
+  parserOptions: {
+    parser: '@babel/eslint-parser'
+  },
+  rules: {
+    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'semi': ['error', 'never'],
+    "no-unused-vars": ["warn", {
+      "vars": "all",
+      "args": "after-used",
+      "ignoreRestSiblings": false
+    }],
+    "keyword-spacing": ["error", { "before": true, "after": true }],
+    "object-curly-spacing": ["error", "always"],
+    "space-infix-ops": ["error"],
+    'key-spacing': ["error", {
+      "mode": "strict"
+    }],
+    "comma-spacing": ["error", { "before": false, "after": true }],
+    "func-call-spacing": ["error", "never"],
+    "semi-spacing": ["error", { "before": false, "after": true }],
+    "space-before-blocks": ["error", "always"],
+    'no-trailing-spaces': 'error',
+    'no-multi-spaces': 'error',
+    "indent": ["error", 2],
+    'no-empty': 'off',
+    // 默认不启用:为了避免细微的 bug,最好直接从 Object.prototype 调用挂载于prototype上的方法方法。例如,foo.hasOwnProperty("bar") 应该替换为 Object.prototype.hasOwnProperty.call(foo, "bar")。
+    'no-prototype-builtins': "off",
+  },
+  globals: {
+    api: true,
+    config: true,
+    mapState: true,
+    mapGetters: true,
+    mapMutations: true,
+    store: true,
+    utils: true,
+  }
+}

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
+.DS_Store
+node_modules
+/dist
+
+*.zip
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 4 - 0
README.md

@@ -0,0 +1,4 @@
+## 部署测试环境
+文件存放位置:
+
+访问url:

+ 9 - 0
babel.config.js

@@ -0,0 +1,9 @@
+module.exports = {
+  presets: [
+    '@vue/cli-plugin-babel/preset',
+  ],
+  // plugins: [
+  //   "transform-object-rest-spread",
+  //   "@babel/plugin-proposal-optional-chaining",
+  // ],
+}

+ 20 - 0
jsconfig.json

@@ -0,0 +1,20 @@
+{
+  "compilerOptions": {
+    "target": "es5",
+    "module": "esnext",
+    "baseUrl": "./",
+    "moduleResolution": "node",
+    "paths": {
+      "@/*": [
+        "src/*"
+      ]
+    },
+    "lib": [
+      "esnext",
+      "dom",
+      "dom.iterable",
+      "scripthost"
+    ]
+  },
+  "exclude": ["libs", "node_modules"]
+}

+ 34 - 0
package.json

@@ -0,0 +1,34 @@
+{
+  "name": "my-app",
+  "version": "0.0.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve --mode dev",
+    "build-test": "vue-cli-service build --mode test",
+    "build-prod": "vue-cli-service build --mode prod",
+    "lint": "vue-cli-service lint"
+  },
+  "dependencies": {
+    "axios": "^1.1.3",
+    "core-js": "^3.8.3",
+    "dayjs": "^1.11.7",
+    "lodash": "^4.17.21",
+    "mitt": "^3.0.0",
+    "vue": "^3.2.13",
+    "vue-router": "^4.0.3",
+    "vuex": "^4.0.0"
+  },
+  "devDependencies": {
+    "@babel/core": "^7.12.16",
+    "@babel/eslint-parser": "^7.12.16",
+    "@vue/cli-plugin-babel": "~5.0.0",
+    "@vue/cli-plugin-eslint": "~5.0.0",
+    "@vue/cli-plugin-router": "~5.0.0",
+    "@vue/cli-plugin-vuex": "~5.0.0",
+    "@vue/cli-service": "~5.0.0",
+    "eslint": "^7.32.0",
+    "eslint-plugin-vue": "^8.0.3",
+    "less": "^4.0.0",
+    "less-loader": "^8.0.0"
+  }
+}

+ 22 - 0
public/index.html

@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
+    <link rel="icon" href="<%= BASE_URL %>logo.png">
+    <title>我是标题</title>
+  </head>
+  <body>
+    <!-- <script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script> -->
+    <noscript>
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+
+    <script>
+      // new VConsole()
+    </script>
+  </body>
+</html>

BIN
public/logo.png


+ 85 - 0
src/App.vue

@@ -0,0 +1,85 @@
+<template>
+  <router-view />
+</template>
+
+<script>
+export default {
+  mounted() {
+    this.$mitt.on('test', e => {
+      console.log('test', e)
+    })
+  }
+}
+</script>
+
+<style lang="less">
+html, body {
+  // overscroll-behavior: none;
+  // overflow: hidden;
+  height: 100%;
+}
+
+#app {
+  height: 100%;
+}
+// * {
+//   user-select: none;
+//   -webkit-touch-callout: none;
+// }
+
+// // 360浏览器不支持not()
+// input, textarea {
+//   user-select: initial;
+// }
+
+// 字体
+// @font-face {
+//   font-family: 'Source Han Serif CN';
+//   src: url('@/assets/style/SourceHanSerifCN-Regular.otf');
+// }
+// @font-face {
+//   font-family: 'Source Han Serif CN-Bold';
+//   src: url('@/assets/style/SourceHanSerifCN-Bold.otf');
+// }
+// i {
+//   font-style: italic;
+// }
+
+// 滚动条
+// ::-webkit-scrollbar { background: #dddecc; width: 0.3rem; height: 0.3rem; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
+// ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 0.15rem; }
+// ::-webkit-scrollbar-corner { background: #dddecc; }
+
+// vue组件过渡效果
+.fade-out-leave-active {
+  transition: opacity 1s;
+}
+.fade-out-leave-to {
+  opacity: 0;
+}
+
+// // 不断渐变显隐 animation
+// .animation-show-hide {
+//   animation: show-hide 1.8s infinite;
+// }
+// @keyframes show-hide {
+//   0% {
+//     opacity: 0;
+//   }
+//   50% {
+//     opacity: 1;
+//   }
+//   100% {
+//     opacity: 0;
+//   }
+// }
+
+// // vue-viewer
+// .viewer-container {
+//   background-color: rgba(0, 0, 0, 80%) !important;
+// }
+// 或者
+// .viewer-backdrop {
+//   background-color: rgba(0, 0, 0, 90%) !important;
+// }
+</style>

+ 17 - 0
src/api.js

@@ -0,0 +1,17 @@
+// import axios from "axios"
+
+// axios({
+//   method: 'post',
+//   url: `${config.backendDir}visit/saveType`,
+//   headers: {
+//     appId: "CA02F83A5FA162B930AA2F962D202F43B0F6DE0B51AD79FEDB03FA8202BB4909330105B3B347510D87C97060C4288280D4A744E00565A4EC",
+//     "Content-Type": "application/json",
+//   },
+//   data: {
+//     moduleType,
+//     type: 'visit',
+//   },
+// })
+
+export default {
+}

BIN
src/assets/images/arrow-down.png


BIN
src/assets/images/arrow-up.png


BIN
src/assets/images/decade-decorator-left.png


BIN
src/assets/images/decade-decorator-right.png


BIN
src/assets/images/icon_search.png


BIN
src/assets/images/main-bg.jpg


BIN
src/assets/images/nav-item-active-decorator.png


+ 59 - 0
src/assets/style/my-reset.css

@@ -0,0 +1,59 @@
+* {
+  /* 阻止safari在用户交互设置一些元素的背景色 */
+  -webkit-tap-highlight-color: transparent;
+  box-sizing: border-box;
+}
+
+html {
+  overflow: hidden;
+  touch-action: none;
+  scroll-behavior: smooth; /* MDN: When this property is specified on the root element, it applies to the viewport instead. This property specified on the body element will not propagate to the viewport.(???) */
+  height: 100%;
+}
+
+body {
+  text-align: justify;
+  height: 100%;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+a {
+  color: initial;
+  text-decoration: initial;
+  outline: none;
+}
+
+button {
+  padding: 0;
+  cursor: pointer;
+  background-color: initial;
+  border: initial;
+  outline: none;
+  white-space: pre;
+}
+
+img {
+  user-select: none;
+}
+
+menu {
+  list-style-type: initial;
+}
+
+li {
+  display: initial;
+}
+
+input {
+  outline: initial;
+  background: initial;
+  border: initial;
+  border-radius: initial;
+  width: initial;
+  height: initial;
+}
+
+td {
+  vertical-align: inherit;
+}

+ 48 - 0
src/assets/style/reset.css

@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	font-size: 100%;
+	font: inherit;
+	vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+	display: block;
+}
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}

+ 2 - 0
src/config.js

@@ -0,0 +1,2 @@
+export default {
+}

+ 44 - 0
src/directives/v-click-outside.js

@@ -0,0 +1,44 @@
+export default {
+  install(app) {
+    app.directive('click-outside', {
+      mounted(el, binding) {
+        function documentHandler(e) {
+          if (el.contains(e.target)) {
+            return false
+          }
+          if (binding.value) {
+            binding.value(e)
+          }
+        }
+        el.__vueClickOutside__ = documentHandler
+        if (binding.modifiers.click) {
+          document.addEventListener('click', documentHandler, {
+            capture: binding.modifiers.capture
+          })
+        }
+        if (binding.modifiers.mousedown) {
+          document.addEventListener('mousedown', documentHandler, {
+            capture: binding.modifiers.capture
+          })
+        }
+        if (binding.modifiers.touchstart) {
+          document.addEventListener('touchstart', documentHandler, {
+            capture: binding.modifiers.capture
+          })
+        }
+      },
+      unMounted(el, binding) {
+        document.removeEventListener('click', el.__vueClickOutside__, {
+          capture: binding.modifiers.capture
+        })
+        document.removeEventListener('mousedown', el.__vueClickOutside__, {
+          capture: binding.modifiers.capture
+        })
+        document.removeEventListener('tarchstart', el.__vueClickOutside__, {
+          capture: binding.modifiers.capture
+        })
+        delete el.__vueClickOutside__
+      }
+    })
+  }
+}

File diff suppressed because it is too large
+ 4 - 0
src/libs/ua-parser.min.js


+ 73 - 0
src/main.js

@@ -0,0 +1,73 @@
+import { createApp } from 'vue'
+import App from './App.vue'
+import router from './router'
+import store from './store'
+import "@/assets/style/reset.css"
+import "@/assets/style/my-reset.css"
+import UAParser from "@/libs/ua-parser.min.js"
+import clickOutside from "@/directives/v-click-outside.js"
+import mitt from "mitt"
+// import 'viewerjs/dist/viewer.css'
+// import VueViewer from 'v-viewer'
+
+console.log(`version: ${process.env.VUE_APP_VERSION}`)
+console.log(`Build time: ${process.env.VUE_APP_UPDATE_TIME}`)
+
+const app = createApp(App)
+
+// 挂载配置信息
+app.config.globalProperties.$config = config
+app.config.globalProperties.$env = process.env
+
+// 挂载消息发布订阅中心
+app.config.globalProperties.$mitt = mitt()
+
+// 解析、挂载浏览器信息
+const uaParser = new UAParser()
+const uaInfo = uaParser.getResult()
+console.log('uaInfo: ', uaInfo)
+app.config.globalProperties.$uaInfo = uaInfo
+if (uaInfo.browser && uaInfo.browser.name === 'WeChat') {
+  app.config.globalProperties.$isWeChat = true
+}
+if (uaInfo.browser && uaInfo.browser.name === 'Safari') {
+  app.config.globalProperties.$isSafari = true
+}
+if (uaInfo.device.type === 'mobile') {
+  app.config.globalProperties.$isMobile = true
+}
+
+// 处理resize事件
+// let windowWidthLast = window.innerWidth
+// let windowHeightLast = window.innerHeight
+// function onResize() {
+//   windowWidthLast = window.innerWidth
+//   windowHeightLast = window.innerHeight
+// }
+// window.addEventListener('resize', () => {
+//   onResize()
+// })
+
+// // 禁用上下文菜单
+// document.oncontextmenu = function(e) {
+//   e.preventDefault()
+// }
+
+// // safari里只能在交互行为的回调中成功地首次调用audio的play方法,所以需要一个全局的audio元素来播放随时可能需要自发播放的音频。
+// const audioNode = document.createElement("audio")
+// audioNode.id = 'global-audio'
+// audioNode.style.display = 'none'
+// audioNode.loop = true
+// document.body.appendChild(audioNode)
+
+app.use(store)
+  .use(router)
+  .use(clickOutside)
+  // .use(VueViewer)
+  // .component('HotSpot', HotSpot)
+  .mount('#app')
+
+// 必须在vue根组件挂载之后执行
+if (app.config.globalProperties.$isMobile) {
+  document.getElementById('app').classList.add('mobile')
+}

+ 25 - 0
src/router/index.js

@@ -0,0 +1,25 @@
+import { createRouter, createWebHashHistory } from 'vue-router'
+import HomeView from '../views/Home.vue'
+// import store from '@/store/index.js'
+
+const routes = [
+  {
+    path: '/',
+    name: 'home-view',
+    component: HomeView,
+  },
+]
+
+const router = createRouter({
+  history: createWebHashHistory(),
+  routes
+})
+
+router.beforeEach((to, from) => {
+  // 生产环境下强制每次都从首页进入
+  if (process.env.NODE_ENV === 'production' && !from.name && to.name !== 'home-view') {
+    return '/'
+  }
+})
+
+export default router

+ 18 - 0
src/store/index.js

@@ -0,0 +1,18 @@
+import { createStore } from 'vuex'
+
+export default createStore({
+  state: {
+    usingChinese: true,
+  },
+  getters: {
+  },
+  mutations: {
+    setUsingChinese(state, value) {
+      state.usingChinese = value
+    },
+  },
+  actions: {
+  },
+  modules: {
+  }
+})

+ 70 - 0
src/utils.js

@@ -0,0 +1,70 @@
+export default {
+  /**
+   * 返回一个自带消抖效果的函数,用res表示。
+   *
+   * fn: 需要被消抖的函数
+   * delay: 消抖时长
+   * isImmediateCall: 是否在一组操作中的第一次调用时立即执行fn
+   * isRememberLastCall:是否在一组中最后一次调用后等delay时长再执行fn
+   */
+  debounce(fn, delay = 250, isImmediateCall = true, isRememberLastCall = true) {
+    console.assert(isImmediateCall || isRememberLastCall, 'isImmediateCall 和 isRememberLastCall 至少应有一个是true,否则没有意义!')
+    let timer = null
+    // 上次调用的时刻
+    let lastCallTime = 0
+
+    if (isImmediateCall && !isRememberLastCall) {
+      return function (...args) {
+        const currentTime = Date.now()
+        if (currentTime - lastCallTime >= delay) {
+          fn.apply(this, args)
+        }
+        lastCallTime = currentTime
+      }
+    } else if (!isImmediateCall && isRememberLastCall) {
+      return function (...args) {
+        if (timer) {
+          clearTimeout(timer)
+        }
+        timer = setTimeout(() => {
+          fn.apply(this, args)
+        }, delay)
+      }
+    } else if (isImmediateCall && isRememberLastCall) {
+      return function (...args) {
+        const currentTime = Date.now()
+        if (currentTime - lastCallTime >= delay) { // 一组操作中的第一次
+          fn.apply(this, args)
+          lastCallTime = currentTime
+          return
+        } else { // 一组中的后续调用
+          if (timer) { // 在此之前存在中间调用
+            lastCallTime = currentTime
+            clearTimeout(timer)
+          }
+          timer = setTimeout(() => {
+            fn.apply(this, args)
+            lastCallTime = 0
+            timer = null
+          }, delay)
+        }
+      }
+    } else {
+      console.error('不应该执行到这里!')
+    }
+  },
+  throttle(fn, interval = 250) {
+    let lastRunTime = 0
+
+    return function (...args) {
+      let elapsedTime = Date.now() - lastRunTime
+      if (elapsedTime < interval) {
+        return null
+      }
+
+      let context = this
+      lastRunTime = Date.now()
+      return fn.apply(context, args)
+    }
+  },
+}

+ 565 - 0
src/views/Home.vue

@@ -0,0 +1,565 @@
+<template>
+  <div
+    class="home"
+  >
+    <transition name="fade-out">
+      <HomeFadeIn
+        v-if="isShowFadeInMask"
+        class="fade-in-mask"
+      />
+    </transition>
+    <h1 :title="'离开的监管机构'">
+      离开的监管机构
+    </h1>
+    <form @submit="onSearch">
+      <input
+        v-model="filterKeyword"
+        type="text"
+        placeholder="请输入企业名称"
+      >
+      <button type="submit">
+        <img
+          class=""
+          src="@/assets/images/icon_search.png"
+          alt=""
+          draggable="false"
+        >
+      </button>
+    </form>
+    <ul>
+      <li
+        v-for="(decade) in corpListMap.keys()"
+        :key="decade"
+      >
+        <h2>
+          <img
+            class=""
+            src="@/assets/images/decade-decorator-left.png"
+            alt=""
+            draggable="false"
+          >
+          <span>{{ decade }}</span>
+          <img
+            class=""
+            src="@/assets/images/decade-decorator-right.png"
+            alt=""
+            draggable="false"
+          >
+        </h2>
+        <div
+          v-for="(corpItem) in corpListMap.get(decade)"
+          :key="corpItem.id"
+          class="corp-item"
+          :class="{
+            active: activeCorpId === corpItem.id
+          }"
+          @click="activeCorpId = corpItem.id"
+        >
+          <div class="item-icon" />
+          <div class="verticle-line" />
+          <span
+            class="corp-name"
+            :title="corpItem.name"
+          >
+            {{ corpItem.name }}
+          </span>
+          <span class="corp-time">
+            {{ corpItem.time }}
+          </span>
+        </div>
+      </li>
+    </ul>
+    <nav
+      :style="{
+        bottom: isShowNavBar ? '0' : '-112px',
+      }"
+    >
+      <button
+        class="tab-item"
+        :class="{
+          active: activeNavItemIdx === 0
+        }"
+        @click="activeNavItemIdx = 0"
+      >
+        概述总览
+        <img
+          class="decorator"
+          src="@/assets/images/nav-item-active-decorator.png"
+          alt=""
+          draggable="false"
+        >
+      </button>
+      <button
+        class="tab-item"
+        :class="{
+          active: activeNavItemIdx === 1
+        }"
+        @click="activeNavItemIdx = 1"
+      >
+        历史回顾
+        <img
+          class="decorator"
+          src="@/assets/images/nav-item-active-decorator.png"
+          alt=""
+          draggable="false"
+        >
+      </button>
+      <button
+        class="tab-item"
+        :class="{
+          active: activeNavItemIdx === 2
+        }"
+        @click="activeNavItemIdx = 2"
+      >
+        国之重器
+        <img
+          class="decorator"
+          src="@/assets/images/nav-item-active-decorator.png"
+          alt=""
+          draggable="false"
+        >
+      </button>
+      <button
+        class="tab-item"
+        :class="{
+          active: activeNavItemIdx === 3
+        }"
+        @click="activeNavItemIdx = 3"
+      >
+        工业元宇宙
+        <img
+          class="decorator"
+          src="@/assets/images/nav-item-active-decorator.png"
+          alt=""
+          draggable="false"
+        >
+      </button>
+    </nav>
+    <button
+      class="show-hide"
+      :style="{
+        backgroundImage: isShowNavBar ? `url(${require(`@/assets/images/arrow-down.png`)})` : `url(${require(`@/assets/images/arrow-up.png`)})`,
+      }"
+      @click="isShowNavBar = !isShowNavBar"
+    />
+  </div>
+</template>
+
+<script>
+import HomeFadeIn from "@/views/HomeFadeIn.vue"
+import {
+  computed,
+  onMounted,
+  reactive,
+  ref,
+} from 'vue'
+import deepClone from 'lodash/cloneDeep'
+
+export default {
+  name: 'HomeView',
+  components: {
+    HomeFadeIn,
+  },
+
+  setup () {
+    const isShowFadeInMask = ref(false)
+    onMounted(() => {
+      setTimeout(() => {
+        isShowFadeInMask.value = false
+      }, 2000)
+    })
+
+    const isShowNavBar = ref(true)
+    const activeNavItemIdx = ref(0)
+
+    const filterKeyword = ref('')
+
+    const corpListRaw = reactive([
+      {
+        name: '撒旦解放了',
+        time: '2022-12-03',
+        id: 1,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2022-11-03',
+        id: 2,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2022-07-03',
+        id: 3,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2021-12-03',
+        id: 4,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2021-07-03',
+        id: 5,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2020-12-03',
+        id: 6,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2020-05-03',
+        id: 7,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2019-05-03',
+        id: 8,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2011-07-03',
+        id: 9,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2009-07-03',
+        id: 10,
+      },
+      {
+        name: '撒旦解放了',
+        time: '2000-07-03',
+        id: 11,
+      },
+      {
+        name: '撒旦解放了',
+        time: '1995-11-03',
+        id: 12,
+      },
+    ])
+    const corpListMap = computed(() => {
+      const corpListFiltered = corpListRaw.filter((item) => {
+        console.log(item.name, filterKeyword)
+        return !filterKeyword.value || item.name.includes(filterKeyword.value)
+      })
+      const afterSort = deepClone(corpListFiltered)
+      afterSort.sort((a, b) => {
+        return Date.parse(b.time) - Date.parse(a.time)
+      })
+      const ret = new Map()
+      afterSort.forEach(element => {
+        const t = element.time[2]
+        const decade = Number(t) < 3 ? `本世纪${t}0年代` : `上世纪${t}0年代`
+        if (!ret.get(decade)) {
+          ret.set(decade, [])
+        }
+        ret.get(decade).push(element)
+      })
+      return ret
+    })
+    const activeCorpId = ref(null)
+
+    return {
+      isShowFadeInMask,
+      isShowNavBar,
+      activeNavItemIdx,
+      filterKeyword,
+      corpListMap,
+      activeCorpId,
+    }
+  },
+  data() {
+    return {
+    }
+  },
+  computed: {
+    ...mapState([
+    ]),
+  },
+  mounted() {
+    this.$mitt.emit('test', { msg: 'home mounted' })
+  },
+  unmounted() {
+  },
+  methods: {
+    ...mapMutations([
+    ]),
+    onSearch() {
+      console.log('search!')
+    }
+  },
+}
+</script>
+
+<style lang="less" scoped>
+.home {
+  width: 100%;
+  height: 100%;
+  background-image: url(@/assets/images/main-bg.jpg);
+  background-size: cover;
+  background-repeat: no-repeat;
+  background-position: center center;
+  >.fade-in-mask {
+    z-index: 5;
+  }
+  >h1 {
+    position: absolute;
+    top: 51px;
+    left: 81px;
+    max-width: 50%;
+    overflow: hidden;
+    white-space: pre;
+    text-overflow: ellipsis;
+    font-size: 48px;
+    font-family: Source Han Sans CN-Heavy, Source Han Sans CN;
+    font-weight: 800;
+    color: #FFFFFF;
+    padding-top: 20px;
+    padding-bottom: 20px;
+    border-top: 1px solid rgba(217, 217, 217, 0.2);
+    border-bottom: 1px solid rgba(217, 217, 217, 0.2);
+  }
+  >form {
+    position: absolute;
+    top: 196px;
+    left: 81px;
+    display: flex;
+    align-items: center;
+    >input {
+      background: rgba(255,255,255,0.1);
+      border-radius: 3px 3px 3px 3px;
+      border: 1px solid rgba(255, 255, 255, 0.5);
+      width: 220px;
+      height: 40px;
+      padding-left: 13px;
+      padding-right: 13px;
+      font-size: 16px;
+      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+      font-weight: 400;
+      color: #FFFFFF;
+      &:focus {
+        border: 1px solid rgba(255, 255, 255, 1);
+      }
+      &::placeholder {
+        font-size: 16px;
+        font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+        font-weight: 400;
+        color: rgba(255, 255, 255, 0.5);
+      }
+    }
+    >button {
+      margin-left: 8px;
+      width: 40px;
+      height: 40px;
+      background: rgba(255,255,255,0.3);
+      border-radius: 3px 3px 3px 3px;
+      opacity: 1;
+      border: 1px solid #FFFFFF;
+      &:hover {
+        background: rgba(255,255,255,0.5);
+      }
+      >img {
+        width: 100%;
+        height: 100%;
+      }
+    }
+  }
+  >ul {
+    position: absolute;
+    top: 272px;
+    left: 81px;
+    max-height: 520px;
+    overflow: auto;
+    >li {
+      display: block;
+      color: #fff;
+      >h2 {
+        width: 323px;
+        height: 47px;
+        background: linear-gradient(92deg, rgba(176,161,121,0) 0%, rgba(176,161,121,0.3) 50%, rgba(176,161,121,0) 100%);
+        border-radius: 3px 3px 3px 3px;
+        font-size: 16px;
+        font-family: Source Han Sans CN-Bold, Source Han Sans CN;
+        font-weight: bold;
+        color: #FFFFFF;
+        text-shadow: 0px 0px 5px #FFD15B;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-bottom: 17px;
+        >span {
+          margin-left: 13px;
+          margin-right: 13px;
+        }
+        >img {
+          width: 60px;
+          height: 15px;
+        }
+      }
+      >.corp-item {
+        position: relative;
+        width: 363px;
+        height: 50px;
+        background: linear-gradient(90deg, #3A454F 0%, rgba(22,28,33,0) 100%);
+        backdrop-filter: blur(3px);
+        border-radius: 3px 3px 3px 3px;
+        opacity: 1;
+        border: 1px solid;
+        border-right: none;
+        border-image: linear-gradient(98deg, rgba(78, 96, 112, 1), rgba(78, 96, 112, 0)) 1 1;
+        padding-left: 72px;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        align-items: flex-start;
+        margin-bottom: 24px;
+        cursor: pointer;
+        >.item-icon {
+          position: absolute;
+          border-radius: 50%;
+          left: 35px;
+          top: 50%;
+          transform: translateY(-50%);
+          width: 8px;
+          height: 8px;
+          background: #6D9DC6;
+          z-index: 2;
+        }
+        >.verticle-line {
+          position: absolute;
+          top: -1px;
+          left: 38px;
+          width: 2px;
+          height: 75px;
+          background: #B0A179 50%;
+          z-index: 1;
+        }
+        &:first-of-type {
+          >.verticle-line {
+            top: 50%;
+          }
+        }
+        &:last-of-type {
+          >.verticle-line {
+            top: initial;
+            bottom: 50%;
+          }
+        }
+        &:first-of-type:last-of-type {
+          >.verticle-line {
+            display: none;
+          }
+        }
+        >span.corp-name {
+          display: block;
+          font-size: 16px;
+          font-family: Source Han Sans CN-Bold, Source Han Sans CN;
+          font-weight: bold;
+          color: #FFFFFF;
+          overflow: hidden;
+          white-space: pre;
+          text-overflow: ellipsis;
+        }
+        &.active {
+          >span.corp-name {
+            font-size: 20px;
+            font-family: Source Han Sans CN-Bold, Source Han Sans CN;
+            text-shadow: 0px 0px 16px #BD9D48;
+          }
+        }
+        >span.corp-time {
+          display: block;
+          font-size: 16px;
+          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+          font-weight: 400;
+          color: #FFFFFF;
+        }
+        &:hover {
+          background: linear-gradient(90deg, #B0A179 0%, rgba(255,209,91,0) 100%);
+          border-image: linear-gradient(98deg, rgba(176, 161, 121, 1), rgba(176, 161, 121, 0)) 1 1;
+          >.item-icon {
+            background: #FFFFFF;
+            box-shadow: 0px 0px 12px 0px #FFD15B, 0px 0px 8px 0px #FFD15B, 0px 0px 10px 0px #FFD15B, 0px 0px 5px 0px #FFD15B;
+          }
+        }
+        &.active {
+          background: linear-gradient(90deg, #B0A179 0%, rgba(255,209,91,0) 100%);
+          border-image: linear-gradient(98deg, rgba(176, 161, 121, 1), rgba(176, 161, 121, 0)) 1 1;
+          >.item-icon {
+            background: #FFFFFF;
+            box-shadow: 0px 0px 12px 0px #FFD15B, 0px 0px 8px 0px #FFD15B, 0px 0px 10px 0px #FFD15B, 0px 0px 5px 0px #FFD15B;
+          }
+        }
+      }
+    }
+    &::-webkit-scrollbar { background: transparent; width: 4px; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
+    &::-webkit-scrollbar-thumb {
+      background: transparent;
+      border-radius: 2px;
+    }
+    &:hover {
+      &::-webkit-scrollbar-thumb {
+        background: rgba(220, 231, 240, 0.2);
+      }
+    }
+  }
+  >nav {
+    position: absolute;
+    left: 0;
+    width: 100%;
+    height: 112px;
+    border-radius: 5px 5px 0 0;
+    border-top: solid 1px #D2BD84;
+    box-shadow: inset 0px 2px 2px 0px rgba(210,189,132,0.45), 0px -9px 24px 0px rgba(183,162,109,0.25);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    transition: all 0.5s;
+    >button.tab-item {
+      font-size: 30px;
+      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+      font-weight: 400;
+      color: #FFFFFF;
+      margin-left: 200px;
+      opacity: 0.5;
+      position: relative;
+      >img.decorator {
+        display: none;
+      }
+      &:first-of-type {
+        margin-left: initial;
+      }
+      &.active {
+        opacity: initial;
+        >img.decorator {
+          display: initial;
+          position: absolute;
+          left: 50%;
+          bottom: -15px;
+          transform: translateX(-50%);
+          width: 150%;
+        }
+      }
+    }
+    @media only screen and (max-width: 1400px) {
+      >button.tab-item {
+        margin-left: 100px;
+      }
+    }
+  }
+  >button.show-hide {
+    position: absolute;
+    right: 82px;
+    bottom: 34px;
+    width: 36px;
+    height: 36px;
+    background-size: cover;
+    background-repeat: no-repeat;
+    background-position: center center;
+  }
+  @media only screen and (max-width: 1400px) {
+    >button.show-hide {
+      right: 10px;
+    }
+  }
+}
+</style>

+ 59 - 0
src/views/HomeFadeIn.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="comp-root">
+    <div class="progress">
+      <span>{{ progress }}</span><span>%</span>
+    </div>
+    <div class="organization">
+      上海工业博物馆
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      progress: 0,
+    }
+  },
+}
+</script>
+
+<style lang="less" scoped>
+.comp-root {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background-color: red;
+  >.progress {
+    position: absolute;
+    left: 50%;
+    top: 40%;
+    transform: translate(-50%, -50%);
+    >span:nth-of-type(1) {
+      font-size: 32px;
+      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+      font-weight: 400;
+      color: #FFFFFF;
+    }
+    >span:nth-of-type(2) {
+      font-size: 16px;
+      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+      font-weight: 400;
+      color: #FFFFFF;
+    }
+  }
+  >.organization {
+    position: absolute;
+    left: 50%;
+    bottom: 38px;
+    transform: translate(-50%, -50%);
+    font-size: 24px;
+    font-family: Source Han Sans CN-Bold, Source Han Sans CN;
+    font-weight: bold;
+    color: #FFFFFF;
+  }
+}
+</style>

+ 37 - 0
vue.config.js

@@ -0,0 +1,37 @@
+const webpack = require('webpack')
+const { defineConfig } = require('@vue/cli-service')
+
+process.env.VUE_APP_VERSION = require('./package.json').version
+
+const dayjs = require('dayjs')
+const time = dayjs().format('YYYY-M-D HH:mm:ss')
+process.env.VUE_APP_UPDATE_TIME = time
+
+module.exports = defineConfig({
+  publicPath: process.env.PUBLIC_PATH,
+  productionSourceMap: process.env.CLI_MODE === 'prod' ? false : true,
+  // transpileDependencies: true, // 默认false,表示babel-loader 会忽略所有 node_modules 中的文件
+  configureWebpack: {
+    module: {
+      rules: [
+        // {
+        //   test: /\.cur$/,
+        //   use: {
+        //     loader: 'file-loader'
+        //   }
+        // }
+      ]
+    },
+    plugins: [
+      new webpack.ProvidePlugin({
+        utils: ['/src/utils.js', 'default'],
+        store: ['/src/store/index.js', 'default'],
+        api: ['/src/api.js', 'default'],
+        config: ['/src/config.js', 'default'],
+        mapState: ['vuex', 'mapState'],
+        mapGetters: ['vuex', 'mapGetters'],
+        mapMutations: ['vuex', 'mapMutations'],
+      }),
+    ],
+  },
+})

File diff suppressed because it is too large
+ 6266 - 0
yarn.lock