Przeglądaj źródła

适配pad三会一课页面

HOME\tianlin01 1 rok temu
rodzic
commit
eb6ded5551

BIN
inspur-ui/src/assets/images/weizhi.png


+ 34 - 24
inspur-ui/src/permission.js

@@ -1,14 +1,22 @@
 import router from './router'
 import store from './store'
-import { Message } from 'element-ui'
+import {
+  Message
+} from 'element-ui'
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
-import { getToken } from '@/utils/auth'
-import { isRelogin } from '@/utils/request'
+import {
+  getToken
+} from '@/utils/auth'
+import {
+  isRelogin
+} from '@/utils/request'
 
-NProgress.configure({ showSpinner: false })
+NProgress.configure({
+  showSpinner: false
+})
 
-const whiteList = ['/login', '/auth-redirect', '/bind', '/register','/forgetpwd','/login_pad']
+const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/forgetpwd', '/login_pad']
 
 router.beforeEach((to, from, next) => {
   NProgress.start()
@@ -16,7 +24,9 @@ router.beforeEach((to, from, next) => {
     to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
     /* has token*/
     if (to.path === '/login') {
-      next({ path: '/' })
+      next({
+        path: '/'
+      })
       NProgress.done()
     } else {
       if (store.getters.roles.length === 0) {
@@ -27,40 +37,40 @@ router.beforeEach((to, from, next) => {
           store.dispatch('GenerateRoutes').then(accessRoutes => {
             // 根据roles权限生成可访问的路由表
             router.addRoutes(accessRoutes) // 动态添加可访问路由表
-            next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
+            next({
+              ...to,
+              replace: true
+            }) // hack方法 确保addRoutes已完成
           })
         }).catch(err => {
-            store.dispatch('LogOut').then(() => {
-              Message.error(err)
-              next({ path: '/' })
+          store.dispatch('LogOut').then(() => {
+            Message.error(err)
+            next({
+              path: '/'
             })
           })
+        })
       } else {
         next()
       }
     }
-  }
-  else {
+  } else {
     // 没有token
     if (whiteList.indexOf(to.path) !== -1) {
       // 在免登录白名单,直接进入
       next()
-    }
-    else if ((to.path).indexOf('/showDetail') !== -1) {
+    } else if ((to.path).indexOf('/showDetail') !== -1) {
       // 在免登录白名单,直接进入
       next()
-    }
-
-
-    else {
+    } else {
       const userAgent = navigator.userAgent || navigator.vendor || window.opera;
       const isMOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
-      if(isMOBILE){
-         next(`/login_pad`) // 否则全部重定向到登录页
-      }else{
-         next(`/login`) // 否则全部重定向到登录页
-      }
-
+      // if(isMOBILE){
+      //    next(`/login_pad`) // 否则全部重定向到登录页
+      // }else{
+      //    next(`/login`) // 否则全部重定向到登录页
+      // }
+      next(`/login`) // 否则全部重定向到登录页
 
       NProgress.done()
     }

+ 64 - 54
inspur-ui/src/router/index.js

@@ -29,17 +29,14 @@ import Layout from '@/layout'
  */
 
 // 公共路由
-export const constantRoutes = [
-  {
+export const constantRoutes = [{
     path: '/redirect',
     component: Layout,
     hidden: true,
-    children: [
-      {
-        path: '/redirect/:path(.*)',
-        component: () => import('@/views/redirect')
-      }
-    ]
+    children: [{
+      path: '/redirect/:path(.*)',
+      component: () => import('@/views/redirect')
+    }]
   },
   {
     path: '/login',
@@ -51,6 +48,11 @@ export const constantRoutes = [
     component: () => import('@/views/login_pad'),
     hidden: true
   },
+  {
+    path: '/meeting_pad',
+    component: () => import('@/views/meeting_pad'),
+    hidden: true
+  },
   {
     path: '/register',
     component: () => import('@/views/register'),
@@ -72,13 +74,13 @@ export const constantRoutes = [
     redirect: '/news/highlights'
   },
   {
-    path:'/index',
-    redirect:'/news/highlights'
+    path: '/index',
+    redirect: '/news/highlights'
   },
   {
-    path:'/designerViewer/:id',
-    hidden:true,
-    component:()=>import('@/views/party_screen/details/viewer/index')
+    path: '/designerViewer/:id',
+    hidden: true,
+    component: () => import('@/views/party_screen/details/viewer/index')
   },
   {
     path: '/party_work/meeting/info',
@@ -107,12 +109,14 @@ export const constantRoutes = [
     component: Layout,
     hidden: true,
     redirect: 'noredirect',
-    children: [
-      {
+    children: [{
         path: 'profile',
         component: () => import('@/views/system/user/profile/index'),
         name: 'Profile',
-        meta: { title: '个人中心', icon: 'user' }
+        meta: {
+          title: '个人中心',
+          icon: 'user'
+        }
       },
       {
         path: 'updatePass',
@@ -129,76 +133,80 @@ export const constantRoutes = [
 ]
 
 // 动态路由,基于用户权限动态去加载
-export const dynamicRoutes = [
-  {
+export const dynamicRoutes = [{
     path: '/system/user-auth',
     component: Layout,
     hidden: true,
     permissions: ['system:user:edit'],
-    children: [
-      {
-        path: 'role/:userId(\\d+)',
-        component: () => import('@/views/system/user/authRole'),
-        name: 'AuthRole',
-        meta: { title: '分配角色', activeMenu: '/system/user' }
+    children: [{
+      path: 'role/:userId(\\d+)',
+      component: () => import('@/views/system/user/authRole'),
+      name: 'AuthRole',
+      meta: {
+        title: '分配角色',
+        activeMenu: '/system/user'
       }
-    ]
+    }]
   },
   {
     path: '/system/role-auth',
     component: Layout,
     hidden: true,
     permissions: ['system:role:edit'],
-    children: [
-      {
-        path: 'user/:roleId(\\d+)',
-        component: () => import('@/views/system/role/authUser'),
-        name: 'AuthUser',
-        meta: { title: '分配用户', activeMenu: '/system/role' }
+    children: [{
+      path: 'user/:roleId(\\d+)',
+      component: () => import('@/views/system/role/authUser'),
+      name: 'AuthUser',
+      meta: {
+        title: '分配用户',
+        activeMenu: '/system/role'
       }
-    ]
+    }]
   },
   {
     path: '/system/dict-data',
     component: Layout,
     hidden: true,
     permissions: ['system:dict:list'],
-    children: [
-      {
-        path: 'index/:dictId(\\d+)',
-        component: () => import('@/views/system/dict/data'),
-        name: 'Data',
-        meta: { title: '字典数据', activeMenu: '/system/dict' }
+    children: [{
+      path: 'index/:dictId(\\d+)',
+      component: () => import('@/views/system/dict/data'),
+      name: 'Data',
+      meta: {
+        title: '字典数据',
+        activeMenu: '/system/dict'
       }
-    ]
+    }]
   },
   {
     path: '/monitor/job-log',
     component: Layout,
     hidden: true,
     permissions: ['monitor:job:list'],
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/monitor/job/log'),
-        name: 'JobLog',
-        meta: { title: '调度日志', activeMenu: '/monitor/job' }
+    children: [{
+      path: 'index',
+      component: () => import('@/views/monitor/job/log'),
+      name: 'JobLog',
+      meta: {
+        title: '调度日志',
+        activeMenu: '/monitor/job'
       }
-    ]
+    }]
   },
   {
     path: '/tool/gen-edit',
     component: Layout,
     hidden: true,
     permissions: ['tool:gen:edit'],
-    children: [
-      {
-        path: 'index/:tableId(\\d+)',
-        component: () => import('@/views/tool/gen/editTable'),
-        name: 'GenEdit',
-        meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
+    children: [{
+      path: 'index/:tableId(\\d+)',
+      component: () => import('@/views/tool/gen/editTable'),
+      name: 'GenEdit',
+      meta: {
+        title: '修改生成配置',
+        activeMenu: '/tool/gen'
       }
-    ]
+    }]
   }
 ]
 
@@ -211,6 +219,8 @@ Router.prototype.push = function push(location) {
 export default new Router({
   // 去掉url中的#
   // mode: 'history',
-  scrollBehavior: () => ({ y: 0 }),
+  scrollBehavior: () => ({
+    y: 0
+  }),
   routes: constantRoutes
 })

+ 4 - 3
inspur-ui/src/views/login.vue

@@ -274,9 +274,10 @@
             this.$store.dispatch("Login", this.loginForm).then(() => {
               // this.getDefault()
               this.$router.push({
-              //path: this.redirect || "/"
-              path: "/news/highlights"
-            }).catch(() => {});
+                //path: this.redirect || "/"
+                // path: "/news/highlights"
+                path: "/meeting_pad"
+              }).catch(() => {});
 
             }).catch(() => {
               this.loading = false;

+ 322 - 0
inspur-ui/src/views/meeting_pad.vue

@@ -0,0 +1,322 @@
+<template>
+  <div>
+    <div class="display-row nav">
+      <div class="display-row">
+        <el-image :src="logo" fit="fit" class="icon-32" />
+        <div class="title" style="margin-left:4px">灯塔智慧党建-控制端</div>
+      </div>
+      <div class="logout">
+        退出登录
+      </div>
+    </div>
+    <div class="left-bar display-cloumn">
+      <div v-for="item,index in menulist" @click="menuClick(index)">
+        <div v-if="index==menuIndex" class="display-row memu_item" style="background: rgba(202, 0, 1, 0.102);">
+          <svg-icon :icon-class="item.icon" class="menu-icon"
+            style="margin-left: 12px;margin-right:4px;color: #CA0001;" />
+          <div style="flex:auto;" class="menu_title_selected">
+            {{item.name}}
+          </div>
+          <div style="width:2px;height: 35px;background-color: #CA0001;"></div>
+        </div>
+        <div v-else class="display-row memu_item">
+          <svg-icon :icon-class="item.icon" class="menu-icon"
+            style="margin-left: 12px;margin-right:4px;color: #545454;" />
+          <div style="flex:auto;" class="menu_title">
+            {{item.name}}
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="content-class">
+      <div class="display-row" style="flex-wrap: wrap;overflow: scroll;padding-top: 16px;padding-left: 16px;">
+        <div v-for="item,index in meetingList" class="content-item display-cloumn"
+          style="margin-right:16px;margin-bottom: 16px;padding: 12px;justify-content: space-between;">
+          <div class="display-row">
+            <div style="flex: auto;justify-content: space-between;" class="display-cloumn">
+              <div class="item-title two-lines">
+                {{ item.title }}
+              </div>
+              <div class="display-row" style="align-items: center;">
+                <img :src="weizhiImg" style="width:13px;height:13px;margin-right: 4px;" />
+                <div class="time-font ">{{ item.address }}</div>
+              </div>
+            </div>
+            <div style="margin-left: 7px;">
+              <!-- <el-image :src="logo" style="width:107px;height:60px;" /> -->
+              <image-preview :src="item.picsPath+'_400.png'" :width="107" :height="60" :key="item.picsPath"
+                style="border-radius: 0;" />
+            </div>
+          </div>
+          <div class="display-row" style="align-items: center;">
+            <div style="flex: auto;" class="time-font">
+              {{item.beginTime}}
+            </div>
+            <div class="item-btn" @click="joinMeeting(item)">
+              进入会议
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+  </div>
+
+</template>
+
+<script>
+  import {
+    listMeeting
+  } from "@/api/partywork/meeting";
+  import {
+    getList
+  } from "@/api/system/table_list";
+
+  import logoImg from '@/assets/logo/party.png';
+  import locImg from '@/assets/images/weizhi.png';
+
+  export default {
+    name: "Login",
+    data() {
+      return {
+        logo: logoImg,
+        weizhiImg: locImg,
+        loading: true,
+        total: 0,
+        menulist: [{
+          icon: "zbdydh",
+          name: "支部党员大会",
+          path: ""
+        }, {
+          icon: "zbwyh",
+          name: "支部委员会",
+          path: ""
+        }, {
+          icon: "dxzh",
+          name: "党小组会",
+          path: ""
+        }, {
+          icon: "detail1",
+          name: "党课",
+          path: ""
+        }],
+        menuIndex: 0,
+        meetingList: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 12,
+          beginTime: null,
+          endTime: null,
+          address: null,
+          host: null,
+          fromOrg: null,
+          title: null,
+          describe: null,
+          meetingResult: null,
+          fileList: null,
+          picsPath: null,
+          file: null,
+          sort: null,
+          attendanceStatus: null,
+          isMobile: null,
+          djOrgid: null,
+          isPush: null,
+          content: null,
+          thumb: null,
+          type: 1,
+        }
+      };
+    },
+    watch: {
+
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      menuClick(index) {
+        this.menuIndex = index;
+        this.queryParams.type = index + 1;
+        this.getList();
+      },
+      joinMeeting(row) {
+        let meetingId = row.id;
+        this.$router.push({
+          path: "/party_work/meeting/info_pad",
+          query: {
+            meetingId: meetingId,
+          }
+        });
+
+      },
+      /** 查询党员会议列表 */
+      getList() {
+        this.loading = true;
+        listMeeting(this.queryParams).then(response => {
+          this.meetingList = response.rows;
+          console.log(this.meetingList);
+          this.total = response.total;
+          this.loading = false;
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .display-row {
+    display: flex;
+    flex-direction: row;
+  }
+
+  .content-class {
+    position: fixed;
+    left: 120px;
+    right: 0;
+    bottom: 0;
+    top: 42px;
+  }
+
+  .two-lines {
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    text-overflow: ellipsis;
+  }
+
+  .left-bar {
+    position: fixed;
+    left: 0;
+    top: 42px;
+    bottom: 0;
+    width: 120px;
+    box-sizing: border-box;
+    border-width: 0px 1px 0px 0px;
+    border-style: solid;
+    border-color: #D8D8D8;
+  }
+
+
+  .menu_title {
+    font-family: Source Han Sans;
+    font-size: 12px;
+    font-weight: normal;
+    line-height: 12px;
+    letter-spacing: 0px;
+    color: #545454;
+
+  }
+
+  .memu_item {
+    align-items: center;
+    justify-content: center;
+    height: 45px;
+  }
+
+  .menu_title_selected {
+    font-family: 思源黑体;
+    font-size: 12px;
+    font-weight: bold;
+    line-height: 12px;
+    letter-spacing: 0px;
+
+    color: #CA0001;
+
+  }
+
+  .time-font {
+    font-size: 10px;
+    font-weight: normal;
+    line-height: 12px;
+    letter-spacing: 0.01em;
+    color: #86909C;
+  }
+
+  .nav {
+    height: 42px;
+    width: 100vw;
+    background: #CA0001;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0 16px;
+    position: fixed;
+    left: 0;
+    top: 0;
+  }
+
+  .icon-32 {
+    width: 16px;
+    height: 16px;
+  }
+
+  .display-cloumn {
+    display: flex;
+    flex-direction: column;
+  }
+
+  .display-center {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+
+  .menu-icon {
+    width: 13px;
+    height: 13px;
+  }
+
+  .icon_32 {}
+
+  .logout {
+    font-family: Source Han Sans;
+    font-size: 12px;
+    font-weight: normal;
+    line-height: 12px;
+    letter-spacing: 0px;
+    color: #FFFFFF;
+  }
+
+  .title {
+    font-family: Alimama DongFangDaKai;
+    font-size: 16px;
+    font-weight: normal;
+    line-height: 16px;
+    letter-spacing: -1px;
+
+    // font-variation-settings: "opsz" auto;
+    color: #FFE59E;
+  }
+
+  .content-item {
+    width: calc((100% - 48px)/3);
+    aspect-ratio: 259/128;
+    border-radius: 4px;
+    background: #FFFFFF;
+    border: 1px solid #E5E8EF;
+  }
+
+  .item-btn {
+    width: 64px;
+    height: 28px;
+    line-height: 28px;
+    border-radius: 2px;
+    opacity: 1;
+    font-family: 思源黑体;
+    font-size: 12px;
+    font-weight: normal;
+    text-align: center;
+    border: 1px solid #4E5969;
+    color: #4E5969;
+  }
+
+  .item-title {
+    font-family: 思源黑体;
+    font-size: 12px;
+    font-weight: normal;
+    line-height: 20px;
+    letter-spacing: 0px;
+    color: #1D2129;
+  }
+</style>