guhongwei 1 éve
szülő
commit
5164bc74b5

+ 10 - 1
src/router/index.ts

@@ -2,6 +2,11 @@ import { createRouter, createWebHistory } from 'vue-router';
 import store from '@/stores/counter';
 import axios from 'axios';
 
+import common from './module/common';
+import dock from './module/dock';
+import channel from './module/channel';
+import train from './module/train';
+
 const router = createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
   routes: [
@@ -18,7 +23,11 @@ const router = createRouter({
           path: '/homeIndex',
           meta: { title: '中科在线(长春)' },
           component: () => import('@/views/home/index.vue')
-        }
+        },
+        ...common,
+        ...dock,
+        ...channel,
+        ...train
       ]
     }
   ]

+ 1 - 0
src/router/module/channel.ts

@@ -0,0 +1 @@
+export default [];

+ 12 - 0
src/router/module/common.ts

@@ -0,0 +1,12 @@
+export default [
+  {
+    path: '/dock',
+    meta: { title: '展会管理' },
+    component: () => import('@/views/dock/index.vue')
+  },
+  {
+    path: '/video',
+    meta: { title: '展会管理' },
+    component: () => import('@/views/video/index.vue')
+  }
+];

+ 7 - 0
src/router/module/dock.ts

@@ -0,0 +1,7 @@
+export default [
+  {
+    path: '/imgtxt',
+    meta: { title: '图文管理' },
+    component: () => import('@/views/imgtxt/index.vue')
+  }
+];

+ 1 - 0
src/router/module/train.ts

@@ -0,0 +1 @@
+export default [];

+ 31 - 0
src/views/dock/index.vue

@@ -0,0 +1,31 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <cAchieve v-if="user.type == '7'" :user="user"></cAchieve>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import cAchieve from './parts/c-achieve.vue';
+import store from '@/stores/counter';
+import type { Ref } from 'vue';
+// reactive,
+import { onMounted, ref } from 'vue';
+
+// 加载中
+const loading: Ref<any> = ref(false);
+// 用户信息
+const user: Ref<any> = ref({});
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  user.value = store.state.user;
+  loading.value = false;
+});
+</script>
+<style scoped lang="scss"></style>

+ 26 - 0
src/views/dock/parts/c-achieve.vue

@@ -0,0 +1,26 @@
+<template>
+  <div id="c-achieve">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">系统首页</el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+// reactive,
+import { onMounted, ref } from 'vue';
+// 接口
+// 加载中
+const loading: Ref<any> = ref(false);
+
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  loading.value = false;
+});
+</script>
+<style scoped lang="scss"></style>

+ 0 - 2
src/views/home/index.vue

@@ -10,7 +10,6 @@
 
 <script setup lang="ts">
 // 基础
-import store from '@/stores/counter';
 import type { Ref } from 'vue';
 // reactive,
 import { onMounted, ref, getCurrentInstance } from 'vue';
@@ -28,7 +27,6 @@ const loading: Ref<any> = ref(false);
 onMounted(async () => {
   loading.value = true;
   //  await search({ skip, limit });
-  console.log(store.state.user);
   loading.value = false;
 });
 //const search = async (e: { skip: number; limit: number }) => {

+ 38 - 0
src/views/imgtxt/index.vue

@@ -0,0 +1,38 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">系统首页</el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+// reactive,
+import { onMounted, ref, getCurrentInstance } from 'vue';
+// 接口
+//import { TestStore } from '@common/src/stores/test';
+//import type { IQueryResult } from '@/util/types.util';
+//const testAxios = TestStore();
+const { proxy } = getCurrentInstance() as any;
+// 加载中
+const loading: Ref<any> = ref(false);
+// 分页数据
+//  const skip = 0;
+//  const limit = proxy.limit;;
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  //  await search({ skip, limit });
+  loading.value = false;
+});
+//const search = async (e: { skip: number; limit: number }) => {
+//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
+//  const res: IQueryResult = await testAxios.query(info);
+//  console.log(res);
+//};
+</script>
+<style scoped lang="scss"></style>

+ 38 - 0
src/views/video/index.vue

@@ -0,0 +1,38 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="one">系统首页</el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts">
+// 基础
+import type { Ref } from 'vue';
+// reactive,
+import { onMounted, ref, getCurrentInstance } from 'vue';
+// 接口
+//import { TestStore } from '@common/src/stores/test';
+//import type { IQueryResult } from '@/util/types.util';
+//const testAxios = TestStore();
+const { proxy } = getCurrentInstance() as any;
+// 加载中
+const loading: Ref<any> = ref(false);
+// 分页数据
+//  const skip = 0;
+//  const limit = proxy.limit;;
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  //  await search({ skip, limit });
+  loading.value = false;
+});
+//const search = async (e: { skip: number; limit: number }) => {
+//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
+//  const res: IQueryResult = await testAxios.query(info);
+//  console.log(res);
+//};
+</script>
+<style scoped lang="scss"></style>