bzkf3 3 éve%!(EXTRA string=óta)
szülő
commit
21214d8b7a

+ 1 - 0
index.html

@@ -8,6 +8,7 @@
   </head>
   <body>
     <div id="app"></div>
+    <script src="/config.js"></script>
     <script type="module" src="/src/main.js"></script>
   </body>
 </html>

+ 80 - 0
package-lock.json

@@ -9,6 +9,7 @@
       "version": "0.0.0",
       "dependencies": {
         "@vue/composition-api": "^1.4.9",
+        "@vueuse/core": "^8.1.1",
         "axios": "^0.26.1",
         "default-passive-events": "^2.0.0",
         "element-ui": "^2.15.6",
@@ -774,6 +775,62 @@
       "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.1.3.tgz",
       "integrity": "sha512-79InfO2xHv+WHIrH1bHXQUiQD/wMls9qBk6WVwGCbdwP7/3zINtvqPNMtmSHXsIKjvUAHc8L0ouOj6ZQQRmcXg=="
     },
+    "node_modules/@vueuse/core": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.1.1.tgz",
+      "integrity": "sha512-NmpizOcQXW0OHV0qa6YwFtw5hQBe0RxMuxQoIIbCa6jRT16MTweFPecIM6VgA1e5vZJtAO7p//TgLSpzi3joZQ==",
+      "dependencies": {
+        "@vueuse/metadata": "8.1.1",
+        "@vueuse/shared": "8.1.1",
+        "vue-demi": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      },
+      "peerDependencies": {
+        "@vue/composition-api": "^1.1.0",
+        "vue": "^2.6.0 || ^3.2.0"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        },
+        "vue": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@vueuse/metadata": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.1.1.tgz",
+      "integrity": "sha512-TSmA3UaSmBcV8pJ7fnHAL7NjSE1RQZlpJklg6YysFxwxDb0MZlo+Q8j9U1hLBZT1fnAjwZMaoxilanHN8ZwugQ==",
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
+    "node_modules/@vueuse/shared": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.1.1.tgz",
+      "integrity": "sha512-lWRcK8W9+q1t1XMxW9JIljXFQLIViInTOEF7wUHcISQNAYwHtHgr0z+U5SRM8tA4eJd/dVs/2BV1/z2DG7aKEg==",
+      "dependencies": {
+        "vue-demi": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      },
+      "peerDependencies": {
+        "@vue/composition-api": "^1.1.0",
+        "vue": "^2.6.0 || ^3.2.0"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        },
+        "vue": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/ansi-styles": {
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@@ -2798,6 +2855,29 @@
       "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.1.3.tgz",
       "integrity": "sha512-79InfO2xHv+WHIrH1bHXQUiQD/wMls9qBk6WVwGCbdwP7/3zINtvqPNMtmSHXsIKjvUAHc8L0ouOj6ZQQRmcXg=="
     },
+    "@vueuse/core": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-8.1.1.tgz",
+      "integrity": "sha512-NmpizOcQXW0OHV0qa6YwFtw5hQBe0RxMuxQoIIbCa6jRT16MTweFPecIM6VgA1e5vZJtAO7p//TgLSpzi3joZQ==",
+      "requires": {
+        "@vueuse/metadata": "8.1.1",
+        "@vueuse/shared": "8.1.1",
+        "vue-demi": "*"
+      }
+    },
+    "@vueuse/metadata": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-8.1.1.tgz",
+      "integrity": "sha512-TSmA3UaSmBcV8pJ7fnHAL7NjSE1RQZlpJklg6YysFxwxDb0MZlo+Q8j9U1hLBZT1fnAjwZMaoxilanHN8ZwugQ=="
+    },
+    "@vueuse/shared": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-8.1.1.tgz",
+      "integrity": "sha512-lWRcK8W9+q1t1XMxW9JIljXFQLIViInTOEF7wUHcISQNAYwHtHgr0z+U5SRM8tA4eJd/dVs/2BV1/z2DG7aKEg==",
+      "requires": {
+        "vue-demi": "*"
+      }
+    },
     "ansi-styles": {
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",

+ 1 - 0
package.json

@@ -17,6 +17,7 @@
   },
   "dependencies": {
     "@vue/composition-api": "^1.4.9",
+    "@vueuse/core": "^8.1.1",
     "axios": "^0.26.1",
     "default-passive-events": "^2.0.0",
     "element-ui": "^2.15.6",

+ 15 - 0
public/config.js

@@ -0,0 +1,15 @@
+const development = {
+    oss: 'https://openapi.dev.bozedu.net',
+    api: 'https://hdpb.dev.bozedu.net/'
+}
+
+const production = {
+    oss: 'https://openapi.bozedu.net',
+    api: 'https://hdpb.bozedu.net/',
+}
+
+function isDev() {
+    // console.log('isDev')
+    return window.location.host.includes('dev') || window.location.host.includes('localhost')
+}
+window.globalVariables = isDev() ? (development) : (production)

+ 44 - 54
src/layout/app/components/Sidebar/SidebarItem.vue

@@ -1,75 +1,65 @@
 <template>
-  <div
-    v-if="hasOneShowingChild(item.children, item) && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.alwaysShow"
-  >
-    <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
-      <el-menu-item
-        :index="resolvePath(onlyOneChild.path)"
-        :class="{ 'submenu-title-noDropdown': !isNest }"
-      >
-        <!-- <item
-            :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
-            :title="onlyOneChild.meta.title"
-        />-->
-        <template v-if="onlyOneChild.meta.icon || (item.meta && item.meta.icon)">
+  <div v-if="!item.hidden">
+    <template
+      v-if="hasOneShowingChild(item.children, item) && !item.alwaysShow && (!onlyOneChild.children || onlyOneChild.noShowingChildren)"
+    >
+      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
+        <el-menu-item :index="resolvePath(onlyOneChild.path)">
+          <template v-if="onlyOneChild.meta.icon || (item.meta && item.meta.icon)">
+            <i
+              v-if="(onlyOneChild.meta.icon || (item.meta && item.meta.icon)).includes('el-icon')"
+              :class="[onlyOneChild.meta.icon || (item.meta && item.meta.icon)]"
+            />
+          </template>
+          <span
+            v-if="onlyOneChild.meta && onlyOneChild.meta.title"
+            slot="title"
+          >{{ onlyOneChild.meta.title }}</span>
+        </el-menu-item>
+      </app-link>
+    </template>
+
+    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" :popper-append-to-body="false">
+      <template slot="title">
+        <template v-if="(item.meta && item.meta.icon)">
           <i
-            v-if="(onlyOneChild.meta.icon || (item.meta && item.meta.icon)).includes('el-icon')"
-            class="sub-el-icon"
-            :class="[onlyOneChild.meta.icon || (item.meta && item.meta.icon)]"
+            v-if="(item.meta && item.meta.icon).includes('el-icon')"
+            :class="[(item.meta && item.meta.icon)]"
           />
         </template>
-        <span v-if="onlyOneChild.meta.title" slot="title">{{ onlyOneChild.meta.title }}</span>
-      </el-menu-item>
-    </app-link>
-  </div>
-
-  <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" :popper-append-to-body="false">
-    <!-- <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" /> -->
-    <template slot="title">
-      <!-- <template v-if="(item.meta && item.meta.icon)"> -->
-      <i
-        v-if="(item.meta && item.meta.icon).includes('el-icon')"
-        class="sub-el-icon"
-        :class="[(item.meta && item.meta.icon)]"
+        <span v-if="item.meta && item.meta.title" slot="title">{{ item.meta.title }}</span>
+      </template>
+      <sidebar-item
+        v-for="child in item.children"
+        :key="child.path"
+        :item="child"
+        :base-path="resolvePath(child.path)"
       />
-      <!-- </template> -->
-      <span v-if="item.meta.title" slot="title">{{ item.meta.title }}</span>
-    </template>
-    <sidebar-item
-      v-for="child in item.children.filter(i => !i.hidden)"
-      :key="child.path"
-      :is-nest="true"
-      :item="child"
-      :base-path="resolvePath(child.path)"
-      class="nest-menu"
-    />
-  </el-submenu>
+    </el-submenu>
+  </div>
 </template>
 
-<script>
+<script >
+import { defineComponent } from "@vue/composition-api";
 import path from 'path-browserify'
 import { isExternal } from '@/utils/validate'
-// import Item from './Item.vue'
 import AppLink from './Link.vue'
-// import FixiOSBug from './FixiOSBug'
 
-export default {
+
+export default defineComponent({
   name: 'SidebarItem',
   components: {
-    // Item,
     AppLink
   },
-  // mixins: [FixiOSBug],
+  // render() {
+  //   console.log('args :>> ', this);
+  //   return (<el-button>hi</el-button>)
+  // },
   props: {
-    // route object
     item: {
       type: Object,
       required: true
     },
-    isNest: {
-      type: Boolean,
-      default: false
-    },
     basePath: {
       type: String,
       default: ''
@@ -89,10 +79,10 @@ export default {
         } else {
           // Temp set(will be used if only has one showing child)
           this.onlyOneChild = item
+          this.onlyOneChild.noShowingChildren = item.children && item.children.filter(c => !c.hidden).length === 0
           return true
         }
       })
-
       // When there is only one child router, the child router is displayed by default
       if (showingChildren.length === 1) {
         return true
@@ -116,5 +106,5 @@ export default {
       return path.resolve(this.basePath, routePath)
     }
   }
-}
+})
 </script>

+ 9 - 15
src/layout/app/components/Sidebar/SidebarItem1.vue

@@ -6,43 +6,41 @@
       <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
         <el-menu-item
           :index="resolvePath(onlyOneChild.path)"
-          :class="{ 'submenu-title-noDropdown': !isNest }"
         >
           <!-- <item
             :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
             :title="onlyOneChild.meta.title"
-          /> -->
+          />-->
           <template v-if="onlyOneChild.meta.icon || (item.meta && item.meta.icon)">
             <i
               v-if="(onlyOneChild.meta.icon || (item.meta && item.meta.icon)).includes('el-icon')"
-              class="sub-el-icon"
               :class="[onlyOneChild.meta.icon || (item.meta && item.meta.icon)]"
             />
           </template>
-          <span v-if="onlyOneChild.meta.title" slot="title">{{ onlyOneChild.meta.title }}</span>
+          <span
+            v-if="onlyOneChild.meta && onlyOneChild.meta.title"
+            slot="title"
+          >{{ onlyOneChild.meta.title }}</span>
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
+    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" :popper-append-to-body="false">
       <!-- <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" /> -->
       <template slot="title">
-        <!-- <template v-if="(item.meta && item.meta.icon)"> -->
+        <template v-if="(item.meta && item.meta.icon)">
           <i
             v-if="(item.meta && item.meta.icon).includes('el-icon')"
-            class="sub-el-icon"
             :class="[(item.meta && item.meta.icon)]"
           />
-        <!-- </template> -->
-        <span v-if="item.meta.title" slot="title">{{ item.meta.title }}</span>
+        </template>
+        <span v-if="item.meta && item.meta.title" slot="title">{{ item.meta.title }}</span>
       </template>
       <sidebar-item
         v-for="child in item.children"
         :key="child.path"
-        :is-nest="true"
         :item="child"
         :base-path="resolvePath(child.path)"
-        class="nest-menu"
       />
     </el-submenu>
   </div>
@@ -68,10 +66,6 @@ export default {
       type: Object,
       required: true
     },
-    isNest: {
-      type: Boolean,
-      default: false
-    },
     basePath: {
       type: String,
       default: ''

+ 7 - 0
src/layout/app/index.vue

@@ -94,6 +94,7 @@ export default defineComponent({
                 align-items: stretch;
                 padding: 6px;
                 box-sizing: border-box;
+
                 .main-content {
                     background-color: #fff;
                     border-radius: 4px;
@@ -101,6 +102,12 @@ export default defineComponent({
                     width: 100%;
                     box-sizing: border-box;
                     padding: 10px;
+                    // position: relative;
+                    // left: 0;
+                    // top: 0;
+                    max-height: calc(100vh - 54px - 50px - 12px);
+                    overflow-y: auto;
+                    // overflow: hidden;
                 }
             }
         }

+ 85 - 46
src/router/index.js

@@ -16,7 +16,7 @@ import MainDefaultLayout from '@/layout/main/default/index.vue'
 
 /**
  * Note: sub-menu only appear when route children.length >= 1
- * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
+ * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav
  *
  * hidden: true                   if set true, item will not show in the sidebar(default is false)
  * alwaysShow: true               if set true, will always show the root menu
@@ -47,53 +47,57 @@ export const constantRoutes = [
 
   {
     path: '/',
-    redirect: '/hdlb/index.html',
+    redirect: '/hdlb',
   },
 
   {
     path: '/hdlb',
-    name: 'hdlb',
+    // name: 'hdlb',
     component: AppLayout,
+    meta: { title: '活动列表' },
+    // redirect: '/hdlb',
+
     children: [
       {
-        path: 'index.html',
-        name: 'hdlb_index',
+        path: '',
+        name: 'hdlb',
         component: () => import('@/views/hdlb/index.vue'),
         meta: { title: '活动列表', icon: 'el-icon-document' },
       },
+      {
+        path: 'hdfq',
+        name: 'hdfq',
+        hidden: true,
+        component: () => import('@/views/hdlb/hdfq/index.vue'),
+        meta: { title: '活动发起' },
+      },
+      {
+        path: 'hdjg/:id',
+        name: 'hdjg',
+        hidden: true,
+        component: () => import('@/views/hdlb/hdjg/index.vue'),
+        meta: { title: '活动结果' },
+        props: true,
+      },
     ],
   },
 
   {
     path: '/xtgl',
     component: AppLayout,
-    redirect: '/xtgl/zzjg/index.html',
+    redirect: '/xtgl/zzjg',
     name: 'xtgl',
     meta: { title: '系统管理', icon: 'el-icon-setting' },
     children: [
       {
-        path: 'hdlxgl',
-        name: 'hdlxgl',
-        component: MainDefaultLayout,
-
-        children: [
-          {
-            path: 'index.html',
-            name: 'hdlxgl_index',
-            component: () => import('@/views/xtgl/hdlxgl/index.vue'),
-            meta: { title: '活动类型管理' },
-          },
-        ],
-      },
-      {
         path: 'zzjg',
-        name: 'zzjg',
+        // name: 'zzjg',
         component: MainDefaultLayout,
-
+        meta: { title: '组织架构' },
         children: [
           {
-            path: 'index.html',
-            name: 'zzjg_index',
+            path: '',
+            name: 'zzjg',
             component: () => import('@/views/xtgl/zzjg/index.vue'),
             meta: { title: '组织架构' },
           },
@@ -101,12 +105,13 @@ export const constantRoutes = [
       },
       {
         path: 'rzgl',
-        name: 'rzgl',
+        // name: 'rzgl',
         component: MainDefaultLayout,
+        meta: { title: '日志管理' },
         children: [
           {
-            path: 'index.html',
-            name: 'rzgl_index',
+            path: '',
+            name: 'rzgl',
             component: () => import('@/views/xtgl/rzgl/index.vue'),
             meta: { title: '日志管理' },
           },
@@ -114,24 +119,53 @@ export const constantRoutes = [
       },
       {
         path: 'zdb',
-        name: 'zdb',
+        // name: 'zdb',
         component: MainDefaultLayout,
+        meta: { title: '字典表' },
         children: [
           {
-            path: 'index.html',
-            name: 'zdb_index',
+            path: '',
+            name: 'zdb',
             component: () => import('@/views/xtgl/zdb/index.vue'),
             meta: { title: '字典表' },
           },
         ],
       },
+      {
+        path: 'pfmb',
+        // name: 'pfmb',
+        component: MainDefaultLayout,
+        meta: { title: '评分模板' },
+        children: [
+          {
+            path: '',
+            name: 'pfmb',
+            component: () => import('@/views/xtgl/pfmb/index.vue'),
+            meta: { title: '评分模板' },
+          },
+        ],
+      },
+      {
+        path: 'hdlxgl',
+        // name: 'hdlxgl',
+        component: MainDefaultLayout,
+        meta: { title: '活动类型管理' },
+        children: [
+          {
+            path: '',
+            name: 'hdlxgl',
+            component: () => import('@/views/xtgl/hdlxgl/index.vue'),
+            meta: { title: '活动类型管理' },
+          },
+        ],
+      },
     ],
   },
 
   {
     path: '/mhgl',
     component: AppLayout,
-    redirect: '/mhgl/tzgg/index.html',
+    redirect: '/mhgl/tzgg',
     name: 'mhgl',
     meta: {
       title: '门户管理',
@@ -140,12 +174,13 @@ export const constantRoutes = [
     children: [
       {
         path: 'tzgg',
-        name: 'tzgg',
+        // name: 'tzgg',
         component: MainDefaultLayout,
+        meta: { title: '通知公告' },
         children: [
           {
-            path: 'index.html',
-            name: 'tzgg_index',
+            path: '',
+            name: 'tzgg',
             component: () => import('@/views/mhgl/tzgg/index.vue'),
             meta: { title: '通知公告' },
           },
@@ -153,12 +188,13 @@ export const constantRoutes = [
       },
       {
         path: 'hdgg',
-        name: 'hdgg',
+        // name: 'hdgg',
         component: MainDefaultLayout,
+        meta: { title: '活动公告' },
         children: [
           {
-            path: 'index.html',
-            name: 'hdgg_index',
+            path: '',
+            name: 'hdgg',
             component: () => import('@/views/mhgl/hdgg/index.vue'),
             meta: { title: '活动公告' },
           },
@@ -166,12 +202,13 @@ export const constantRoutes = [
       },
       {
         path: 'yxzp',
-        name: 'yxzp',
+        // name: 'yxzp',
         component: MainDefaultLayout,
+        meta: { title: '优秀作品' },
         children: [
           {
-            path: 'index.html',
-            name: 'yxzp_index',
+            path: '',
+            name: 'yxzp',
             component: () => import('@/views/mhgl/yxzp/index.vue'),
             meta: { title: '优秀作品' },
           },
@@ -179,12 +216,13 @@ export const constantRoutes = [
       },
       {
         path: 'wjdc',
-        name: 'wjdc',
+        // name: 'wjdc',
         component: MainDefaultLayout,
+        meta: { title: '问卷调查' },
         children: [
           {
-            path: 'index.html',
-            name: 'wjdc_index',
+            path: '',
+            name: 'wjdc',
             component: () => import('@/views/mhgl/wjdc/index.vue'),
             meta: { title: '问卷调查' },
           },
@@ -192,12 +230,13 @@ export const constantRoutes = [
       },
       {
         path: 'tplb',
-        name: 'tplb',
+        // name: 'tplb',
         component: MainDefaultLayout,
+        meta: { title: '投票列表' },
         children: [
           {
-            path: 'index.html',
-            name: 'tplb_index',
+            path: '',
+            name: 'tplb',
             component: () => import('@/views/mhgl/tplb/index.vue'),
             meta: { title: '投票列表' },
           },

+ 2 - 1
src/stores/user.js

@@ -27,10 +27,11 @@ localStorage.setItem('userInfo', JSON.stringify({
   },
 }))
 
-const { token } = JSON.parse(localStorage.getItem('userInfo'))
+const { token ,user_role_id} = JSON.parse(localStorage.getItem('userInfo'))
 export const useUserStore = defineStore('user', {
   state: () => ({
     token,
+    role:user_role_id
   }),
   actions: {
     // toggleIsCollapse() {

+ 28 - 0
src/styles/mixin.scss

@@ -0,0 +1,28 @@
+.flex-row{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.flex-col{
+    display: flex;
+    justify-content: flex-start;
+    align-items: stretch;
+    flex-direction: column;
+}
+
+.flex-col-between{
+    display: flex;
+    justify-content: space-between;
+    align-items: stretch;
+    flex-direction: column;
+
+}
+
+.flex-item-none{
+    flex:none
+}
+
+.flex-item-auto{
+    flex:auto
+}

+ 0 - 1
src/styles/variables.css

@@ -1 +0,0 @@
-:export{headerBg:#409eff;headerText:#f4f4f5;menuText:#bfcbd9;menuActiveText:#409eff;subMenuActiveText:#f4f4f5;menuBg:#304156;menuHover:#263445;subMenuBg:#1f2d3d;subMenuHover:#001528;sideBarWidth:210px}

+ 1 - 1
src/utils/get-page-title.js

@@ -1,5 +1,5 @@
 const title = import.meta.env.VITE_APP_TITLE  
-console.log('import.meta.env :>> ', import.meta.env);
+
 export default function getPageTitle(pageTitle) {
   if (pageTitle) {
     return `${pageTitle} - ${title}`

+ 27 - 8
src/utils/request.js

@@ -1,9 +1,11 @@
 import axios from 'axios'
+import { Message } from 'element-ui'
+
 import { useUserStore } from '@/stores/user'
 const { token } = useUserStore()
-console.log('token :>> ', token)
+
 const service = axios.create({
-  baseURL: import.meta.env.VITE_APP_BASE_API,
+  baseURL: window.globalVariables.api,
   method: 'post',
   timeout: 5000,
   headers: {
@@ -14,12 +16,25 @@ const service = axios.create({
 service.interceptors.request.use(
   (config) => {
     // do something before request is sent
-    config.data = Object.assign(config.data, {
-      token,
-      site: 'qqyxt',
-      client: 'web',
-      api: 'json',
-    })
+
+    config.data = Object.assign(
+      {
+        token,
+        site: 'qqyxt',
+        client: 'web',
+        api: 'json',
+      },
+      config.data || {}
+    )
+    if (config.method === 'get') {
+      config.params = Object.assign(
+        {
+          token,
+        },
+        config.params || {}
+      )
+    }
+    console.dir(config.data)
     return config
   },
   (error) => {
@@ -32,6 +47,10 @@ service.interceptors.request.use(
 // response interceptor
 service.interceptors.response.use(
   (response) => {
+    const { code, msg } = response.data
+    if (code !== '1') {
+      Message.error(msg)
+    }
     return response.data
   },
   (error) => {

+ 49 - 3
src/views/hdlb/api.js

@@ -4,6 +4,52 @@ export const queryApi = (data = {}) =>
     url: 'hdpb/hdgl/index',
     data,
   })
-export const addApi = () => request({})
-export const deleteApi = () => request({})
-export const editApi = () => request({})
+
+export const addApi = (data = {}) =>
+  request({ url: 'hdpb/hdgl/add', data: { issubmit: 1, hdpb_hdgl: data } })
+export const deleteApi = (id) =>
+  request({ url: 'hdpb/hdgl/delete', data: { hhg_id: id } })
+export const editApi = (id, data = {}) =>
+  request({
+    url: 'hdpb/hdgl/edit',
+    data: { issubmit: 1, hhg_id: id, hdpb_hdgl: data },
+  })
+
+export const copyApi = (id) =>
+  request({ url: 'hdpb/hdgl/copy', data: { hhg_id: id } })
+
+export const queryPfmbApi = (data = {}) =>
+  request({
+    url: '/hdpb/pfmb/index',
+    data: {
+      ...data,
+      hp_pid: 0,
+    },
+  })
+
+export const queryZjszApi = (data = {}) =>
+  request({
+    url: '/user/main/index',
+    data: {
+      ...data,
+      dept_id: 2,
+      all: 1,
+    },
+  })
+
+export const queryHdlxApi = (data = {}) =>
+  request({
+    url: '/hdpb/hdlx/list_tree',
+    data: {
+      ...data,
+    },
+  })
+
+export const queryHdjbApi = (data = {}) =>
+  request({
+    url: '/common/sjzd/index',
+    data: {
+      ...data,
+      cs_level: 'hhg_level',
+    },
+  })

+ 206 - 0
src/views/hdlb/hdfq/index.vue

@@ -0,0 +1,206 @@
+<template>
+    <div class="hdfq_wrapper">
+        <div class="title">活动发起</div>
+        <div class="form_wrapper">
+            <el-form ref="formRef" :model="form" label-width="180px" size="small" :rules="rules">
+                <el-row>
+                    <el-col :span="16">
+                        <el-form-item label="活动名称" prop="hhg_name">
+                            <el-input v-model="form.hhg_name" style="width: 100%;"></el-input>
+                        </el-form-item>
+                        <el-form-item label="活动类型" prop="hhg_cate">
+                            <el-cascader
+                                v-model="form.hhg_cate"
+                                :props="{ multiple: true }"
+                                clearable
+                                style="width: 100%;"
+                                :options="hdlxOptions"
+                            ></el-cascader>
+                        </el-form-item>
+                        <el-form-item label="活动级别" prop="hhg_level">
+                            <el-select
+                                v-model="form.hhg_level"
+                                placeholder
+                                filterable
+                                remote
+                                :remote-method="handleQueryHdjb"
+                                style="width: 100%;"
+                            >
+                                <el-option
+                                    v-for="({ cs_name }) in hdjbOptions"
+                                    :key="cs_name"
+                                    :label="cs_name"
+                                    :value="cs_name"
+                                ></el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="报名开始时间" prop="hhg_kssj">
+                            <el-date-picker
+                                type="date"
+                                v-model="form.hhg_kssj"
+                                style="width: 100%;"
+                            ></el-date-picker>
+                        </el-form-item>
+                        <el-form-item label="资料上传截止时间" prop="hhg_jzsj">
+                            <el-date-picker
+                                type="date"
+                                v-model="form.hhg_jzsj"
+                                style="width: 100%;"
+                            ></el-date-picker>
+                        </el-form-item>
+                        <el-form-item label="报名结束时间" prop="hhg_jssj">
+                            <el-date-picker
+                                type="date"
+                                v-model="form.hhg_jssj"
+                                style="width: 100%;"
+                            ></el-date-picker>
+                        </el-form-item>
+                        <el-form-item label="活动内容" prop="hhg_content">
+                            <el-input
+                                v-model="form.hhg_content"
+                                type="textarea"
+                                :autosize="{ minRows: 5 }"
+                                style="width: 100%;"
+                            ></el-input>
+                        </el-form-item>
+                        <el-form-item label="活动封面">
+                            <el-upload v-model="form.hhg_img" :action="UPLOAD_URL">
+                                <el-button size="small" type="primary">点击上传</el-button>
+                                <div slot="tip" class="el-upload__tip">非必填项,支持格式:jpg,png,jpeg(2M以内)</div>
+                            </el-upload>
+                        </el-form-item>
+                        <el-form-item label="其他附件">
+                            <el-upload v-model="form.hhg_files" :action="UPLOAD_URL">
+                                <el-button size="small" type="primary">点击上传</el-button>
+                            </el-upload>
+                        </el-form-item>
+                        <el-row>
+                            <el-col :span="12">
+                                <el-form-item label="是否投放在活动公告里">
+                                    <el-switch
+                                        active-value="1"
+                                        inactive-value="0"
+                                        v-model="form.hhg_tzgg"
+                                    ></el-switch>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="12">
+                                <el-form-item label="初审">
+                                    <el-switch
+                                        active-value="1"
+                                        inactive-value="0"
+                                        v-model="form.hhg_ps"
+                                    ></el-switch>
+                                </el-form-item>
+                            </el-col>
+                        </el-row>
+
+                        <el-form-item>
+                            <el-button type="primary" @click="handleSubmit">立即创建</el-button>
+                            <el-button @click="handleCancel">取消</el-button>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+            </el-form>
+        </div>
+    </div>
+</template>
+
+<script>
+import { defineComponent, reactive, ref, getCurrentInstance } from '@vue/composition-api'
+import { addApi, queryHdlxApi, queryHdjbApi } from '../api'
+
+export default defineComponent({
+    setup() {
+        const _this = getCurrentInstance().proxy
+        const UPLOAD_URL = window.globalVariables.api + 'upload/main/file'
+        const rules = {
+            hhg_name: [
+                { required: true, message: '活动名称不能为空', trigger: 'blur' },
+            ],
+            // hhg_cate: [
+            //     { required: true, message: '活动类型不能为空', trigger: 'change' }
+            // ],
+            // hhg_level: [
+            //     { required: true, message: '活动级别不能为空', trigger: 'change' }
+            // ],
+            hhg_kssj: [
+                { type: 'date', required: true, message: '报名开始时间不能为空', trigger: 'change' }
+            ],
+            hhg_jzsj: [
+                { type: 'date', required: true, message: '资料上传截止时间不能为空', trigger: 'change' }
+            ],
+            hhg_jssj: [
+                { type: 'date', required: true, message: '报名结束时间不能为空', trigger: 'change' }
+            ],
+            hhg_jssj: [
+                { required: true, message: '活动内容不能为空', trigger: 'blur' }
+            ]
+        }
+
+        const form = reactive({})
+        const formRef = ref()
+
+        const handleCancel = () => {
+            _this.$router.back()
+        }
+
+        const handleSubmit = () => {
+            formRef.value.validate((valid) => {
+                console.log('valid :>> ', valid);
+                if (valid) {
+                    addApi(form).then(() => {
+                        handleCancel()
+                    })
+                } else {
+                    return false;
+                }
+            });
+        }
+
+        const hdlxOptions = ref([])
+        const hdjbOptions = ref([])
+        function handleQueryHdlx(value) {
+            queryHdlxApi({ keyword: value }).then(res => {
+                hdlxOptions.value = res.data.one_info
+                console.log('hdlxOptions :>> ', hdlxOptions.value);
+            })
+        }
+        handleQueryHdlx()
+
+        function handleQueryHdjb(value) {
+            queryHdjbApi({ keyword: value }).then(res => {
+                hdjbOptions.value = res.data.page_data
+            })
+        }
+
+
+        return {
+            UPLOAD_URL,
+            rules,
+            form,
+            formRef,
+            handleSubmit,
+            handleCancel,
+            // handleQueryHdlx,
+            handleQueryHdjb,
+            hdlxOptions,
+            hdjbOptions
+        }
+    }
+})
+</script>
+
+<style scoped lang="scss">
+.hdfq_wrapper {
+    .title {
+        height: 50px;
+        line-height: 50px;
+        border-bottom: 1px solid #dcdfe6;
+        color: #606266;
+    }
+    .form_wrapper {
+        padding: 16px;
+    }
+}
+</style>

+ 11 - 0
src/views/hdlb/hdjg/api.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+export const queryApi = (data = {}) =>
+  request({
+    url: 'hdpb/bmjl/index',
+    data,
+  })
+export const addApi = (data = {}) =>
+  request({ url: 'hdpb/bmjl/add', data: { issubmit: 1, hdpb_bmjl: data } })
+export const deleteApi = (id) =>
+  request({ url: 'hdpb/bmjl/delete', data: { hb_id: id } })
+export const editApi = (data = {}) => request({ url: 'hdpb/bmjl/edit', data })

+ 116 - 0
src/views/hdlb/hdjg/index.vue

@@ -0,0 +1,116 @@
+<template>
+    <div class="flex-col-between" style="height: 100%;">
+        <section class="flex-item-auto">
+            <div style="display: flex; justify-content: space-between;">
+                <div>
+                    <el-button type="info" icon="el-icon-plus" @click="handleAdd">新增</el-button>
+                </div>
+                <div>
+                    <el-input
+                        placeholder="请输入搜索关键字"
+                        suffix-icon="el-icon-search"
+                        v-model="searchText"
+                        style="width: 200px; margin-right: 10px;"
+                    ></el-input>
+                    <el-button type="primary" @click="handleQuery">搜索</el-button>
+                </div>
+            </div>
+            <el-row>
+                <el-table :data="tableData" tooltip-effect="dark" style="width: 100%">
+                    <el-table-column type="selection" width="55"></el-table-column>
+                    <el-table-column label="报名人" width="160" prop="hb_zzxm"></el-table-column>
+                    <el-table-column label="标题" width="auto" prop="hb_title"></el-table-column>
+                    <!-- <el-table-column label="申请时间" width="140" prop="hhg_cate"></el-table-column>
+                    <el-table-column label="分类" width="100" prop="hhg_level"></el-table-column> -->
+                    <el-table-column label="平均分" width="140" prop="hb_pjf"></el-table-column>
+
+                    <el-table-column label="操作" width="200">
+                        <template slot-scope="scope">
+                            <el-button type="text" @click="dialogFormVisible = true">修改</el-button>
+                            <el-popconfirm title="确定删除吗?">
+                                <el-button
+                                    slot="reference"
+                                    type="text"
+                                    style="margin-left: 10px;"
+                                    @click="handleDel(scope.row.hhg_id)"
+                                >删除</el-button>
+                            </el-popconfirm>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </el-row>
+        </section>
+
+        <footer class="flex-item-none" style="display: flex;justify-content: flex-end;">
+            <el-pagination
+                background
+                layout="total,prev, pager, next"
+                :page-size="limit"
+                :total="total"
+                :current-page.sync="page"
+                @current-change="handleQuery"
+            ></el-pagination>
+        </footer>
+    </div>
+</template>
+
+<script>
+
+import { defineComponent, ref, getCurrentInstance } from "@vue/composition-api";
+import { queryApi, deleteApi } from './api';
+
+export default defineComponent({
+    props: ['id'],
+    setup(props) {
+        const _this = getCurrentInstance().proxy
+
+        const searchText = ref('')
+        const total = ref(0)
+        const tableData = ref([])
+        const limit = 7
+        const page = ref(1)
+
+
+        async function handleQuery() {
+            const { data } = await queryApi({
+                hhg_id: props.id,
+                limit,
+                keyword: searchText.value,
+                page: page.value
+            })
+            const { page_data, total_rows } = data
+
+            total.value = total_rows * 1
+            tableData.value = page_data
+
+        }
+
+        handleQuery()
+
+        function handleAdd() {
+            _this.$router.push('/hdlb/hdfq.html')
+        }
+
+        function handleDel(id) {
+            deleteApi(id).then(() => {
+                handleQuery()
+            })
+        }
+
+
+        return {
+            limit,
+            page,
+            total,
+            tableData,
+            searchText,
+            handleQuery,
+            handleAdd,
+            handleDel,
+        }
+    }
+})
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 394 - 50
src/views/hdlb/index.vue

@@ -1,80 +1,424 @@
 <template>
-    <div>
-        <header></header>
-        <el-row>
-            <div>
-                <el-button type="info" icon="el-icon-plus">活动发起</el-button>
+    <div class="flex-col-between" style="height: 100%;">
+        <header style="margin-bottom:30px" class="flex-item-none flex-row">
+            <div class="flex-item-none count-item">
+                <div class="left-icon"></div>
+                <div class="right-text">
+                    <div class="count">{{ outputAlyzData[0].toFixed(0) }}</div>
+                    <div class="name">活动总数</div>
+                </div>
             </div>
-            <div>
-                <el-input
-                    placeholder="请输入搜索关键字"
-                    suffix-icon="el-icon-search"
-                    v-model="searchText"
-                    style="width: 200px;"
-                ></el-input>
-                <el-button type="primary">搜索</el-button>
+            <div class="flex-item-none count-item">
+                <div class="left-icon"></div>
+                <div class="right-text">
+                    <div class="count">{{ outputAlyzData[1].toFixed(0) }}</div>
+                    <div class="name">已结束</div>
+                </div>
             </div>
-        </el-row>
-        <el-row>
-            <el-table
-                ref="multipleTable"
-                :data="tableData"
-                tooltip-effect="dark"
-                style="width: 100%"
-            >
-                <el-table-column type="selection" width="55"></el-table-column>
-                <el-table-column label="活动名称" prop=""></el-table-column>
-                <el-table-column label="姓名" prop=""></el-table-column>
-                <el-table-column label="姓名" prop=""></el-table-column>
-                <el-table-column label="姓名" prop=""></el-table-column>
-                <el-table-column label="姓名" prop=""></el-table-column>
-                <el-table-column label="姓名" prop=""></el-table-column>
-
-                <el-table-column label="操作">
-                    <template slot-scope="scope">
-                        <el-link type="primary">权限</el-link>
-                        <span style="color: #409eff;margin: 0 10px;">|</span>
-                        <el-link type="primary">编辑</el-link>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </el-row>
-        <el-row style="text-align: right">
-            <el-pagination background layout="prev, pager, next" :total="total"></el-pagination>
-        </el-row>
+            <div class="flex-item-none count-item">
+                <div class="left-icon"></div>
+                <div class="right-text">
+                    <div class="count">{{ outputAlyzData[2].toFixed(0) }}</div>
+                    <div class="name">进行中</div>
+                </div>
+            </div>
+            <div class="flex-item-none count-item">
+                <div class="left-icon"></div>
+                <div class="right-text">
+                    <div class="count">{{ outputAlyzData[3].toFixed(0) }}</div>
+                    <div class="name">审核中</div>
+                </div>
+            </div>
+            <div class="flex-item-none count-item">
+                <div class="left-icon"></div>
+                <div class="right-text">
+                    <div class="count">{{ outputAlyzData[4].toFixed(0) }}</div>
+                    <div class="name">我发起的</div>
+                </div>
+            </div>
+        </header>
+        <section class="flex-item-auto">
+            <div style="display: flex; justify-content: space-between;margin-bottom: 20px;">
+                <div>
+                    <el-button type="info" icon="el-icon-plus" @click="handleAdd">活动发起</el-button>
+                </div>
+                <div>
+                    <el-input
+                        placeholder="请输入搜索关键字"
+                        suffix-icon="el-icon-search"
+                        v-model="searchText"
+                        style="width: 200px; margin-right: 10px;"
+                    ></el-input>
+                    <el-button type="primary" @click="handleQuery">搜索</el-button>
+                </div>
+            </div>
+            <el-row>
+                <el-table :data="tableData" tooltip-effect="dark" style="width: 100%">
+                    <el-table-column type="selection" width="55"></el-table-column>
+                    <el-table-column label="活动名称" width="auto" prop="hhg_name"></el-table-column>
+                    <el-table-column label="批次" width="100" prop="hhg_src_id"></el-table-column>
+                    <el-table-column label="活动类型" show-overflow-tooltip width="360" prop="hhg_cate">
+                        <template
+                            slot-scope="scope"
+                        >{{ scope.row.cate_info.reduce((p, c) => `${p} ${c.hh_name}` , '') }}</template>
+                    </el-table-column>
+                    <el-table-column label="活动级别" width="100" prop="hhg_level"></el-table-column>
+                    <el-table-column label="活动时间(开始-结束)" width="290">
+                        <template
+                            slot-scope="scope"
+                        >{{ scope.row.hhg_kssj }} - {{ scope.row.hhg_jssj }}</template>
+                    </el-table-column>
+
+                    <el-table-column label="操作" width="200">
+                        <template slot-scope="scope">
+                            <el-button type="text" @click="handleSz(scope.row)">设置</el-button>
+                            <el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row.hhg_id)">
+                                <el-button
+                                    slot="reference"
+                                    type="text"
+                                    style="margin-left: 10px;"
+                                >删除</el-button>
+                            </el-popconfirm>
+
+                            <el-dropdown>
+                                <el-button type="text" style="margin-left: 10px;">
+                                    其他
+                                    <i class="el-icon-arrow-down el-icon--right" />
+                                </el-button>
+                                <el-dropdown-menu slot="dropdown">
+                                    <el-dropdown-item
+                                        @click.native="handleFb(scope.row)"
+                                    >{{ scope.row.hhg_fbzt_option_k === '0' ? '发布' : '已发布' }}</el-dropdown-item>
+                                    <el-dropdown-item
+                                        @click.native="handleCopy(scope.row.hhg_id)"
+                                    >复制</el-dropdown-item>
+                                    <el-dropdown-item
+                                        @click.native="handleSqjl(scope.row.hhg_id)"
+                                    >申请记录</el-dropdown-item>
+                                    <el-dropdown-item
+                                        @click.native="handleHdjg(scope.row.hhg_id)"
+                                    >活动结果</el-dropdown-item>
+                                </el-dropdown-menu>
+                            </el-dropdown>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </el-row>
+        </section>
+
+        <footer
+            class="flex-item-none"
+            style="display: flex;justify-content: flex-end;margin-top: 30px;"
+        >
+            <el-pagination
+                background
+                layout="total,prev, pager, next"
+                :page-size="limit"
+                :total="total"
+                :current-page.sync="page"
+                @current-change="handleQuery"
+            ></el-pagination>
+        </footer>
+
+        <el-dialog title="设置" :visible.sync="dialogFormVisible" @closed="initDialogForm">
+            <el-form :model="dialogForm" label-width="100px">
+                <el-form-item label="评分设置">
+                    <el-select
+                        v-model="dialogForm.hhg_pfmb"
+                        placeholder
+                        style="width: 100%;"
+                        filterable
+                        remote
+                        :remote-method="handleQueryPfmb"
+                    >
+                        <el-option
+                            v-for="({ hp_id, hp_name }) in pfmbOptions"
+                            :key="hp_id"
+                            :label="hp_name"
+                            :value="hp_id"
+                        ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="专家设置">
+                    <el-select
+                        v-model="dialogForm.hhg_zjsz"
+                        placeholder
+                        multiple
+                        style="width: 100%;"
+                        filterable
+                        remote
+                        :remote-method="handleQueryZjsz"
+                    >
+                        <el-option
+                            v-for="({ user_id, user_realname }) in zjszOptions"
+                            :key="user_id"
+                            :label="user_realname"
+                            :value="user_id"
+                        ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="奖项设置">
+                    <el-input
+                        v-model="dialogForm.hhg_jxsz"
+                        type="textarea"
+                        :autosize="{ minRows: 5 }"
+                        placeholder="例如:一等奖 笔记本一台 一名 
+            二等奖 笔记本一台 一名 
+            三等奖 笔记本一台 一名"
+                    ></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer">
+                <el-button @click="closeDialogForm">取 消</el-button>
+                <el-button type="primary" @click="handleEdit">确 定</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
 <script>
 
-import { defineComponent, ref } from "@vue/composition-api";
-import { queryApi } from './api';
+import { defineComponent, ref, getCurrentInstance, reactive } from "@vue/composition-api";
+import { TransitionPresets, useTransition } from '@vueuse/core'
+import { queryApi, deleteApi, editApi, copyApi, queryPfmbApi, queryZjszApi } from './api';
 
 export default defineComponent({
     setup() {
-        const searchText = ref('')
 
+
+        const _this = getCurrentInstance().proxy
+
+        const searchText = ref('')
         const total = ref(0)
         const tableData = ref([])
-        async function query() {
-            const { data } = await queryApi()
-            const { page_data, total_rows } = data
+        const limit = 7
+        const page = ref(1)
+        const alyzData = ref([0, 0, 0, 0, 0])
+
+        const outputAlyzData = useTransition(alyzData, {
+            duration: 1000,
+            transition: TransitionPresets.easeInOutCubic,
+        })
+
+        async function handleQuery() {
+            const { data } = await queryApi({
+                limit,
+                keyword: searchText.value,
+                page: page.value
+            })
+            const { page_data, total_rows, alyz } = data
 
             total.value = total_rows * 1
             tableData.value = page_data
+
+            const { hdzs, yjs, jxz, shz, wfqd } = alyz
+            alyzData.value = [hdzs * 1, yjs * 1, jxz * 1, shz * 1, wfqd * 1]
+        }
+
+        handleQuery()
+
+        function handleAdd() {
+            _this.$router.push('/hdlb/hdfq')
+        }
+
+        function handleDel(id) {
+            deleteApi(id).then(() => {
+                handleQuery()
+            })
+        }
+
+        function handleCopy(id) {
+            copyApi(id).then(() => {
+                handleQuery()
+            })
+        }
+
+        function handleFb(row) {
+            const { hhg_id, hhg_fbzt_option_k } = row
+            editApi(hhg_id, {
+                hhg_fbzt: hhg_fbzt_option_k === '0' ? '1' : '0'
+            }).then(() => {
+                handleQuery()
+            })
+        }
+
+
+
+
+        function handleHdjg(id) {
+            _this.$router.push({ name: 'hdjg', params: { id: id } })
+        }
+
+
+        const currentRow = ref(null)
+        function handleSz(row) {
+            currentRow.value = row;
+            console.log('row :>> ', row);
+
+            row['hhg_pfmb'] && (dialogForm['hhg_pfmb'] = row['hhg_pfmb']);
+            row['hhg_zjsz'] && (dialogForm['hhg_zjsz'].push(...row['hhg_zjsz'].split(',')));
+            row['hhg_jxsz'] && (dialogForm['hhg_jxsz'] = row['hhg_jxsz']);
+
+            openDialogForm()
+        }
+
+
+        function handleEdit() {
+            const { hhg_pfmb, hhg_zjsz, hhg_jxsz } = dialogForm
+            editApi(currentRow.value.hhg_id, {
+                hhg_pfmb,
+                hhg_jxsz,
+                hhg_zjsz: hhg_zjsz.join(',')
+            }).then(() => {
+                closeDialogForm()
+            })
+        }
+
+        // 
+        const dialogFormVisible = ref(false)
+        function openDialogForm() {
+            // handleQueryPfmb()
+            pfmbOptions.value.push(currentRow.value.pfmb_info)
+            // handleQueryZjsz()
+            zjszOptions.value = currentRow.value.members_zj
+
+            dialogFormVisible.value = true
+        }
+        function closeDialogForm() {
+            handleQuery().then(() => {
+                dialogFormVisible.value = false;
+            })
+        }
+
+        function initDialogForm() {
+            dialogForm['hhg_pfmb'] = '';
+            dialogForm['hhg_zjsz'] = [];
+            dialogForm['hhg_jxsz'] = '';
+
+            pfmbOptions.value = []
+            zjszOptions.value = []
+        }
+
+
+        const dialogForm = reactive({
+            hhg_pfmb: '', hhg_zjsz: [], hhg_jxsz: ''
+        })
+
+        const pfmbOptions = ref([])
+        function handleQueryPfmb(value) {
+            queryPfmbApi({ keyword: value }).then(res => {
+                pfmbOptions.value = res.data.page_data
+            })
+        }
+
+        const zjszOptions = ref([])
+        function handleQueryZjsz(value) {
+            queryZjszApi({ keyword: value }).then(res => {
+                zjszOptions.value = res.data.page_data
+            })
         }
 
-        query()
 
         return {
+            limit,
+            page,
             total,
             tableData,
-            query,
-            searchText
+            searchText,
+            handleQuery,
+            handleAdd,
+            handleDel,
+            dialogFormVisible,
+            openDialogForm,
+            closeDialogForm,
+            dialogForm,
+            outputAlyzData,
+            handleHdjg,
+            handleSz,
+            handleEdit,
+            pfmbOptions,
+            zjszOptions,
+            handleQueryPfmb,
+            handleQueryZjsz,
+            initDialogForm,
+            handleCopy,
+            handleFb
         }
     }
 })
 </script>
 
 <style lang="scss" scoped>
+@import "@/styles/mixin.scss";
+
+.count-item {
+    width: 180px;
+    height: 90px;
+    border-radius: 6px;
+    overflow: hidden;
+    color: #fff;
+    display: flex;
+    justify-content: flex-start;
+    align-items: flex-start;
+    &:nth-child(1) {
+        .left-icon {
+            background-color: #4a7dbd;
+        }
+        .right-text {
+            background-color: #5daaec;
+        }
+    }
+    &:nth-child(2) {
+        .left-icon {
+            background-color: #4a7dbd;
+        }
+        .right-text {
+            background-color: #5daaec;
+        }
+    }
+    &:nth-child(3) {
+        .left-icon {
+            background-color: #4a7dbd;
+        }
+        .right-text {
+            background-color: #5daaec;
+        }
+    }
+    &:nth-child(4) {
+        .left-icon {
+            background-color: #4a7dbd;
+        }
+        .right-text {
+            background-color: #5daaec;
+        }
+    }
+    &:nth-child(5) {
+        .left-icon {
+            background-color: #4a7dbd;
+        }
+        .right-text {
+            background-color: #5daaec;
+        }
+    }
+    > div {
+        box-sizing: border-box;
+    }
+    .left-icon {
+        width: 80px;
+        height: 100%;
+    }
+    .right-text {
+        width: 100px;
+        height: 100%;
+        padding: 10px;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        align-items: start;
+
+        .count {
+            font-size: 20px;
+        }
+    }
+}
 </style>

+ 3 - 0
src/views/xtgl/pfmb/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <h1>mppfsz</h1>
+</template>