Pārlūkot izejas kodu

feat: 项目结构搭建

wenshuai 2 gadi atpakaļ
vecāks
revīzija
8bb33c7a6a

+ 1 - 0
package.json

@@ -22,6 +22,7 @@
     "axios": "^0.26.0",
     "eslint": "^8.10.0",
     "eslint-plugin-vue": "^8.5.0",
+    "sass": "^1.49.9",
     "typescript": "^4.5.4",
     "vite": "^2.8.0",
     "vite-plugin-style-import": "1.4.1",

+ 86 - 5
pnpm-lock.yaml

@@ -9,6 +9,7 @@ specifiers:
   eslint: ^8.10.0
   eslint-plugin-vue: ^8.5.0
   pinia: ^2.x.x
+  sass: ^1.49.9
   typescript: ^4.5.4
   vant: ^3.4.5
   vite: ^2.8.0
@@ -33,8 +34,9 @@ devDependencies:
   axios: registry.npmmirror.com/axios/0.26.0
   eslint: registry.npmmirror.com/eslint/8.10.0
   eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.10.0
+  sass: registry.npmmirror.com/sass/1.49.9
   typescript: registry.npmmirror.com/typescript/4.6.2
-  vite: registry.npmmirror.com/vite/2.8.6
+  vite: registry.npmmirror.com/vite/2.8.6_sass@1.49.9
   vite-plugin-style-import: registry.npmmirror.com/vite-plugin-style-import/1.4.1_vite@2.8.6
   vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.8.3_vite@2.8.6
   vue-tsc: registry.npmmirror.com/vue-tsc/0.29.8_typescript@4.6.2
@@ -358,7 +360,7 @@ packages:
       vite: ^2.5.10
       vue: ^3.2.25
     dependencies:
-      vite: registry.npmmirror.com/vite/2.8.6
+      vite: registry.npmmirror.com/vite/2.8.6_sass@1.49.9
       vue: registry.npmmirror.com/vue/3.2.31
     dev: true
 
@@ -644,6 +646,16 @@ packages:
       color-convert: registry.npmmirror.com/color-convert/2.0.1
     dev: true
 
+  registry.npmmirror.com/anymatch/3.1.2:
+    resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/anymatch/-/anymatch-3.1.2.tgz}
+    name: anymatch
+    version: 3.1.2
+    engines: {node: '>= 8'}
+    dependencies:
+      normalize-path: registry.npmmirror.com/normalize-path/3.0.0
+      picomatch: registry.npmmirror.com/picomatch/2.3.1
+    dev: true
+
   registry.npmmirror.com/argparse/2.0.1:
     resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz}
     name: argparse
@@ -694,6 +706,13 @@ packages:
     version: 1.0.2
     dev: true
 
+  registry.npmmirror.com/binary-extensions/2.2.0:
+    resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz}
+    name: binary-extensions
+    version: 2.2.0
+    engines: {node: '>=8'}
+    dev: true
+
   registry.npmmirror.com/brace-expansion/1.1.11:
     resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz}
     name: brace-expansion
@@ -784,6 +803,23 @@ packages:
       is-regex: registry.npmmirror.com/is-regex/1.1.4
     dev: true
 
+  registry.npmmirror.com/chokidar/3.5.3:
+    resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz}
+    name: chokidar
+    version: 3.5.3
+    engines: {node: '>= 8.10.0'}
+    dependencies:
+      anymatch: registry.npmmirror.com/anymatch/3.1.2
+      braces: registry.npmmirror.com/braces/3.0.2
+      glob-parent: registry.npmmirror.com/glob-parent/5.1.2
+      is-binary-path: registry.npmmirror.com/is-binary-path/2.1.0
+      is-glob: registry.npmmirror.com/is-glob/4.0.3
+      normalize-path: registry.npmmirror.com/normalize-path/3.0.0
+      readdirp: registry.npmmirror.com/readdirp/3.6.0
+    optionalDependencies:
+      fsevents: registry.npmmirror.com/fsevents/2.3.2
+    dev: true
+
   registry.npmmirror.com/color-convert/2.0.1:
     resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz}
     name: color-convert
@@ -1640,6 +1676,12 @@ packages:
     engines: {node: '>= 4'}
     dev: true
 
+  registry.npmmirror.com/immutable/4.0.0:
+    resolution: {integrity: sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/immutable/-/immutable-4.0.0.tgz}
+    name: immutable
+    version: 4.0.0
+    dev: true
+
   registry.npmmirror.com/import-fresh/3.3.0:
     resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.0.tgz}
     name: import-fresh
@@ -1672,6 +1714,15 @@ packages:
     version: 2.0.4
     dev: true
 
+  registry.npmmirror.com/is-binary-path/2.1.0:
+    resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz}
+    name: is-binary-path
+    version: 2.1.0
+    engines: {node: '>=8'}
+    dependencies:
+      binary-extensions: registry.npmmirror.com/binary-extensions/2.2.0
+    dev: true
+
   registry.npmmirror.com/is-core-module/2.8.1:
     resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-core-module/-/is-core-module-2.8.1.tgz}
     name: is-core-module
@@ -1904,6 +1955,13 @@ packages:
       tslib: registry.npmmirror.com/tslib/2.3.1
     dev: true
 
+  registry.npmmirror.com/normalize-path/3.0.0:
+    resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz}
+    name: normalize-path
+    version: 3.0.0
+    engines: {node: '>=0.10.0'}
+    dev: true
+
   registry.npmmirror.com/object-assign/4.1.1:
     resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz}
     name: object-assign
@@ -2182,6 +2240,15 @@ packages:
     version: 1.2.3
     dev: true
 
+  registry.npmmirror.com/readdirp/3.6.0:
+    resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz}
+    name: readdirp
+    version: 3.6.0
+    engines: {node: '>=8.10.0'}
+    dependencies:
+      picomatch: registry.npmmirror.com/picomatch/2.3.1
+    dev: true
+
   registry.npmmirror.com/regexpp/3.2.0:
     resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/regexpp/-/regexpp-3.2.0.tgz}
     name: regexpp
@@ -2247,6 +2314,18 @@ packages:
       queue-microtask: registry.npmmirror.com/queue-microtask/1.2.3
     dev: true
 
+  registry.npmmirror.com/sass/1.49.9:
+    resolution: {integrity: sha512-YlYWkkHP9fbwaFRZQRXgDi3mXZShslVmmo+FVK3kHLUELHHEYrCmL1x6IUjC7wLS6VuJSAFXRQS/DxdsC4xL1A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/-/sass-1.49.9.tgz}
+    name: sass
+    version: 1.49.9
+    engines: {node: '>=12.0.0'}
+    hasBin: true
+    dependencies:
+      chokidar: registry.npmmirror.com/chokidar/3.5.3
+      immutable: registry.npmmirror.com/immutable/4.0.0
+      source-map-js: registry.npmmirror.com/source-map-js/1.0.2
+    dev: true
+
   registry.npmmirror.com/semver/7.3.5:
     resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/semver/-/semver-7.3.5.tgz}
     name: semver
@@ -2497,7 +2576,7 @@ packages:
       es-module-lexer: registry.npmmirror.com/es-module-lexer/0.9.3
       fs-extra: registry.npmmirror.com/fs-extra/10.0.1
       magic-string: registry.npmmirror.com/magic-string/0.25.9
-      vite: registry.npmmirror.com/vite/2.8.6
+      vite: registry.npmmirror.com/vite/2.8.6_sass@1.49.9
     transitivePeerDependencies:
       - supports-color
     dev: true
@@ -2513,14 +2592,15 @@ packages:
       '@windicss/plugin-utils': registry.npmmirror.com/@windicss/plugin-utils/1.8.3
       debug: registry.npmmirror.com/debug/4.3.3
       kolorist: registry.npmmirror.com/kolorist/1.5.1
-      vite: registry.npmmirror.com/vite/2.8.6
+      vite: registry.npmmirror.com/vite/2.8.6_sass@1.49.9
       windicss: registry.npmmirror.com/windicss/3.5.1
     transitivePeerDependencies:
       - supports-color
     dev: true
 
-  registry.npmmirror.com/vite/2.8.6:
+  registry.npmmirror.com/vite/2.8.6_sass@1.49.9:
     resolution: {integrity: sha512-e4H0QpludOVKkmOsRyqQ7LTcMUDF3mcgyNU4lmi0B5JUbe0ZxeBBl8VoZ8Y6Rfn9eFKYtdXNPcYK97ZwH+K2ug==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/-/vite-2.8.6.tgz}
+    id: registry.npmmirror.com/vite/2.8.6
     name: vite
     version: 2.8.6
     engines: {node: '>=12.2.0'}
@@ -2541,6 +2621,7 @@ packages:
       postcss: registry.npmmirror.com/postcss/8.4.8
       resolve: registry.npmmirror.com/resolve/1.22.0
       rollup: registry.npmmirror.com/rollup/2.70.0
+      sass: registry.npmmirror.com/sass/1.49.9
     optionalDependencies:
       fsevents: registry.npmmirror.com/fsevents/2.3.2
     dev: true

+ 4 - 14
src/App.vue

@@ -1,19 +1,9 @@
-<script setup lang="ts">
-  import HelloWorld from './components/HelloWorld.vue'
-</script>
+
 
 <template>
-  <img alt="Vue logo" src="./assets/logo.png" />
-  <HelloWorld msg="Hello Vue 3 + TypeScript + Vite" />
+  <router-view></router-view>
 </template>
-
+<script setup lang="ts">
+</script>
 <style>
-#app {
-  font-family: Avenir, Helvetica, Arial, sans-serif;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  text-align: center;
-  color: #2c3e50;
-  margin-top: 60px;
-}
 </style>

+ 0 - 24
src/components/HelloWorld.vue

@@ -1,24 +0,0 @@
-
-
-<template>
-  <van-button>123</van-button>
-  <div class="bg-black w-16 h-16"></div>
-</template>
-<script setup lang="ts">
-  import axiosIns from '@/api'
-  import { onMounted, ref } from 'vue'
-  console.log(import.meta.env)
-  defineProps<{ msg: string }>()
-
-  const count = ref(0)
-  console.log(count.value)
-
-  onMounted(async() => {
-    const res = axiosIns('lawyer-workbench/risk/dimension/page?dimensionCode=court_announcement&pageNum=1&pageSize=10&deleted=0&announcementType=&year=&entityType=2&entityName=%E5%AE%81%E5%BE%B7%E6%97%B6%E4%BB%A3%E6%96%B0%E8%83%BD%E6%BA%90%E7%A7%91%E6%8A%80%E8%82%A1%E4%BB%BD%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8&entityId=76d4d8ae15b063986d88abe92a5efe83')
-    console.log(res)
-
-  })
-
-</script>
-<style scoped>
-</style>

+ 43 - 0
src/components/List.vue

@@ -0,0 +1,43 @@
+<template>
+  <div>
+    1232131
+  </div>
+</template>
+
+<script lang="ts" setup>
+
+
+  import {ViewListInter,DemensionPagesInter,DemensionPagesListInter} from '@/js-pages/types'
+  import axiosIns from '@/api'
+  import pagesArr from '@/js-pages'
+  import {onMounted} from 'vue'
+
+  const newArr = []  as ViewListInter[]
+
+  const demensionArr = (arr: any[] ):DemensionPagesInter[]  => {
+    return arr.reduce((total, item:any) => {
+      return item.list ? demensionArr(item.list) : newArr.push(item)
+    },[])
+  }
+  demensionArr(pagesArr)
+  console.log(newArr)
+
+  // onMounted(async() => {
+  //   console.log(321)
+
+  //   const params = {
+  //     dimensionCode:'open_announcement',
+  //     pageNum:1,
+  //     pageSize:10,
+  //     deleted:0,
+  //     entityType:2,
+  //     entityName:'宁德时代新能源科技股份有限公司',
+  //     entityId:'76d4d8ae15b063986d88abe92a5efe83'
+  //   }
+  //   const res = axiosIns.get('lawyer-workbench/risk/dimension/page',{params})
+  //   console.log(res)
+  // })
+</script>
+
+<style lang="less" scoped>
+</style>

+ 36 - 0
src/js-pages/company-detail/FaLvFengXian/index.ts

@@ -0,0 +1,36 @@
+import { DemensionPagesInter } from './../../types'
+export const FaLvFengXian: DemensionPagesInter = {
+  projectName: '法律风险',
+  list: [
+    {
+      code: 'open_announcement',
+      routing: 'KaiTingGongGao',
+      title: '开庭公告',
+      viewList: [
+        {
+          name: '案号',
+          value: 'caseNo'
+        },
+        {
+          name: '开庭时间',
+          value: 'startDate'
+        }
+      ]
+    },
+    {
+      code: 'case_filing',
+      routing: 'LiAnXinXi',
+      title: '立案信息',
+      viewList: [
+        {
+          name: '案号',
+          value: 'caseNo'
+        },
+        {
+          name: '开庭时间',
+          value: 'startDate'
+        }
+      ]
+    }
+  ]
+}

+ 11 - 0
src/js-pages/company-detail/index.ts

@@ -0,0 +1,11 @@
+import { TotalDemensionInter } from './../types'
+import { FaLvFengXian } from './FaLvFengXian/index'
+
+const companyDetail: TotalDemensionInter = {
+  companyName: '企业详情',
+  list: []
+}
+
+companyDetail.list.push(FaLvFengXian)
+
+export default companyDetail

+ 8 - 0
src/js-pages/index.ts

@@ -0,0 +1,8 @@
+import { TotalDemensionInter } from './types'
+import companyDetail from './company-detail'
+
+const pagesArr: TotalDemensionInter[] = []
+
+pagesArr.push(companyDetail)
+
+export default pagesArr

+ 22 - 0
src/js-pages/types.ts

@@ -0,0 +1,22 @@
+
+export interface TotalDemensionInter {
+  companyName: string,
+  list: DemensionPagesInter[]
+}
+
+export interface DemensionPagesInter {
+  projectName: string,
+  list: DemensionPagesListInter[]
+}
+
+export interface DemensionPagesListInter {
+  code: string,
+  routing: string,
+  title: string,
+  viewList: ViewListInter[]
+}
+
+export interface ViewListInter {
+  name: string,
+  value: string
+}

+ 5 - 4
src/plugins/vant.ts

@@ -1,7 +1,8 @@
-import { Button } from 'vant';
-import { App } from 'vue';
+import { Button, Row } from 'vant'
+import { App } from 'vue'
 
 export const useVant = (app: App<Element>) => {
-  app.use(Button);
+  app.use(Button)
+  app.use(Row)
 
-}
+}

+ 24 - 4
src/router/index.ts

@@ -1,16 +1,36 @@
-import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
+import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
 const routes: Array<RouteRecordRaw> = [
+  {
+    path: '/',
+    name: '123',
+    component: () => import('@/views/demension/list.vue')
+  },
+  {
+    path: '/demension',
+    name: 'demension',
+    component: () => import('@/views/demension/list.vue')
+  },
+  {
+    path: '/det',
+    name: 'detail',
+    component: () => import('@/views/demension/detail.vue')
+  }
 ]
 
 const router = createRouter({
-  history: createWebHistory(),
+  history: createWebHashHistory(),
   routes
 })
 
 
-// router.beforeEach((to, from, next) => {
+router.beforeEach((to, from, next) => {
+  if (to.path === '/') {
+    next({ path: '/demension' })
+  }
+  next()
+  // console.log(to)
 
-// })
+})
 
 // router.afterEach((to) => {
 // })

+ 23 - 0
src/views/demension/detail.vue

@@ -0,0 +1,23 @@
+<template>
+  <div>
+    fdsfsdfds
+  </div>
+</template>
+
+<script lang="ts" setup>
+  import {reactive,ref,onMounted} from 'vue'
+  import { useRoute, useRouter } from 'vue-router'
+  const router = useRouter()
+  const route = useRoute()
+  const state = reactive({
+  })
+  onMounted(() => {
+  })
+</script>
+
+<style lang="scss" scoped>
+div{
+  display: flex;
+  align-items: center;
+}
+</style>

+ 14 - 0
src/views/demension/list.vue

@@ -0,0 +1,14 @@
+<template>
+  <div>
+    <ListVue />
+    21312321
+  </div>
+</template>
+
+<script lang="ts" setup>
+  import ListVue from '@/components/List.vue'
+
+</script>
+
+<style lang="scss" scoped>
+</style>