zs 1 year ago
parent
commit
4c3606fb8c
5 changed files with 145 additions and 237 deletions
  1. 30 4
      src/components/frame/c-form.vue
  2. 86 41
      src/layout/site.ts
  3. 7 0
      src/router/index.ts
  4. 1 192
      src/views/home/index.vue
  5. 21 0
      src/views/system/config/index.vue

+ 30 - 4
src/components/frame/c-form.vue

@@ -2,10 +2,24 @@
   <div id="c-form">
     <el-row type="flex" justify="space-around">
       <el-col>
-        <el-form ref="formRef" :model="form" :rules="rules" :label-width="labelWidth" class="form" @submit.prevent :disabled="disabled">
+        <el-form
+          ref="formRef"
+          :model="form"
+          :rules="rules"
+          :label-width="labelWidth"
+          class="form"
+          @submit.prevent
+          :disabled="disabled"
+        >
           <!-- <template > -->
           <el-col :span="span" v-for="(item, index) in fields" :key="index">
-            <el-form-item v-if="display(item)" :key="'form-field-' + index" :label="getField('label', item)" :prop="item.model" :required="item.required">
+            <el-form-item
+              v-if="display(item)"
+              :key="'form-field-' + index"
+              :label="getField('label', item)"
+              :prop="item.model"
+              :required="item.required"
+            >
               <template v-if="!item.custom">
                 <template v-if="item.type === 'textarea'">
                   <el-input
@@ -27,12 +41,21 @@
                   />
                 </template>
                 <template v-else-if="item.type === 'radio'">
-                  <el-radio-group v-model="form[item.model]" :type="item.type" v-bind="item.options" @change="dataChange(item.model)">
+                  <el-radio-group
+                    v-model="form[item.model]"
+                    :type="item.type"
+                    v-bind="item.options"
+                    @change="dataChange(item.model)"
+                  >
                     <slot :name="item.model" v-bind="{ item }"></slot>
                   </el-radio-group>
                 </template>
                 <template v-else-if="item.type === 'checkbox'">
-                  <el-checkbox-group v-model="form[item.model]" :type="item.type" v-bind="item.options">
+                  <el-checkbox-group
+                    v-model="form[item.model]"
+                    :type="item.type"
+                    v-bind="item.options"
+                  >
                     <slot :name="item.model" v-bind="{ item }"></slot>
                   </el-checkbox-group>
                 </template>
@@ -112,6 +135,9 @@
                     style="width: 100%"
                   ></el-input-number>
                 </template>
+                <template v-else-if="item.type === 'editor'">
+                  <cEditor :modelValue="form[item.model]"></cEditor>
+                </template>
                 <template v-else>
                   <el-input
                     clearable

+ 86 - 41
src/layout/site.ts

@@ -14,46 +14,91 @@ export const menuInfo = {
   },
   menuList: [
     { icon: 'iconshouye', _id: 'admin_1', path: '/homeIndex', name: '系统首页' },
-    // {
-    //   icon: 'iconshouye',
-    //   _id: 'admin_2',
-    //   name: '校友信息管理',
-    //   index: '2',
-    //   type: '0',
-    //   children: [
-    //     { icon: 'iconshouye', _id: 'admin_2_1', path: '/users/info', name: '登记信息管理' },
-    //     { icon: 'iconshouye', _id: 'admin_2_2', path: '/users/images', name: '照片上传管理' }
-    //   ]
-    // },
-    // {
-    //   icon: 'iconshouye',
-    //   _id: 'admin_3',
-    //   name: '基本设置',
-    //   index: '3',
-    //   type: '0',
-    //   children: [
-    //     { icon: 'iconshouye', _id: 'admin_3_1', path: '/basic/agreement', name: '协议修改' },
-    //     { icon: 'iconshouye', _id: 'admin_3_2', path: '/basic/notice', name: '通知修改' }
-    //   ]
-    // },
-    // {
-    //   icon: 'iconshouye',
-    //   _id: 'admin_4',
-    //   name: '账号管理',
-    //   index: '4',
-    //   type: '0',
-    //   children: [{ icon: 'iconshouye', _id: 'admin_4_1', path: '/acccount/updatepd', name: '修改密码' }]
-    // },
-    // {
-    //   icon: 'iconshouye',
-    //   _id: 'admin_5',
-    //   name: '系统设置',
-    //   index: '5',
-    //   type: '0',
-    //   children: [
-    //     { icon: 'iconshouye', _id: 'admin_5_2', path: '/system/config', name: '基础设置' },
-    //     { icon: 'iconshouye', _id: 'admin_5_1', path: '/system/dict', name: '字典管理' }
-    //   ]
-    // }
+    {
+      icon: 'iconshouye',
+      _id: 'admin_2',
+      name: '用户管理',
+      index: '2',
+      type: '0',
+      children: [
+        { icon: 'iconshouye', _id: 'admin_2_1', path: '/user/admin', name: '管理员管理' },
+        { icon: 'iconshouye', _id: 'admin_2_2', path: '/user/research', name: '个人用户管理' },
+        { icon: 'iconshouye', _id: 'admin_2_3', path: '/user/selfUser', name: '企业用户管理' },
+        { icon: 'iconshouye', _id: 'admin_2_4', path: '/user/unit', name: '科研单位管理' }
+      ]
+    },
+    {
+      icon: 'iconshouye',
+      _id: 'admin_3',
+      name: '核心业务管理',
+      index: '3',
+      type: '0',
+      children: [
+        { icon: 'iconshouye', _id: 'admin_3_1', path: '/core/achieve', name: '成果管理' },
+        { icon: 'iconshouye', _id: 'admin_3_2', path: '/core/demand', name: '需求管理' },
+        { icon: 'iconshouye', _id: 'admin_3_2', path: '/core/service', name: '服务管理' },
+        {
+          icon: 'iconshouye',
+          _id: 'admin_3_2',
+          path: '/core/trade',
+          name: '交易管理',
+          type: '0',
+          children: [
+            {
+              icon: 'iconshouye',
+              _id: 'admin_3_1_1',
+              path: '/core/trade/auction/admin',
+              name: '拍卖管理'
+            },
+            {
+              icon: 'iconshouye',
+              _id: 'admin_3_1_2',
+              path: '/core/trade/listing/admin',
+              name: '挂牌交易'
+            },
+            {
+              icon: 'iconshouye',
+              _id: 'admin_3_1_3',
+              path: '/core/trade/negotiate/admin',
+              name: '协商定价'
+            }
+          ]
+        }
+      ]
+    },
+    {
+      icon: 'iconshouye',
+      _id: 'admin_4',
+      name: '平台服务管理',
+      index: '4',
+      type: '0',
+      children: [
+        { icon: 'iconshouye', _id: 'admin_4_1', path: '/service/notice', name: '办事事项管理' },
+        { icon: 'iconshouye', _id: 'admin_4_2', path: '/service/policy', name: '通知公告管理' },
+        { icon: 'iconshouye', _id: 'admin_4_3', path: '/service/trends', name: '政策法规管理' },
+        { icon: 'iconshouye', _id: 'admin_4_4', path: '/service/video/admin', name: '点播视频管理' }
+      ]
+    },
+    {
+      icon: 'iconshouye',
+      _id: 'admin_5',
+      name: '账号管理',
+      index: '5',
+      type: '0',
+      children: [{ icon: 'iconshouye', _id: 'admin_5_1', path: '/acccount/updatepd', name: '修改密码' }]
+    },
+    {
+      icon: 'iconshouye',
+      _id: 'admin_6',
+      name: '系统设置',
+      index: '6',
+      type: '0',
+      children: [
+        { icon: 'iconshouye', _id: 'admin_6_1', path: '/system/menus', name: '菜单管理' },
+        { icon: 'iconshouye', _id: 'admin_6_2', path: '/system/role', name: '角色管理' },
+        { icon: 'iconshouye', _id: 'admin_6_3', path: '/system/config', name: '基础设置' },
+        { icon: 'iconshouye', _id: 'admin_6_4', path: '/system/dict', name: '字典管理' }
+      ]
+    }
   ]
 };

+ 7 - 0
src/router/index.ts

@@ -9,6 +9,12 @@ const system = [
     meta: { title: '吉林省重点领域技术转移平台-菜单管理' },
     component: () => import('@/views/system/menus/index.vue')
   },
+  {
+    path: '/system/config',
+    name: 'config',
+    meta: { title: '吉林省重点领域技术转移平台-基础设置' },
+    component: () => import('@/views/system/config/index.vue')
+  },
   {
     path: '/system/role',
     name: 'role',
@@ -190,6 +196,7 @@ router.beforeEach(async (to, from, next) => {
         }
       });
       if (res.data.errcode == '0') {
+        console.log(res.data.data);
         store.commit('setUser', res.data.data, { root: true });
       }
       next();

+ 1 - 192
src/views/home/index.vue

@@ -2,120 +2,7 @@
   <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-row class="one_1">
-            <el-col :span="24" class="title">
-              <span>校友登记统计</span>
-            </el-col>
-            <el-col :span="24" class="info">
-              <el-row class="info_1">
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">校友登记数</el-col>
-                      <el-col :span="24" class="num">{{ info.num_1 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-dengji"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">审核中</el-col>
-                      <el-col :span="24" class="num">{{ info.num_2 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-shenhezhong"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">审核通过</el-col>
-                      <el-col :span="24" class="num">{{ info.num_3 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-shenhetongguo"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">审核未通过</el-col>
-                      <el-col :span="24" class="num">{{ info.num_4 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-dkw_shenheweitongguo"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-              </el-row>
-            </el-col>
-          </el-row>
-          <el-row class="one_1">
-            <el-col :span="24" class="title">
-              <span>照片上传统计</span>
-            </el-col>
-            <el-col :span="24" class="info">
-              <el-row class="info_1">
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">照片上传数</el-col>
-                      <el-col :span="24" class="num">{{ info.num_5 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-dengji"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">审核中</el-col>
-                      <el-col :span="24" class="num">{{ info.num_6 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-shenhezhong"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">审核通过</el-col>
-                      <el-col :span="24" class="num">{{ info.num_7 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-shenhetongguo"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-                <el-col :span="6" class="list">
-                  <el-row>
-                    <el-col :span="20" class="l">
-                      <el-col :span="24" class="name">审核未通过</el-col>
-                      <el-col :span="24" class="num">{{ info.num_8 }}<span class="dw">人</span></el-col>
-                    </el-col>
-                    <el-col :span="4" class="r">
-                      <span class="iconfont icon-dkw_shenheweitongguo"></span>
-                    </el-col>
-                  </el-row>
-                </el-col>
-              </el-row>
-            </el-col>
-          </el-row>
-        </el-col>
-        <el-col :span="24" class="two" style="display: none">
-          <el-row class="two_1">
-            <el-col :span="12" class="l">1</el-col>
-            <el-col :span="12" class="l">1</el-col>
-          </el-row>
-        </el-col>
+        <el-col :span="24" class="one">系统首页</el-col>
       </el-col>
     </el-row>
   </div>
@@ -149,84 +36,6 @@ const search = async () => {
 <style scoped lang="scss">
 .main {
   .one {
-    margin: 0 0 20px 0;
-    .one_1 {
-      margin: 0 0 20px 0;
-      .title {
-        margin: 0 0 20px 0;
-        span {
-          background-color: #439eff;
-          color: #ffffff;
-          padding: 5px 10px;
-          border-radius: 5px;
-          font-weight: bold;
-        }
-      }
-      .info {
-        .info_1 {
-          display: flex;
-          justify-content: center;
-          .list {
-            max-width: 23%;
-            margin: 0 10px;
-            border-radius: 5px;
-            padding: 15px 10px;
-            background: linear-gradient(to bottom, #439eff 90%, #f1f1f1);
-            .l {
-              .name {
-                font-size: 18px;
-                font-weight: bold;
-                color: #ffffff;
-                margin: 0 0 10px 0;
-              }
-              .num {
-                color: #ffffff;
-                font-size: 22px;
-                font-weight: bold;
-                .dw {
-                  padding: 0 0 0 5px;
-                  font-size: 12px;
-                  color: #f1f1f1;
-                }
-              }
-            }
-            .r {
-              text-align: center;
-              padding: 5px 0;
-              .iconfont {
-                font-size: 40px;
-                color: #ffffff;
-              }
-            }
-          }
-          .list:nth-child(2) {
-            background: linear-gradient(to bottom, #ffa500 90%, #f1f1f1);
-          }
-          .list:nth-child(3) {
-            background: linear-gradient(to bottom, #00ff7f 90%, #f1f1f1);
-          }
-          .list:nth-child(4) {
-            background: linear-gradient(to bottom, #ff0000 90%, #f1f1f1);
-          }
-          .list:hover {
-            cursor: pointer;
-          }
-        }
-      }
-    }
-  }
-  .two {
-    .two_1 {
-      display: flex;
-      justify-content: center;
-      .l {
-        max-width: 48%;
-        margin: 0 10px;
-        border: 1px solid #ff0000;
-        padding: 20px;
-        border-radius: 10px;
-      }
-    }
   }
 }
 </style>

+ 21 - 0
src/views/system/config/index.vue

@@ -0,0 +1,21 @@
+<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>
+import { ref, onMounted } from 'vue';
+// 加载中
+const loading = ref(false);
+// 请求
+onMounted(async () => {
+  loading.value = true;
+  loading.value = false;
+});
+</script>
+<style scoped lang="scss"></style>