YY hace 2 años
padre
commit
09c566925c

+ 23 - 10
.eslintrc.cjs

@@ -1,15 +1,28 @@
 /* eslint-env node */
-require('@rushstack/eslint-patch/modern-module-resolution')
+require('@rushstack/eslint-patch/modern-module-resolution');
 
 module.exports = {
   root: true,
-  'extends': [
-    'plugin:vue/vue3-essential',
-    'eslint:recommended',
-    '@vue/eslint-config-typescript',
-    '@vue/eslint-config-prettier/skip-formatting'
-  ],
+  extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier'],
   parserOptions: {
-    ecmaVersion: 'latest'
-  }
-}
+    ecmaVersion: 'latest',
+  },
+  rules: {
+    'vue/multi-word-component-names': 0,
+    'max-len': [
+      'warn',
+      {
+        code: 10000,
+      },
+    ],
+    'prettier/prettier': [
+      'warn',
+      {
+        singleQuote: true,
+        bracketSpacing: true,
+        jsxBracketSameLine: true,
+        printWidth: 160,
+      },
+    ],
+  },
+};

+ 4 - 6
.prettierrc.json

@@ -1,8 +1,6 @@
 {
-  "$schema": "https://json.schemastore.org/prettierrc",
-  "semi": false,
-  "tabWidth": 2,
   "singleQuote": true,
-  "printWidth": 100,
-  "trailingComma": "none"
-}
+  "printWidth": 160,
+  "bracketSpacing": true,
+  "endOfLine": "lf"
+}

BIN
src/assets/bg_1.png


BIN
src/assets/logo.png


BIN
src/assets/user.png


+ 81 - 0
src/components/studio-one-green/home-1.vue

@@ -0,0 +1,81 @@
+<template>
+  <div id="home">
+    <el-container class="main" :style="{ background: styleInfo.main_bg_color }">
+      <el-aside class="one" :style="{ background: styleInfo.aside_bg_color, 'border-color': styleInfo.aside_border_color }">
+        <sidebar1></sidebar1>
+      </el-aside>
+      <el-container class="two" :style="{ background: styleInfo.con_bg_color }">
+        <el-header class="two_1">
+          <header1></header1>
+        </el-header>
+        <el-main class="two_2" :style="{ background: styleInfo.conmain_bg_color, 'border-color': styleInfo.aside_border_color }">
+          <router-view></router-view>
+        </el-main>
+      </el-container>
+    </el-container>
+  </div>
+</template>
+<script setup lang="ts">
+import { studio_style_Info } from '../../layout/site';
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+import sidebar1 from './parts/header-1.vue';
+import header1 from './parts/sidebar-1.vue';
+let type: Ref<string> = ref('1');
+let styleInfo = studio_style_Info;
+</script>
+<!-- <script>
+import { studio_style_Info } from '../../layout/site';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'home',
+  props: {},
+  components: {
+    header1: () => import('./parts/header-1.vue'),
+    sidebar1: () => import('./parts/sidebar-1.vue'),
+  },
+  data: function () {
+    return {
+      styleInfo: studio_style_Info,
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+}; 
+</script>-->
+
+<style lang="scss" scoped>
+.main {
+  display: flex;
+  width: 100vw;
+  height: 100vh;
+  .one {
+    border-radius: 10px;
+    margin: 0.5vw;
+    padding: 0.5vw;
+    border: 1px solid;
+  }
+  .two {
+    min-width: 1200px;
+    .two_2 {
+      border-radius: 10px;
+      margin: 0.5vw;
+      padding: 0.5vw;
+      border: 1px solid;
+    }
+  }
+}
+</style>

+ 63 - 0
src/components/studio-one-green/home-2.vue

@@ -0,0 +1,63 @@
+<template>
+  <div id="home">
+    <el-container class="main">
+      <el-header>
+        <HomeHead></HomeHead>
+      </el-header>
+      <el-container class="two">
+        <el-aside width="300px">
+          <HomeLeft></HomeLeft>
+        </el-aside>
+        <el-main>
+          <el-col :span="24" class="two_1">
+            <router-view></router-view>
+          </el-col>
+        </el-main>
+      </el-container>
+    </el-container>
+  </div>
+</template>
+
+<script setup lang="ts">
+import HomeLeft from './parts1/header-1.vue';
+import HomeHead from './parts1/sidebar-1.vue';
+</script>
+
+<style lang="scss" scoped>
+.main {
+  display: flex;
+  overflow: hidden;
+  width: 100vw;
+  height: 100vh;
+  padding: 10px;
+  background-color: #fff2cc;
+  .el-header {
+    padding: 10px;
+    margin: 0 0 10px 0;
+    background-color: #e2f0d9;
+    border-radius: 10px;
+    border: 1px solid #727e96;
+  }
+  .two {
+    .el-aside {
+      background-color: #e2f0d9;
+      border-radius: 10px;
+      padding: 0.5vw;
+      margin: 0 0.5vw 0 0;
+      border: 1px solid #727e96;
+    }
+    .el-main {
+      padding: 0;
+      border-radius: 10px;
+      background-color: #dae3f3;
+      border: 1px solid #727e96;
+      .two_1 {
+        display: flex;
+        height: 90vh;
+        padding: 10px;
+        flex-direction: column;
+      }
+    }
+  }
+}
+</style>

+ 9 - 0
src/components/studio-one-green/home-3.vue

@@ -0,0 +1,9 @@
+<template>
+  <div id="home-3">
+    <router-view></router-view>
+  </div>
+</template>
+
+<script lang="ts" setup></script>
+
+<style lang="scss" scoped></style>

+ 80 - 0
src/components/studio-one-green/home.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="home">
+    <home1 v-if="type == '1'"></home1>
+    <home2 v-else-if="type == '2'"></home2>
+    <home3 v-else-if="type == '3'"></home3>
+  </div>
+</template>
+<script setup lang="ts">
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+import home1 from './home-1.vue';
+import home2 from './home-2.vue';
+import home3 from './home-3.vue';
+let type: Ref<string> = ref('1');
+</script>
+
+<!-- <script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('role');
+const { mapActions: module } = createNamespacedHelpers('module');
+export default {
+  name: 'home',
+  props: {},
+  components: {
+    home1: () => import('./home-1.vue'),
+    home2: () => import('./home-2.vue'),
+    home3: () => import('./home-3.vue'),
+  },
+  data: function () {
+    return {
+      type: '1',
+    };
+  },
+  created() {},
+  methods: {
+    ...mapActions(['um']),
+    ...module({ mQuery: 'query' }),
+    async searchType(e) {
+      let name = process.env.VUE_APP_ROUTER;
+      let res = await this.mQuery({ name: name, is_use: 'Y' });
+      if (res && res.errcode == '0') {
+        if (res.total > 0) {
+          let moduleInfo = res.data[0];
+          let roleInfo = await this.um();
+          if (roleInfo.errcode == '0') {
+            if (roleInfo.data) {
+              let menus = roleInfo.data[moduleInfo._id];
+              if (menus && menus.length > 0) {
+                if (e && e.role_type == '1') this.$set(this, `type`, '1');
+                else if ((e && e.role_type == '2') || (e && e.role_type == '3')) this.$set(this, `type`, '2');
+                localStorage.setItem('is_role', true);
+              } else {
+                this.$set(this, `type`, '2');
+                localStorage.setItem('is_role', false);
+              }
+            }
+          }
+        }
+      } else {
+        this.$message({ message: `${res.errmsg}`, type: 'error' });
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    user: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        if (val && val._id) this.searchType(val);
+      },
+    },
+  },
+};
+</script> -->

+ 101 - 0
src/components/studio-one-green/parts/header-1.vue

@@ -0,0 +1,101 @@
+<template>
+  <div id="header-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="8" class="one">
+          <span>欢迎进入</span>
+          <span>{{ siteInfo.zhTitle }}</span>
+        </el-col>
+        <el-col :span="16" class="two">
+          <el-button
+            size="small"
+            plain
+            v-for="(item, index) in moduleList"
+            :key="index"
+            @click="modulePath(item)"
+            :class="[active == item.active ? 'active' : '']"
+            >{{ item.name }}</el-button
+          >
+          <template v-slot:dropdown>
+            <el-dropdown @command="toDrop">
+              <el-button type="danger" plain>
+                {{ user && user._id ? user.name || user.unit_name || user.nick_name : '暂无昵称' }}
+                <i class="el-icon-arrow-down el-icon--right"></i>
+              </el-button>
+
+              <el-dropdown-menu>
+                <el-dropdown-item icon="el-icon-user" command="center">个人中心</el-dropdown-item>
+                <el-dropdown-item icon="el-icon-switch-button" command="logout">退出登录</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script setup lang="ts">
+import { studio_style_Info, project_module_menus } from '@/layout/site';
+import { reactive, ref, onMounted } from 'vue';
+import type { Ref } from 'vue';
+let siteInfo = studio_style_Info.webInfo;
+let active = 3;
+let moduleList: Ref<any[]> = ref([]);
+let user: Ref<{ _id: string; name: string; nick_name: string; unit_name: string }> = ref({ _id: '', name: '', nick_name: '', unit_name: '' });
+onMounted(async () => {
+  await search();
+});
+const search = () => {
+  // let menu = project_module_menus.filter((i) => i.type.includes(process.env.VUE_APP_ROUTER));
+  // if (menu) this.$set(this, `moduleList`, menu);
+  moduleList.value = project_module_menus;
+};
+const toDrop = (e: any) => {
+  if (e == 'logout') {
+    localStorage.removeItem('token');
+    // window.location.href = `${process.env.VUE_APP_HOST}`;
+  } else if (e == 'center') {
+    // this.$router.push({ path: '/userInfo/center' });
+  }
+};
+const toPath = (e: any) => {
+  // this.$router.push({ path: `${e}` });
+};
+// 模块跳转
+const modulePath = (e: any) => {
+  window.location.href = `${e.path}`;
+};
+</script>
+
+<style lang="scss" scoped>
+.main {
+  .one {
+    text-align: left;
+    margin: 1vw 0;
+
+    span {
+      font-weight: bold;
+      font-size: 20px;
+    }
+    span:nth-child(1) {
+      color: #ff0000;
+
+      font-size: 25px;
+      padding: 0 5px 0 0;
+    }
+  }
+  .two {
+    text-align: right;
+    margin: 0.8vw 0;
+    button {
+      margin: 0 0 0 10px;
+    }
+    .el-button {
+      margin: 0 0 0 10px;
+    }
+    .active {
+      color: #07c4a8;
+    }
+  }
+}
+</style>

+ 152 - 0
src/components/studio-one-green/parts/sidebar-1.vue

@@ -0,0 +1,152 @@
+<template>
+  <div id="aside-1">
+    <el-row>
+      <el-col :span="24" class="aside">
+        <el-menu
+          :default-active="onRoutes"
+          unique-opened
+          router
+          :background-color="styleInfo.menus_bg_color"
+          :text-color="styleInfo.menus_txt_color"
+          :active-text-color="styleInfo.menus_actxt_color"
+        >
+          <template v-for="item in items">
+            <template v-if="item.type === '0'">
+              <el-submenu :index="item._id" :key="item._id">
+                <template v-slot:title>
+                  <i :class="['iconfont', item.icon]"></i>
+                  <span>{{ item.name }}</span>
+                </template>
+                <template v-for="subItem in item.children">
+                  <el-submenu v-if="subItem.children && subItem.children.length > 0" :index="subItem._id" :key="subItem._id">
+                    <template v-slot:title>
+                      <i :class="['iconfont', subItem.icon]"></i>
+                      <span>{{ subItem.name }}</span>
+                    </template>
+                    <el-menu-item v-for="(threeItem, i) in subItem.children" :key="i" :index="threeItem.path">
+                      <template v-slot:title>
+                        <i :class="['iconfont', threeItem.icon]"></i>
+                        <span>{{ threeItem.name }}</span>
+                      </template>
+                    </el-menu-item>
+                  </el-submenu>
+                  <el-menu-item v-else :index="subItem.path" :key="subItem.path">
+                    <template v-slot:title>
+                      <i :class="['iconfont', subItem.icon]"></i>
+                      <span>{{ subItem.name }}</span>
+                    </template>
+                  </el-menu-item>
+                </template>
+              </el-submenu>
+            </template>
+            <template v-else>
+              <el-menu-item :index="item.path" :key="item.path">
+                <i :class="['iconfont', item.icon]"></i>
+                <span>{{ item.name }}</span>
+              </el-menu-item>
+            </template>
+          </template>
+        </el-menu>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script setup lang="ts">
+import type { Ref } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+import { studio_style_Info } from '../../../layout/site';
+let items: Ref<any[]> = ref([]);
+let styleInfo = studio_style_Info;
+const getMenu = async (e: any) => {
+  let name = process.env.VUE_APP_ROUTER;
+  let res = await this.mQuery({ name: name, is_use: 'Y' });
+  if (res && res.errcode == '0') {
+    if (res.total > 0) {
+      let moduleInfo = res.data[0];
+      let roleInfo = await this.um();
+      if (roleInfo.errcode == '0') {
+        if (roleInfo.data) {
+          let menus = roleInfo.data[moduleInfo._id];
+          if (menus && menus.length > 0) {
+            items.value = menus;
+          }
+        }
+      }
+    }
+  } else {
+    this.$message({ message: `${res.errmsg}`, type: 'error' });
+  }
+};
+</script>
+<!-- <script>
+
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('role');
+const { mapActions: module } = createNamespacedHelpers('module');
+export default {
+  name: 'aside-1',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      items: [],
+      styleInfo: studio_style_Info,
+    };
+  },
+  created() {},
+  methods: {
+    ...mapActions(['um']),
+    ...module({ mQuery: 'query' }),
+    async getMenu(e) {
+      let name = process.env.VUE_APP_ROUTER;
+      let res = await this.mQuery({ name: name, is_use: 'Y' });
+      if (res && res.errcode == '0') {
+        if (res.total > 0) {
+          let moduleInfo = res.data[0];
+          let roleInfo = await this.um();
+          if (roleInfo.errcode == '0') {
+            if (roleInfo.data) {
+              let menus = roleInfo.data[moduleInfo._id];
+              if (menus && menus.length > 0) {
+                this.$set(this, `items`, menus);
+              }
+            }
+          }
+        }
+      } else {
+        this.$message({ message: `${res.errmsg}`, type: 'error' });
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    onRoutes() {
+      return this.$route.path;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    user: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        if (val && val._id) this.getMenu(val);
+        else this.$message({ message: `暂无用户信息,无法获取菜单信息`, type: 'error' });
+      },
+    },
+  },
+};
+</script> -->
+
+<style lang="scss" scoped>
+.el-menu-item.is-active {
+  background-color: #65cd94 !important;
+}
+.el-menu-item:focus,
+.el-menu-item:hover {
+  background-color: #65cd94 !important;
+  color: #ffffff !important;
+}
+</style>

+ 112 - 0
src/components/studio-one-green/parts1/header-1.vue

@@ -0,0 +1,112 @@
+<template>
+  <div id="header-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="8" class="one">
+          <span>{{ siteInfo.zhTitle }}</span>
+        </el-col>
+        <el-col :span="16" class="two">
+          <el-button
+            size="small"
+            plain
+            v-for="(item, index) in moduleList"
+            :key="index"
+            @click="modulePath(item)"
+            :class="[active == item.active ? 'active' : '']"
+            >{{ item.name }}</el-button
+          >
+          <el-dropdown @command="toDrop">
+            <el-button type="danger" plain>
+              {{ user && user._id ? user.name || user.unit_name || user.nick_name : '暂无昵称' }}
+              <i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu>
+              <el-dropdown-item icon="el-icon-user" command="center">个人中心</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-switch-button" command="logout">退出登录</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { studio_style_Info, project_module_menus } from '../../../layout/site';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'header-1',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      siteInfo: studio_style_Info.webInfo,
+      active: 3,
+      moduleList: [],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    search() {
+      // let menu = project_module_menus.filter((i) => i.type.includes(process.env.VUE_APP_ROUTER));
+      // if (menu) this.$set(this, `moduleList`, menu);
+      this.$set(this, `moduleList`, project_module_menus);
+    },
+    toDrop(e) {
+      if (e == 'logout') {
+        localStorage.removeItem('token');
+        window.location.href = `${import.meta.env.VUE_APP_HOST}`;
+      } else if (e == 'center') {
+        this.$router.push({ path: '/userInfo/center' });
+      }
+    },
+    toPath(e) {
+      this.$router.push({ path: `${e}` });
+    },
+    // 模块跳转
+    modulePath(e) {
+      window.location.href = `${e.path}`;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.main {
+  .one {
+    span {
+      display: inline-block;
+      background-color: #ffc000;
+      padding: 8px 10px;
+      border: 1px solid #ffffff;
+    }
+  }
+  .two {
+    text-align: right;
+    button {
+      margin: 0 0 0 10px;
+    }
+    .el-button {
+      margin: 0 0 0 10px;
+    }
+    .active {
+      color: #07c4a8;
+    }
+  }
+}
+</style>

+ 126 - 0
src/components/studio-one-green/parts1/sidebar-1.vue

@@ -0,0 +1,126 @@
+<template>
+  <div id="aside-1">
+    <el-row>
+      <el-col :span="24" class="aside">
+        <el-menu
+          :default-active="onRoutes"
+          unique-opened
+          router
+          :background-color="styleInfo.menus_bg_color"
+          :text-color="styleInfo.menus_txt_color"
+          :active-text-color="styleInfo.menus_actxt_color"
+        >
+          <template v-for="item in items">
+            <template v-if="item.type === '0'">
+              <el-submenu :index="item._id" :key="item._id">
+                <template >
+                  <i :class="['iconfont', item.icon]"></i>
+                  <span >{{ item.name }}</span>
+                </template>
+                <template v-for="subItem in item.children">
+                  <el-submenu v-if="subItem.children && subItem.children.length > 0" :index="subItem._id" :key="subItem._id">
+                    <template >
+                      <i :class="['iconfont', subItem.icon]"></i>
+                      <span >{{ subItem.name }}</span>
+                    </template>
+                    <el-menu-item v-for="(threeItem, i) in subItem.children" :key="i" :index="threeItem.path">
+                      <template >
+                        <i :class="['iconfont', threeItem.icon]"></i>
+                        <span >{{ threeItem.name }}</span>
+                      </template>
+                    </el-menu-item>
+                  </el-submenu>
+                  <el-menu-item v-else :index="subItem.path" :key="subItem.path">
+                    <template >
+                      <i :class="['iconfont', subItem.icon]"></i>
+                      <span >{{ subItem.name }}</span>
+                    </template>
+                  </el-menu-item>
+                </template>
+              </el-submenu>
+            </template>
+            <template v-else>
+              <el-menu-item :index="item.path" :key="item.path">
+                <i :class="['iconfont', item.icon]"></i>
+                <span >{{ item.name }}</span>
+              </el-menu-item>
+            </template>
+          </template>
+        </el-menu>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { studio_style_Info } from '../../../layout/site';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('role');
+const { mapActions: module } = createNamespacedHelpers('module');
+export default {
+  name: 'aside-1',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      items: [],
+      styleInfo: studio_style_Info,
+    };
+  },
+  created() {},
+  methods: {
+    ...mapActions(['um']),
+    ...module({ mQuery: 'query' }),
+    async getMenu(e) {
+      let name = import.meta.env.VUE_APP_ROUTER;
+      let res = await this.mQuery({ name: name, is_use: 'Y' });
+      if (res && res.errcode == '0') {
+        if (res.total > 0) {
+          let moduleInfo = res.data[0];
+          let roleInfo = await this.um();
+          if (roleInfo.errcode == '0') {
+            if (roleInfo.data) {
+              let menus = roleInfo.data[moduleInfo._id];
+              if (menus && menus.length > 0) {
+                this.$set(this, `items`, menus);
+              }
+            }
+          }
+        }
+      } else {
+        this.$message({ message: `${res.errmsg}`, type: 'error' });
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    onRoutes() {
+      return this.$route.path;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    user: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        if (val && val._id) this.getMenu(val);
+        else this.$message({ message: `暂无用户信息,无法获取菜单信息`, type: 'error' });
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-menu-item.is-active {
+  background-color: #65cd94 !important;
+}
+.el-menu-item:focus,
+.el-menu-item:hover {
+  background-color: #65cd94 !important;
+  color: #ffffff !important;
+}
+</style>

+ 30 - 0
src/layout/i18n.ts

@@ -0,0 +1,30 @@
+export const messages = {
+  zh: {
+    i18n: {
+      breadcrumb: '国际化产品',
+      tips: '通过切换语言按钮,来改变当前内容的语言。',
+      btn: '切换英文',
+      title1: '常用用法',
+      p1: '要是你把你的秘密告诉了风,那就别怪风把它带给树。',
+      p2: '没有什么比信念更能支撑我们度过艰难的时光了。',
+      p3: '只要能把自己的事做好,并让自己快乐,你就领先于大多数人了。',
+      title2: '组件插值',
+      info: 'Element组件需要国际化,请参考 {action}。',
+      value: '文档',
+    },
+  },
+  en: {
+    i18n: {
+      breadcrumb: 'International Products',
+      tips: 'Click on the button to change the current language. ',
+      btn: 'Switch Chinese',
+      title1: 'Common usage',
+      p1: 'If you reveal your secrets to the wind you should not blame the wind for  revealing them to the trees.',
+      p2: 'Nothing can help us endure dark times better than our faith. ',
+      p3: "If you can do what you do best and be happy, you're further along in life  than most people.",
+      title2: 'Component interpolation',
+      info: 'The default language of Element is Chinese. If you wish to use another language, please refer to the {action}.',
+      value: 'documentation',
+    },
+  },
+};

+ 811 - 0
src/layout/site.ts

@@ -0,0 +1,811 @@
+// 网站基本设置
+export const webInfo = {
+  display: true,
+  zhTitle: '基础研究动态管理平台',
+  enTitle: 'Dynamic management platform for basic research',
+  logo_url: new URL('../assets/logo.png'),
+  user_url: new URL('../assets/user.png'),
+  content: 'Copyright  2018-2022 free All Rights Reserved.',
+  smallTtitle: '基础研究动态',
+  one_title: '鼓励探索、突出原创',
+  two_title: '聚焦前沿、独辟蹊径',
+  thr_title: '需求牵引、突破瓶颈',
+  four_title: '共性导向、交叉融通'
+}
+// 超级管理员项目基本设置
+export const admin_style_Info = {
+  // 主体背景颜色
+  main_bg_color: '#f0f0f0',
+  // 头部
+  header_bg_color: '#07c4a8',
+  // 左侧菜单部分
+  aside_bg_color: '#07c4a8',
+  aside_border_color: '#ffffff',
+  // 内容显示部分
+  routerview_bg_color: '#ffffff',
+};
+// 管理员项目基本设置
+export const basic_style_Info = {
+  // 主体背景颜色
+  main_bg_color: '#f0f0f0',
+  // 头部
+  header_bg_color: '#07c4a8',
+  // 左侧菜单部分
+  aside_bg_color: '#07c4a8',
+  aside_border_color: '#ffffff',
+  // 内容显示部分
+  routerview_bg_color: '#ffffff',
+};
+// 项目管理项目基本设置
+export const project_style_Info = {
+  webInfo: {
+    display: true,
+    zhTitle: '吉林省项目动态管理平台',
+  },
+  // 主体背景颜色
+  main_bg_color: '#f0f0f0',
+  // 头部
+  header_bg_color: '#07c4a8',
+  // 左侧菜单部分
+  aside_bg_color: '#07c4a8',
+  aside_border_color: '#ffffff',
+  // 内容显示部分
+  routerview_bg_color: '#ffffff',
+};
+// 科学家工作室管理项目基本设置
+export const studio_style_Info = {
+  webInfo: {
+    display: true,
+    zhTitle: '吉林省科学家工作室',
+  },
+  // 主体背景颜色
+  main_bg_color: '#fff2cc',
+  // 左侧菜单部分
+  aside_bg_color: '#e2f0d9',
+  aside_border_color: '#727e96',
+  menus_bg_color: '#A2E1F7',
+  menus_txt_color: '#000000',
+  menus_actxt_color: '#ffffff',
+  // 右侧主要内容部分
+  con_bg_color: '#fff2cc',
+  conmain_bg_color: '#dae3f3',
+};
+// 模块设置
+export const project_module_menus = [
+  {
+    icon: 'el-icon-user',
+    name: '基础研究动态管理平台',
+    path: '/admin',
+    type: 'basic,project,studio',
+    active: '0',
+  },
+  // {
+  //   icon: 'el-icon-user',
+  //   name: '省重点实验室',
+  //   path: '/basic',
+  //   type: 'admin,project,studio',
+  //   active: '1',
+  // },
+  {
+    icon: 'el-icon-user',
+    name: '项目管理',
+    path: '/project',
+    type: 'admin,basic,studio',
+    active: '2',
+  },
+  {
+    icon: 'el-icon-user',
+    name: '科学家工作室管理',
+    path: '/studio',
+    type: 'admin,basic,project',
+    active: '3',
+  },
+];
+// 菜单
+export const admin_menus = [
+  {
+    id: 'menus_1',
+    icon: 'el-icon-user',
+    name: '系统首页',
+    path: '/homeIndex',
+    type: '',
+  },
+  {
+    _id: 'menus_2',
+    icon: 'el-icon-user',
+    name: '系统管理',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_2_1',
+        icon: 'el-icon-user',
+        name: '用户管理',
+        type: '1',
+        children: [
+          {
+            _id: 'menus_2_1_1',
+            icon: 'el-icon-user',
+            name: '管理员',
+            path: '/system/user/admin',
+          },
+          {
+            _id: 'menus_2_1_2',
+            icon: 'el-icon-user',
+            name: '依托单位',
+            path: '/system/user/unit',
+          },
+          {
+            _id: 'menus_2_1_3',
+            icon: 'el-icon-user',
+            name: '个人账号',
+            path: '/system/user/personal',
+          },
+        ],
+      },
+      {
+        _id: 'menus_2_2',
+        icon: 'el-icon-user',
+        name: '角色管理',
+        path: '/system/role',
+      },
+      {
+        _id: 'menus_2_3',
+        icon: 'el-icon-user',
+        name: '平台项目管理',
+        path: '/system/module',
+      },
+      {
+        _id: 'menus_2_4',
+        icon: 'el-icon-user',
+        name: '字典管理',
+        path: '/system/dict',
+      },
+      {
+        _id: 'menus_2_5',
+        icon: 'el-icon-user',
+        name: '地区管理',
+        path: '/system/place',
+      },
+      {
+        _id: 'menus_2_6',
+        icon: 'el-icon-user',
+        name: '通知公告',
+        path: '/system/notice',
+      },
+      {
+        _id: 'menus_2_7',
+        icon: 'el-icon-user',
+        name: '查看公告',
+        path: '/system/noticeview',
+      },
+    ],
+  },
+  {
+    _id: 'menus_3',
+    icon: 'el-icon-user',
+    name: '账号管理',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_3_1',
+        icon: 'el-icon-user',
+        name: '账号信息',
+        path: '/account/info',
+      },
+      {
+        _id: 'menus_3_2',
+        icon: 'el-icon-user',
+        name: '修改密码',
+        path: '/account/updatepd',
+      },
+    ],
+  },
+];
+export const basic_menus = [
+  {
+    id: 'menus_1',
+    icon: 'el-icon-user',
+    name: '系统首页',
+    path: '/homeIndex',
+    type: '',
+  },
+  {
+    _id: 'menus_2',
+    icon: 'el-icon-user',
+    name: '二级菜单',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_2_1',
+        icon: 'el-icon-user',
+        name: '二级菜单-1',
+        path: '/test/test1',
+      },
+      {
+        _id: 'menus_2_2',
+        icon: 'el-icon-user',
+        name: '三级菜单',
+        type: '2',
+        children: [
+          {
+            _id: 'menus_2_2_1',
+            icon: 'el-icon-user',
+            name: '三级菜单-1',
+            path: '/test/test2/test1',
+          },
+        ],
+      },
+    ],
+  },
+];
+// 个人用户菜单
+// export const project_menus = [
+//   {
+//     id: 'menus_1',
+//     icon: 'el-icon-user',
+//     name: '系统首页',
+//     path: '/homeIndex',
+//     type: '',
+//   },
+//   {
+//     id: 'menus_2',
+//     icon: 'el-icon-user',
+//     name: '科研项目',
+//     path: '/project',
+//     type: '',
+//   },
+//   {
+//     _id: 'menus_3',
+//     icon: 'el-icon-user',
+//     name: '项目管理',
+//     type: '0',
+//     children: [
+//       {
+//         _id: 'menus_3_1',
+//         icon: 'el-icon-user',
+//         name: '发表学术论文',
+//         path: '/project/platform/paper',
+//       },
+//       {
+//         _id: 'menus_3_2',
+//         icon: 'el-icon-user',
+//         name: '其他成果',
+//         path: '/project/platform/other',
+//       },
+//       {
+//         _id: 'menus_3_3',
+//         icon: 'el-icon-user',
+//         name: '获奖情况',
+//         path: '/project/platform/award',
+//       },
+//       {
+//         _id: 'menus_3_4',
+//         icon: 'el-icon-user',
+//         name: '成果转化',
+//         path: '/project/platform/achieve',
+//       },
+//       {
+//         _id: 'menus_3_5',
+//         icon: 'el-icon-user',
+//         name: '学术交流',
+//         type: '2',
+//         children: [
+//           {
+//             _id: 'menus_3_5_1',
+//             icon: 'el-icon-user',
+//             name: '省部级及以上活动',
+//             path: '/project/xueshu/socialservices',
+//           },
+//           {
+//             _id: 'menus_3_5_2',
+//             icon: 'el-icon-user',
+//             name: '科普活动',
+//             path: '/project/xueshu/scienceactivities',
+//           },
+//           {
+//             _id: 'menus_3_5_3',
+//             icon: 'el-icon-user',
+//             name: '发表/提交报告',
+//             path: '/project/xueshu/report',
+//           },
+//         ],
+//       },
+//       {
+//         _id: 'menus_3_6',
+//         icon: 'el-icon-user',
+//         name: '队伍建设与人才培养',
+//         type: '2',
+//         children: [
+//           {
+//             _id: 'menus_3_6_1',
+//             icon: 'el-icon-user',
+//             name: '省部级以上人才称号',
+//             path: '/project/jianshe/personnelname',
+//           },
+//           {
+//             _id: 'menus_3_6_2',
+//             icon: 'el-icon-user',
+//             name: '职称晋升',
+//             path: '/project/jianshe/title',
+//           },
+//           {
+//             _id: 'menus_3_6_3',
+//             icon: 'el-icon-user',
+//             name: '博硕培养',
+//             path: '/project/jianshe/doctor',
+//           },
+//         ],
+//       },
+//       {
+//         _id: 'menus_3_7',
+//         icon: 'el-icon-user',
+//         name: '重要进展及重大报告',
+//         path: '/project/outcome',
+//       },
+//     ],
+//   },
+//   {
+//     _id: 'menus_4',
+//     icon: 'el-icon-user',
+//     name: '项目指南建议征集',
+//     type: '0',
+//     children: [
+//       {
+//         _id: 'menus_4_1',
+//         icon: 'el-icon-user',
+//         name: '2024年度国家自然科学基金区域创新发展联合基金指南建议申报',
+//         path: '/project/guide/declare',
+//       },
+//     ],
+//   },
+// ];
+// 依托单位菜单
+// export const project_menus = [
+//   {
+//     id: 'menus_1',
+//     icon: 'el-icon-user',
+//     name: '系统首页',
+//     path: '/homeIndex',
+//     type: '',
+//   },
+//   {
+//     id: 'menus_2',
+//     icon: 'el-icon-user',
+//     name: '项目管理',
+//     path: '/project/views',
+//     type: '',
+//   },
+//   {
+//     _id: 'menus_3',
+//     icon: 'el-icon-user',
+//     name: '项目指南建议征集',
+//     type: '0',
+//     children: [
+//       {
+//         _id: 'menus_3_1',
+//         icon: 'el-icon-user',
+//         name: '建议审核',
+//         path: '/project/guide/exam',
+//       },
+//     ],
+//   },
+// ];
+// 管理员菜单
+export const project_menus = [
+  {
+    id: 'menus_1',
+    icon: 'el-icon-user',
+    name: '系统首页',
+    path: '/homeIndex',
+    type: '',
+  },
+  {
+    id: 'menus_2',
+    icon: 'el-icon-user',
+    name: '科研项目',
+    path: '/project',
+    type: '',
+  },
+  {
+    id: 'menus_3',
+    icon: 'el-icon-user',
+    name: '项目管理',
+    path: '/project/views',
+    type: '',
+  },
+  {
+    _id: 'menus_4',
+    icon: 'el-icon-user',
+    name: '项目管理',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_4_1',
+        icon: 'el-icon-user',
+        name: '发表学术论文',
+        path: '/project/platform/paper',
+      },
+      {
+        _id: 'menus_4_2',
+        icon: 'el-icon-user',
+        name: '其他成果',
+        path: '/project/platform/other',
+      },
+      {
+        _id: 'menus_4_3',
+        icon: 'el-icon-user',
+        name: '获奖情况',
+        path: '/project/platform/award',
+      },
+      {
+        _id: 'menus_4_4',
+        icon: 'el-icon-user',
+        name: '成果转化',
+        path: '/project/platform/achieve',
+      },
+      {
+        _id: 'menus_4_5',
+        icon: 'el-icon-user',
+        name: '学术交流',
+        type: '2',
+        children: [
+          {
+            _id: 'menus_4_5_1',
+            icon: 'el-icon-user',
+            name: '省部级及以上活动',
+            path: '/project/xueshu/socialservices',
+          },
+          {
+            _id: 'menus_4_5_2',
+            icon: 'el-icon-user',
+            name: '科普活动',
+            path: '/project/xueshu/scienceactivities',
+          },
+          {
+            _id: 'menus_4_5_3',
+            icon: 'el-icon-user',
+            name: '发表/提交报告',
+            path: '/project/xueshu/report',
+          },
+        ],
+      },
+      {
+        _id: 'menus_4_6',
+        icon: 'el-icon-user',
+        name: '队伍建设与人才培养',
+        type: '2',
+        children: [
+          {
+            _id: 'menus_4_6_1',
+            icon: 'el-icon-user',
+            name: '省部级以上人才称号',
+            path: '/project/jianshe/personnelname',
+          },
+          {
+            _id: 'menus_4_6_2',
+            icon: 'el-icon-user',
+            name: '职称晋升',
+            path: '/project/jianshe/title',
+          },
+          {
+            _id: 'menus_4_6_3',
+            icon: 'el-icon-user',
+            name: '博硕培养',
+            path: '/project/jianshe/doctor',
+          },
+        ],
+      },
+      {
+        _id: 'menus_4_7',
+        icon: 'el-icon-user',
+        name: '重要进展及重大报告',
+        path: '/project/outcome',
+      },
+    ],
+  },
+  {
+    _id: 'menus_5',
+    icon: 'el-icon-user',
+    name: '项目指南建议征集',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_5_1',
+        icon: 'el-icon-user',
+        name: '2024年度国家自然科学基金区域创新发展联合基金指南建议申报',
+        path: '/project/guide/declare',
+      },
+      {
+        _id: 'menus_5_2',
+        icon: 'el-icon-user',
+        name: '建议审核',
+        path: '/project/guide/exam',
+      },
+      {
+        _id: 'menus_5_3',
+        icon: 'el-icon-user',
+        name: '建议审核结束',
+        path: '/project/guide/endGuide',
+      },
+    ],
+  },
+];
+export const studio_menus = [
+  {
+    id: 'menus_1',
+    icon: 'el-icon-user',
+    name: '系统首页',
+    path: '/homeIndex',
+    type: '',
+  },
+  {
+    _id: 'menus_2',
+    icon: 'el-icon-user',
+    name: '用户管理',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_2_1',
+        icon: 'el-icon-user',
+        name: '依托单位',
+        path: '/users/company',
+      },
+      {
+        _id: 'menus_2_2',
+        icon: 'el-icon-user',
+        name: '科学家',
+        path: '/users/scientist',
+      },
+    ],
+  },
+  {
+    _id: 'menus_3',
+    icon: 'el-icon-user',
+    name: '科学家工作室',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_3_1',
+        icon: 'el-icon-user',
+        name: '信息列表',
+        path: '/studio/info',
+      },
+      {
+        _id: 'menus_3_2',
+        icon: 'el-icon-user',
+        name: '年度报告',
+        path: '/studio/year',
+      },
+      {
+        _id: 'menus_3_3',
+        icon: 'el-icon-user',
+        name: '保留资质',
+        path: '/studio/flair',
+      },
+    ],
+  },
+  {
+    _id: 'menus_4',
+    icon: 'el-icon-user',
+    name: '技术供求',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_4_1',
+        icon: 'el-icon-user',
+        name: '技术支持',
+        path: '/supplydemand/support',
+      },
+      {
+        _id: 'menus_4_2',
+        icon: 'el-icon-user',
+        name: '技术需求',
+        path: '/supplydemand/demand',
+      },
+    ],
+  },
+  {
+    _id: 'menus_5',
+    icon: 'el-icon-user',
+    name: '其他内容',
+    type: '0',
+    children: [
+      {
+        _id: 'menus_4_1',
+        icon: 'el-icon-user',
+        name: '成果展示',
+        path: '/other/achieve',
+      },
+      {
+        _id: 'menus_4_2',
+        icon: 'el-icon-user',
+        name: '通知公告',
+        path: '/other/notice',
+      },
+      {
+        _id: 'menus_4_3',
+        icon: 'el-icon-user',
+        name: '相关下载',
+        path: '/other/download',
+      },
+      {
+        _id: 'menus_4_4',
+        icon: 'el-icon-user',
+        name: '联系处室',
+        path: '/other/contact',
+      },
+      {
+        _id: 'menus_4_5',
+        icon: 'el-icon-user',
+        name: '系统消息',
+        path: '/other/message',
+      },
+    ],
+  },
+];
+// 问题来源
+export const question_origin = [
+  {
+    dict_sort: '0',
+    dict_label: '企业科技问题',
+    dict_value: '企业科技问题',
+    dict_type: 'question_origin',
+    status: '0',
+    remark: '问题来源',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '独立提出',
+    dict_value: '独立提出',
+    dict_type: 'question_origin',
+    status: '0',
+    remark: '问题来源',
+  },
+];
+// 企业科技问题
+export const company_question = [
+  {
+    dict_sort: '0',
+    dict_label: '基于新型锑化物超晶格异质结的高性能红外探测芯片关键技术',
+    dict_value: '基于新型锑化物超晶格异质结的高性能红外探测芯片关键技术',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '结构可控的功能化水性聚氨酯基涂层的构筑、性能及其机理',
+    dict_value: '结构可控的功能化水性聚氨酯基涂层的构筑、性能及其机理',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '季冻区轨道交通工程绿色纤维UHPC耐复杂环境结构性能研究',
+    dict_value: '季冻区轨道交通工程绿色纤维UHPC耐复杂环境结构性能研究',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '自由曲面多阶段超精密加工工艺链数字孪生的基础研究',
+    dict_value: '自由曲面多阶段超精密加工工艺链数字孪生的基础研究',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '花生高油酸性状对耐寒性的影响及其机理',
+    dict_value: '花生高油酸性状对耐寒性的影响及其机理',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '寒地黑猪品种优质抗逆特性形成机理',
+    dict_value: '寒地黑猪品种优质抗逆特性形成机理',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '米级量程纳米精度多自由度光栅位移测量机理与关键技术',
+    dict_value: '米级量程纳米精度多自由度光栅位移测量机理与关键技术',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '通遥一体的在轨数据实时分析处理方法',
+    dict_value: '通遥一体的在轨数据实时分析处理方法',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '高速电动磁浮车载超导磁体的服役可靠性与行为演变',
+    dict_value: '高速电动磁浮车载超导磁体的服役可靠性与行为演变',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '伺服阀壳体磨粒流精密抛光表面完整性及多余物去除机理',
+    dict_value: '伺服阀壳体磨粒流精密抛光表面完整性及多余物去除机理',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '肉牛养殖人工智能监控机制',
+    dict_value: '肉牛养殖人工智能监控机制',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '新型产胶植物橡胶草高产新品种创制及其产量形成的分子机理',
+    dict_value: '新型产胶植物橡胶草高产新品种创制及其产量形成的分子机理',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '黑土地农田土壤微塑料污染过程与阻控机制',
+    dict_value: '黑土地农田土壤微塑料污染过程与阻控机制',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '城镇污水生物-化学耦合强化减污降碳和再生利用机制',
+    dict_value: '城镇污水生物-化学耦合强化减污降碳和再生利用机制',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '基于力-像融合的智能骨折复位机器人系统',
+    dict_value: '基于力-像融合的智能骨折复位机器人系统',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '冻融复杂条件下黑土石油污染光电融合膜界面探测与仿生特异感知',
+    dict_value: '冻融复杂条件下黑土石油污染光电融合膜界面探测与仿生特异感知',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '基于机器视觉的汽车整车及零部件外观检测',
+    dict_value: '基于机器视觉的汽车整车及零部件外观检测',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+  {
+    dict_sort: '0',
+    dict_label: '空地湍流信道光脉冲往返传输特性基础理论',
+    dict_value: '空地湍流信道光脉冲往返传输特性基础理论',
+    dict_type: 'company_question',
+    status: '0',
+    remark: '企业科技问题',
+  },
+];

+ 4 - 19
src/router/index.ts

@@ -1,23 +1,8 @@
-import { createRouter, createWebHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
+import { createRouter, createWebHistory } from 'vue-router';
 
 const router = createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
-  routes: [
-    {
-      path: '/',
-      name: 'home',
-      component: HomeView
-    },
-    {
-      path: '/about',
-      name: 'about',
-      // route level code-splitting
-      // this generates a separate chunk (About.[hash].js) for this route
-      // which is lazy-loaded when the route is visited.
-      component: () => import('../views/AboutView.vue')
-    }
-  ]
-})
+  routes: [],
+});
 
-export default router
+export default router;

+ 2 - 0
tsconfig.json

@@ -2,11 +2,13 @@
   "extends": "@vue/tsconfig/tsconfig.web.json",
   "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
   "compilerOptions": {
+    "types": ["node"],
     "baseUrl": ".",
     "paths": {
       "@/*": ["./src/*"]
     },
     "isolatedModules": false,
+
     "suppressImplicitAnyIndexErrors": true
   },
 

+ 22 - 7
vite.config.ts

@@ -1,14 +1,29 @@
-import { fileURLToPath, URL } from 'node:url'
+import { fileURLToPath, URL } from 'node:url';
 
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
+import { defineConfig } from 'vite';
+import vue from '@vitejs/plugin-vue';
 
 // https://vitejs.dev/config/
 export default defineConfig({
   plugins: [vue()],
+  server: {
+    port: 20001,
+    proxy: {
+      '/files': {
+        target: 'http://basic.waityou24.cn',
+      },
+    },
+  },
   resolve: {
     alias: {
-      '@': fileURLToPath(new URL('./src', import.meta.url))
-    }
-  }
-})
+      '@': fileURLToPath(new URL('./src', import.meta.url)),
+    },
+  },
+  css: {
+    preprocessorOptions: {
+      scss: {
+        additionalData: `@import "@/assets/style/mixin.scss";`, // 此处全局的scss文件
+      },
+    },
+  },
+});