Преглед изворни кода

Merge remote-tracking branch 'origin/master'

Reiskuchen пре 5 година
родитељ
комит
4f29de5bb6
29 измењених фајлова са 737 додато и 572 уклоњено
  1. 70 12
      fhKeeper/formulahousekeeper/inva_4_tivo/css/styles.css
  2. 6 3
      fhKeeper/formulahousekeeper/inva_4_tivo/download.html
  3. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/10.png
  4. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/11.png
  5. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/22.png
  6. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/33.png
  7. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/44.png
  8. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/55.png
  9. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/66.png
  10. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/77.png
  11. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/88.png
  12. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/99.png
  13. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/headBack.png
  14. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/icon.png
  15. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/z1.png
  16. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/images/z2.png
  17. 65 75
      fhKeeper/formulahousekeeper/inva_4_tivo/index.html
  18. 40 10
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  19. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  20. 68 12
      fhKeeper/formulahousekeeper/timesheet/src/main.js
  21. 2 0
      fhKeeper/formulahousekeeper/timesheet/src/port.js
  22. 61 28
      fhKeeper/formulahousekeeper/timesheet/src/routes.js
  23. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/404.vue
  24. 3 5
      fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue
  25. 6 2
      fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue
  26. 4 0
      fhKeeper/formulahousekeeper/timesheet/src/views/desktop/index.vue
  27. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/detail.vue
  28. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/detailDep.vue
  29. 407 420
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

+ 70 - 12
fhKeeper/formulahousekeeper/inva_4_tivo/css/styles.css

@@ -121,6 +121,10 @@ a.white {
 	transition: all 0.2s;
 }
 
+.btn-solid-reg-blue {
+    background: #20a0ff;
+}
+
 .btn-solid-reg:hover {
 	background-color: transparent;
 	color: #20a0ff;
@@ -743,17 +747,31 @@ input[type='checkbox'] {
 /*    04. Header     */
 /*********************/
 .header {
-	background-color: #20a0ff;
+	/*background-color: #20a0ff;*/
+    height: 100vh;
+    background-image: url("../images/headBack.png");
+    background-repeat:no-repeat;
 }
 
 .header .header-content {
 	padding-top: 8rem;
-	padding-bottom: 4rem;
+	padding-bottom: 14.5rem;
 	text-align: center;
 }
 
+.header .header-content .image-z {
+    color: #fff;
+    font-size: 18px;
+    margin: 2rem 0 3rem;
+}
+
+.header .header-content .image-z span {
+    margin: 1.5rem
+}
+
 .header .text-container {
-	margin-bottom: 3rem;
+	margin-bottom: 5rem;
+    text-align: center;
 }
 
 .header h1 {
@@ -768,13 +786,14 @@ input[type='checkbox'] {
 	color: #f3f7fd;
 }
 
-.header .btn-solid-lg {
+.header .btn-solid-lg-white {
 	margin-right: 0.5rem;
 	margin-bottom: 1.125rem;
 	margin-left: 0.5rem;
 	border-color: #f3f7fd;
 	background-color: #f3f7fd;
 	color: #20a0ff;
+    cursor: pointer;
 }
 
 .header .btn-solid-lg:hover {
@@ -782,6 +801,11 @@ input[type='checkbox'] {
 	color: #f3f7fd;
 }
 
+.header .btn-solid-lg-white:hover {
+    background: transparent;
+    color: #fff!important;
+}
+
 .header .btn-outline-lg {
 	border-color: #f3f7fd;
 	color: #f3f7fd;
@@ -835,14 +859,18 @@ input[type='checkbox'] {
 }
 
 .cards-1 .card-image {
-	max-width: 16rem;
+	max-width: 12rem;
 	margin-right: auto;
 	margin-bottom: 2rem;
 	margin-left: auto;
 }
 
+.card-image .img-fluid {
+	width: 120px;
+}
+
 .cards-1 .card-title {
-	margin-bottom: 0.5rem;
+	margin-bottom: 1.5rem;
 }
 
 .cards-1 .card-body {
@@ -1962,8 +1990,8 @@ a:hover.back-to-top {
 
 	/* Header */
 	.header .header-content {
-		padding-top: 11rem;
-		padding-bottom: 5rem;
+		padding-top: 9rem;
+		padding-bottom: 12.5rem;
 	}
 
 	.header .text-container {
@@ -2047,10 +2075,11 @@ a:hover.back-to-top {
 
 	/* Pricing */
 	.cards-2 .card {
-		width: 19.375rem;
+		width: 15.375rem;
 		max-width: 100%;
-		margin-right: 1.75rem;
-		margin-left: 1.75rem;
+		/*margin-right: 1.75rem;*/
+		/*margin-left: 1.75rem;*/
+        margin: 0 0.5rem 5rem;
 	}
 
 	.cards-2 .card .card-body {
@@ -2173,7 +2202,14 @@ a:hover.back-to-top {
 }
 
 #scenes .card {
-    background-color: #f3f7fd;
+    /*background-color: #f3f7fd;*/
+    background-color: #fff;
+    padding: 2rem 0;
+    border-radius: 20px;
+}
+
+#scenes .card .card-image .img-fluid {
+    width: 4.6rem;
 }
 
 .cards-1 .scenes {
@@ -2205,4 +2241,26 @@ a:hover.back-to-top {
     border: 1px solid #eee;
 }
 
+#details {
+	text-align: center;
+}
+
+#details .h2-heading {
+	margin-bottom: 50px;
+}
+
+#details .im-de {
+	margin: 0 auto;
+}
+
+#details .img-fluid-de {
+	margin:0;
+	padding: 0;
+	display: inline-block;
+}
+
+#details .img-fluid-de img {
+	width: 13rem;
+	max-width: 100%;
+}
 /* new style end */

+ 6 - 3
fhKeeper/formulahousekeeper/inva_4_tivo/download.html

@@ -3,9 +3,9 @@
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-    <meta name="keywords" content="工时管家,远程办公,员工管理,项目管理,绩效考核,项目成本统计,远程监控,兼职软件开发,软件外包,外包人员管理" />
-    <meta name="description" content="工时管家利用智能图像识别技术,统计员工每日实际的工作时长,并能自动分析员工每天时间分配情况,如研发,设计,上网,影视娱乐等,能有效提高领导对团队工作时间的把控,进而制定降低成本、提高效率的措施。同时领导可以查看员工在每个项目上投入的时间,核算项目的人力成本。"/>
-    <title>工时管家|反馈真实工作情况,提供员工考核数据</title>
+    <meta name="keywords" content="工时管理,工时统计,项目成本统计,远程监控" />
+    <meta name="description" content="工时管家利用智能图像识别技术实现工时管理和工时统计。可按项目,部门,岗位等多维度统计成本。软件可实现远程监管,有效反馈工作实际情况,对非工作情况主动检测上报。"/>
+    <title>工时管家-工时管理和统计的好助手,反馈真实工作情况,降低企业成本!</title>
     <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap&subset=latin-ext" rel="stylesheet">
     <link href="css/bootstrap.css" rel="stylesheet">
     <!-- <link href="css/fontawesome-all.css" rel="stylesheet"> -->
@@ -92,6 +92,9 @@
                         </div>
                     </div>
                 </div>
+                <div class="col-lg-12" style="color: #aaa;">
+                    员工安装客户端,领导即可查看工作桌面远程监管
+                </div>
             </div>
         </div>
     </div>

BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/10.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/11.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/22.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/33.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/44.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/55.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/66.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/77.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/88.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/99.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/headBack.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/icon.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/z1.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/images/z2.png


Разлика између датотеке није приказан због своје велике величине
+ 65 - 75
fhKeeper/formulahousekeeper/inva_4_tivo/index.html


+ 40 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -2,15 +2,11 @@ package com.management.platform.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.management.platform.entity.Project;
-import com.management.platform.entity.Report;
-import com.management.platform.entity.TimeCalculation;
-import com.management.platform.mapper.ProjectMapper;
-import com.management.platform.mapper.ReportMapper;
-import com.management.platform.mapper.TimeCalculationMapper;
-import com.management.platform.mapper.UserMapper;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.*;
 import com.management.platform.service.ReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.management.platform.service.TimeCalculationService;
 import com.management.platform.util.HttpRespMsg;
 import org.apache.poi.hssf.usermodel.*;
 import org.springframework.beans.factory.annotation.Value;
@@ -50,6 +46,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     @Resource
     private ProjectMapper projectMapper;
 
+    @Resource
+    private TimeCalculationShowMapper timeCalculationShowMapper;
+
+
     @Value(value = "${upload.path}")
     private String path;
 
@@ -59,14 +59,44 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             //首先根据日期获取当天所有提交过日志的人
-            List<Map<String, Object>> nameList = reportMapper.getReportNameByDate(date,
-                    userMapper.selectById(request.getHeader("Token")).getCompanyId());
+            String userId = request.getHeader("Token");
+            User user = userMapper.selectById(userId);
+            List<Map<String, Object>> nameList = new ArrayList<>();
+            if (user.getRole().equals("0")) {
+                //普通员工只能看自己的
+                Map map = new HashMap();
+                map.put("id", user.getId());
+                map.put("name", user.getName());
+                nameList.add(map);
+            } else {
+                nameList = reportMapper.getReportNameByDate(date,
+                        userMapper.selectById(request.getHeader("Token")).getCompanyId());
+            }
+
             for (Map<String, Object> map : nameList) {
                 //再根据人分别获取当天的报告
-                map.put("data", reportMapper.getReportByDate(date, (String) map.get("id")));
+                List<Map<String, Object>> list = reportMapper.getReportByDate(date, (String) map.get("id"));
+                map.put("data", list);
+                double reportTime = 0;
+                for (Map<String, Object> m : list) {
+                    double t = (double) m.get("time");
+                    reportTime += t;
+                }
+                DecimalFormat df = new DecimalFormat("0.00");
+                map.put("reportTime", df.format(reportTime));
+                List<TimeCalculationShow> timeList = timeCalculationShowMapper.selectList(new QueryWrapper<TimeCalculationShow>().eq("user_id", (String) map.get("id")).eq("date", date));
+                int calculateTime = 0;
+                for (TimeCalculationShow show : timeList) {
+                    calculateTime += show.getDuration();
+                }
+                //数据库是秒,时间转换为小时;
+                double d = calculateTime*1.0/3600;
+                map.put("calculateTime", df.format(d));
             }
+
             httpRespMsg.data = nameList;
         } catch (NullPointerException e) {
+            e.printStackTrace();
             httpRespMsg.setError("验证失败");
             return httpRespMsg;
         }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -264,9 +264,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         if (userMapper.selectList(new QueryWrapper<User>().eq("phone", phone)).size() > 0) {
             httpRespMsg.setError("电话号码重复");
         } else {
-            //首先生成一个新公司,增加会员的试用天数
+            //首先生成一个新公司,增加会员的试用一个月
             Company company = new Company().setCompanyName(companyName)
-                    .setExpirationDate(LocalDateTime.now().plusDays(3));
+                    .setExpirationDate(LocalDateTime.now().plusMonths(1));
             companyMapper.insert(company);
             if (userMapper.selectCount(new QueryWrapper<User>().eq("company_id", company.getId())) >=
                     (companyMapper.selectById(company.getId()).getStaffCountMax())) {

+ 68 - 12
fhKeeper/formulahousekeeper/timesheet/src/main.js

@@ -1,20 +1,19 @@
 // import Vue from 'vue'
-import App from './App'
-import store from './vuex/store'
-import routes from './routes'
-
 // import VueRouter from 'vue-router'
 // Vue.use(VueRouter)
-
 // import ElementUI from 'element-ui'
 // Vue.use(ElementUI)
-
 // import Vuex from 'vuex'
 // Vue.use(Vuex)
+// import echarts from 'echarts'
+// import 'element-ui/lib/theme-chalk/index.css'
+
+import App from './App'
+import store from './vuex/store'
+// import routes from './routes'
 
 import http from './http'
 import port from './port'
-// import echarts from 'echarts'
 import $ from 'jquery'
 
 Vue.prototype.http = http
@@ -24,17 +23,20 @@ Vue.prototype.echarts = echarts
 import VueClipboard from 'vue-clipboard2'
 Vue.use(VueClipboard)
 
-// import 'element-ui/lib/theme-chalk/index.css'
 import 'font-awesome/css/font-awesome.min.css'
 import './assets/iconfont/iconfont.css'
 
-const router = new VueRouter({
-    routes
-})
+// const router = new VueRouter({
+//     routes
+// })
+import { staffRouter, manageRouter, fixedRouter } from './routes'
+import router from './routes'
 
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
 
+var addRouFlag = false;
+
 router.beforeEach((to, from, next) => {
     NProgress.start();
     if (to.path == '/register') {
@@ -50,12 +52,66 @@ router.beforeEach((to, from, next) => {
     if (!user && to.path != '/login') {
         next({ path: '/login' })
     } else {
+        if (!addRouFlag) {
+            if(user != null) {
+                addRouFlag = true
+                if(user.role == 0) {
+                    var getRoutes = baseRoleGetRouters(staffRouter, 1);
+                    global.antRouter = fixedRouter.concat(getRoutes);
+                    router.addRoutes(fixedRouter.concat(getRoutes));
+                    router.options.routes = fixedRouter.concat(getRoutes);
+                    router.push({ path: to.path })
+                } else {
+                    var getRoutes = baseRoleGetRouters(manageRouter, 1);
+                    global.antRouter = fixedRouter.concat(getRoutes);
+                    router.addRoutes(fixedRouter.concat(getRoutes));
+                    router.options.routes = fixedRouter.concat(getRoutes);
+                    router.push({ path: to.path })
+                }
+            }
+        }
         next()
     }
 })
 
+function baseRoleGetRouters(allRoutes, roles) {
+    // allRoutes是动态路由表
+    // roles是取到的用户角色,数组
+    let rightRoutes = allRoutes.filter((route, index) => {
+        if (true) {
+            if (route.children && route.children.length) {
+                route.children = baseRoleGetRouters(route.children, roles)
+            }
+            return true
+        }
+        return false
+    })
+    return rightRoutes
+}
+
+function hasPermission(route, roles) {
+    if (route.meta && route.meta.roles) {
+        return roles.some(role => route.meta.roles.indexOf(role) >= 0)
+    } else {
+        return true
+    }
+}
+
 router.afterEach(() => {
-    NProgress.done()
+    NProgress.done();
+    // 百度统计
+    setTimeout(()=>{
+        var _hmt = _hmt || [];
+        (function() {
+            //每次执行前,先移除上次插入的代码
+            document.getElementById('baidu_tj') && document.getElementById('baidu_tj').remove();
+            var hm = document.createElement("script");
+            hm.src = "https://hm.baidu.com/hm.js?b485cd24e5dcbe73d4dde5abf7dc8ae0";
+            hm.id = "baidu_tj"
+            var s = document.getElementsByTagName("script")[0];
+            s.parentNode.insertBefore(hm, s);
+        })();
+    },0);
 })
 
 new Vue({

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/port.js

@@ -47,5 +47,7 @@ export default {
     report: {
         list: '/report/getReportList',                          // 获取报告列表
         export: '/report/exportReport',                         // 导出报告
+        getPort: '/report/getReport',                           // 获取当天自己报告
+        editPort: '/report/editReport',                             // 编辑报告
     }
 }

+ 61 - 28
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -1,3 +1,6 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+
 import Login from './views/Login.vue'
 import Register from './views/Register.vue'
 import NotFound from './views/404.vue'
@@ -22,10 +25,9 @@ import depDetail from './views/project/detailDep.vue'
 // 团队管理
 import team from './views/team/index.vue'
 
-// 系统管理
-import system from './views/system/index.vue'
+Vue.use(Router)
 
-let routes = [
+export const fixedRouter = [
     {
         path: '/login',
         component: Login,
@@ -37,43 +39,58 @@ let routes = [
         component: Register,
         name: '',
         hidden: true
-    },
-    //工作桌面
+    }
+]
+
+export const manageRouter = [
+    //智能监控
     {
         path: '/',
         component: Home,
-        name: '工作桌面',
+        name: '智能监控',
         iconCls: 'fa fa-desktop',
         children: [
-            { path: '/desktop', component: desktop, name: '桌面查看' },
-            { path: '/desktop/:id/:date', component: desktopDetail, name: '个人桌面', hidden: true },
+            { path: '/desktop', component: desktop, name: '员工桌面' },
+            { path: '/desktop/:id/:date', component: desktopDetail, name: '员工桌面详情', hidden: true },
             { path: '/unusual', component: unusual, name: '异常统计' },
+            { path: '/statistics', component: statistics, name: '智能分析' },
         ]
     },
-    //工报告
+    //工报告
     {
         path: '/',
         component: Home,
-        name: '工报告',
+        name: '工报告',
         iconCls: 'fa fa-sticky-note',
+        leaf: true,
         children: [
-            { path: '/statistics', component: statistics, name: '工时统计' },
-            { path: '/daily', component: daily, name: '工作日报' },
+            { path: '/daily', component: daily, name: '工时报告' },
         ]
     },
-    //项目管理
+    //成本统计
     {
         path: '/',
         component: Home,
-        name: '项目管理',
-        iconCls: 'fa fa-briefcase',
+        name: '成本统计',
+        iconCls: 'fa fa-clock-o',
+        leaf: true,
         children: [
-            { path: '/list', component: list, name: '项目列表' },
             { path: '/cost', component: cost, name: '成本统计' },
             { path: '/cost/:id/:name', component: proDetail, name: '成本详情', hidden: true },
             { path: '/costDep/:id/:name', component: depDetail, name: '成本详情', hidden: true },
         ]
     },
+    //项目管理
+    {
+        path: '/',
+        component: Home,
+        name: '项目管理',
+        iconCls: 'fa fa-briefcase',
+        leaf: true,
+        children: [
+            { path: '/list', component: list, name: '项目管理' },
+        ]
+    },
     //组织架构
     {
         path: '/',
@@ -85,17 +102,6 @@ let routes = [
             { path: '/team', component: team, name: '组织架构' },
         ]
     },
-    //系统管理
-    // {
-    //     path: '/',
-    //     component: Home,
-    //     name: '',
-    //     iconCls: 'fa fa-cog',
-    //     leaf: true,//只有一个节点
-    //     children: [
-    //         { path: '/system', component: system, name: '系统管理' },
-    //     ]
-    // },
     {
         path: '/404',
         component: NotFound,
@@ -109,4 +115,31 @@ let routes = [
     }
 ];
 
-export default routes;
+export const staffRouter = [
+    //工时报告
+    {
+        path: '/',
+        component: Home,
+        name: '工时报告',
+        iconCls: 'fa fa-sticky-note',
+        leaf: true,
+        children: [
+            { path: '/daily', component: daily, name: '工时报告' },
+        ]
+    },
+    {
+        path: '/404',
+        component: NotFound,
+        name: '',
+        hidden: true
+    },
+    {
+        path: '*',
+        hidden: true,
+        redirect: { path: '/404' }
+    }
+];
+
+export default new Router({
+    routes: fixedRouter
+})

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/404.vue

@@ -19,7 +19,7 @@
 		},
 		methods: {
             back() {
-                this.$router.push('/map');
+                this.$router.push('/login');
             }
         },
         created() {

+ 3 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -128,6 +128,7 @@
                 sysName: "工时管家",
                 collapsed: sessionStorage.collapsed!=null?(sessionStorage.collapsed=='true'?true:false):false,
                 sysUserName: "",
+                menu: [],
 
                 editInformation: false,
                 editPassWord: false,
@@ -165,6 +166,7 @@
                     //type: 'warning'
                 }).then(() => {
                     sessionStorage.removeItem("user");
+                    location.reload();
                     _this.$router.push("/login");
                 });
             },
@@ -277,9 +279,6 @@
             },
 
             setTime() {
-                console.log(new Date().getTime() + this.user.remainingTime,
-                new Date(this.user.remainingTime),
-                new Date())
                 var d = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 'd');
                 var h = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 'h');
                 var m = util.formatDate.cdTime(new Date(new Date().getTime() + this.user.remainingTime), new Date(), 'm');
@@ -293,7 +292,6 @@
                 this.user = user;
                 this.sysUserName = user.name || "";
                 if(this.user.remainingTime != "" && this.user.remainingTime != 0) {
-                    // this.setTime();
                     this.remainingTime = util.formatDate.format(new Date(new Date().getTime() + this.user.remainingTime), "yyyy-MM-dd")
                 } else {
                     this.remainingTime = "已过期";
@@ -302,7 +300,7 @@
             } else {
                 this.$router.push("/login");
             }
-        }
+        },
     };
 </script>
 

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -23,7 +23,7 @@
                             <p><span style="color: #333">QQ:</span><span id="QQ">3052894409</span></p>
                         </div>
                     </el-link>
-                    <el-link type="primary" style="margin-right:5px;" :underline="false"><a style="color:#409EFF;text-decoration:none" href="http://gsgj.ttkuaiban.com/download.html" download="工时管家">客户端下载</a></el-link>
+                    <el-link type="primary" style="margin-right:5px;" :underline="false"><a style="color:#409EFF;text-decoration:none" href="http://gsgj.ttkuaiban.com/download.html" target="_blank">客户端下载</a></el-link>
                     <el-link type="primary" @click="jumpTo" :underline="false">企业注册</el-link>
                 </div>
             </el-form>
@@ -65,7 +65,11 @@
                             this.logining = false;
                             if (res.code == "ok") {
                                 sessionStorage.setItem('user', JSON.stringify(res.data));
-                                this.$router.push({ path: '/desktop' });
+                                if(res.data.role == 0) {
+                                    this.$router.push({ path: '/daily' });
+                                } else {
+                                    this.$router.push({ path: '/desktop' });
+                                }
                             } else {
                                 this.$message({
                                     message: res.msg,

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/desktop/index.vue

@@ -19,6 +19,10 @@
                         placeholder="选择日期"
                     ></el-date-picker>
                 </el-form-item>
+                <el-form-item style="float:right;">
+                    <span style="color:#aaa;font-size:12px;">(员工安装客户端,领导即可查看工作桌面远程监管)</span>
+                    <el-link type="primary" :underline="false" href="http://gsgj.ttkuaiban.com/download.html" target="_blank">客户端下载</el-link>
+                </el-form-item>
             </el-form>
         </el-col>
 

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/detail.vue

@@ -11,7 +11,7 @@
                     <span class="workName">{{detailName}}</span>
                 </el-form-item>
                 <el-form-item style="float:right;">
-                    <span style="font-size:18px;">项目成本:<span style="color:#20a0ff;">{{cost}}元</span></span>
+                    <span style="font-size:18px;">项目成本:<span style="color:#20a0ff;">{{cost.toFixed(2)}}元</span></span>
                 </el-form-item>
             </el-form>
         </el-col>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/detailDep.vue

@@ -13,7 +13,7 @@
                     :options="option" :props="{ checkStrictly: true }" :show-all-levels="false"></el-cascader>
                 </el-form-item>
                 <el-form-item style="float:right;">
-                    <span style="font-size:18px;">部门成本:<span style="color:#20a0ff;">{{cost}}元</span></span>
+                    <span style="font-size:18px;">部门成本:<span style="color:#20a0ff;">{{cost.toFixed(2)}}元</span></span>
                 </el-form-item>
             </el-form>
         </el-col>

+ 407 - 420
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1,459 +1,446 @@
 <template>
-  <section>
-    <!--工具条-->
-    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-      <el-form :inline="true">
-        <el-form-item>
-          <el-date-picker
-            v-model="date"
-            :editable="false"
-            format="yyyy-MM"
-            value-format="yyyy-MM"
-            @change="changeMonth()"
-            :clearable="false"
-            type="month"
-            placeholder="选择月份"
-          ></el-date-picker>
-        </el-form-item>
-        <el-form-item style="float:right;">
-          <el-link type="primary" :underline="false" @click="exportReport">导出日报</el-link>
-        </el-form-item>
-        <!-- <el-form-item style="float:right;">
-          <el-link type="primary" :underline="false" @click="projectDialogVisible=true">项目管理</el-link>
-        </el-form-item> -->
-      </el-form>
-    </el-col>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true">
+                <el-form-item>
+                    <el-date-picker v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM" 
+                    @change="changeMonth()" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
+                </el-form-item>
+                <el-form-item style="float:right;">
+                    <el-link type="primary" :underline="false" v-if="user.role != 0" @click="exportReport">导出日报</el-link>
+                </el-form-item>
+                <el-form-item style="float:right;">
+                    <el-link type="primary" :underline="false" @click="fillInReport">填写日报</el-link>
+                </el-form-item>
+            </el-form>
+        </el-col>
 
-    <!--列表-->
-    <div>
-      <el-card class="box-card daily" shadow="never" :style="'height:'+tableHeight +'px'">
-        <div slot="header" class="clearfix">
-          <span>日期:</span>
-          <span
-            v-for="(item,index) in allDate"
-            :id="'day'+index"
-            :class="index==choseDay?'chooseDate date_item':'date_item'"
-            @click="choseDate(index)"
-            :key="index"
-          >{{item}}</span>
+        <!--列表-->
+        <div>
+            <el-card class="box-card daily" shadow="never" :style="'height:'+tableHeight +'px'">
+                <div slot="header" class="clearfix">
+                    <span>日期:</span>
+                    <span v-for="(item,index) in allDate" :id="'day'+index" :class="index==choseDay?'chooseDate date_item':'date_item'" 
+                    @click="choseDate(index)" :key="index">{{item}}</span>
+                </div>
+                <div class="allDaily">
+                    <div class="one_daily" v-for="(item1,index1) in reportList" :key="index1">
+                        <i class="fa fa-circle"></i>{{item1.name}}
+                        <span style="margin-left:30px;">
+                            <span style="margin-right:20px;">
+                                <i v-if="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5" style="color:red;margin-right:8px;" class="fa fa-exclamation-triangle"></i>
+                                总填报:
+                                <span :style="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5?'color:red':''">{{item1.reportTime}}h</span>
+                            </span>
+                            <span>系统智能统计:{{item1.calculateTime}}h</span>
+                        </span>
+                        <div class="one_daily_body">
+                            <el-timeline>
+                                <el-timeline-item v-for="(item2,index2) in item1.data" :key="index2">
+                                    <el-card shadow="never">
+                                        <p>项目:<b>{{item2.project}}</b></p>
+                                        <p>时长:{{item2.time}}h</p>
+                                        <p>事项:<span v-html="item2.content"></span></p>
+                                    </el-card>
+                                </el-timeline-item>
+                            </el-timeline>
+                        </div>
+                    </div>
+                    <!-- 简陋的无报告提示 -->
+                    <span v-if="reportList.length==0">本日暂无报告</span>
+                </div>
+            </el-card>
         </div>
-        <div class="allDaily">
-          <div class="one_daily" v-for="(item1,index1) in reportList" :key="index1">
-            <el-link>
-              <i class="fa fa-circle"></i>
-              {{item1.name}}
-            </el-link>
-            <div class="one_daily_body">
-              <el-timeline>
-                <el-timeline-item v-for="(item2,index2) in item1.data" :key="index2">
-                  <el-card shadow="never">
-                    <p>
-                      项目:
-                      <b>{{item2.project}}</b>
-                    </p>
-                    <p>时长:{{item2.time}}h</p>
-                    <p>
-                      事项:
-                      <span v-html="item2.content"></span>
-                    </p>
-                  </el-card>
-                </el-timeline-item>
-              </el-timeline>
-            </div>
-          </div>
-          <!-- 简陋的无报告提示 -->
-          <span v-if="reportList.length==0">本日暂无报告</span>
-        </div>
-      </el-card>
-    </div>
 
-    <!-- 项目管理的dialog -->
-    <el-dialog title="项目管理" :visible.sync="projectDialogVisible" width="50%">
-      <!-- 现在原生的CSS 有按钮跳动和下边距的问题 -->
-      <div>
-        <el-tag
-          :key="index"
-          v-for="(item,index) in projectList"
-          closable
-          :disable-transitions="false"
-          @close="handleClose(item)"
-        >{{item.projectName}}</el-tag>
-        <el-input
-          class="input-new-tag"
-          v-if="inputVisible"
-          v-model="inputValue"
-          ref="saveTagInput"
-          size="small"
-          @keyup.enter.native="handleInputConfirm"
-          @blur="handleInputConfirm"
-        ></el-input>
-        <el-button v-else class="button-new-tag" size="small" @click="showInput">新增项目</el-button>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="projectDialogVisible = false">关闭</el-button>
-      </span>
-    </el-dialog>
-  </section>
+        <!-- 项目管理的dialog -->
+        <el-dialog title="填写日报" :visible.sync="dialogVisible" width="60%">
+            <el-form ref="workForm" :model="workForm" :rules="workRules" label-width="100px">
+                <el-form-item label="工作日期" prop="createDate">
+                    <el-date-picker v-model="workForm.createDate" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
+                    @change="changeMonth()" :clearable="false" type="date" placeholder="选择工作日期" style="width:100%;"></el-date-picker>
+                </el-form-item>
+                <el-form-item label="待分配时长" prop="name">
+                    <span>{{report.time}}h</span>
+                    <el-link type="primary" :underline="false" @click="addDomain" style="margin-left:40px">添加项目</el-link>
+                </el-form-item>
+                <div v-for="(domain, index) in workForm.domains" :key="domain.id">
+                    <el-form-item label="投入项目" :prop="'domains.' + index + '.projectId'"
+                        :rules="{ required: true, message: '请选择投入项目', trigger: ['change','blur'] }">
+                        <el-select v-model="domain.projectId" placeholder="请选择" style="width:200px;">
+                            <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
+                        </el-select>
+                        <el-link v-if="index >= 1" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;">
+                            <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
+                        </el-link>
+                    </el-form-item>
+
+                    <el-form-item label="投入时长" :prop="'domains.' + index + '.workingTime'"
+                        :rules="{ required: true, message: '请输入投入时长', trigger: 'blur' }">
+                        <el-input v-model.number="domain.workingTime" placeholder="请输入投入时长" type='number' clearable style="width:200px;"></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="工作事项" :prop="'domains.' + index + '.content'" :rules="{ required: true, message: '请输入工作事项', trigger: 'blur' }">
+                        <el-input v-model="domain.content" type="textarea" :rows="4" placeholder="请输入投入时长" clearable></el-input>
+                    </el-form-item>
+                    <el-divider v-if="workForm.domains.length>1"></el-divider>
+                </div>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取消</el-button>
+                <el-button type="primary" @click="submitDepartment">提交</el-button>
+            </span>
+        </el-dialog>
+    </section>
 </template>
 
 <script>
-import util from "../../common/js/util";
+    import util from "../../common/js/util";
 
-export default {
-  data() {
-    return {
-      user: JSON.parse(sessionStorage.getItem("user")),
+    export default {
+        data() {
+            return {
+                user: JSON.parse(sessionStorage.getItem("user")),
 
-      allDate: [],
-      date: util.formatDate.format(new Date(new Date()), "yyyy-MM"),
-      choseDay: 0,
+                allDate: [],
+                date: util.formatDate.format(new Date(new Date()), "yyyy-MM"),
+                choseDay: 0,
 
-      tableHeight: 0,
-      listLoading: false,
+                tableHeight: 0,
+                listLoading: false,
 
-      projectList: [], //项目列表
-      reportList: [], //日报列表
-      projectDialogVisible: false, //项目弹窗
-      inputVisible: false, //项目新增输入
-      inputValue: "" //项目新增值
-    };
-  },
-  methods: {
-    changeMonth() {
-      this.getAllDate();
-      this.getReportList();
-    },
+                projectList: [], //项目列表
+                reportList: [], //日报列表
 
-    choseDate(i) {
-      this.choseDay = i;
-      this.getReportList();
-    },
+                dialogVisible: false, //项目弹窗
+                report: '',
+                workForm: {
+                    createDate: util.formatDate.format(new Date(new Date()), "yyyy-MM-dd"),
+                    domains: [{
+                        id: null,
+                        projectId: "",
+                        workingTime: "",
+                        content: ""
+                    }],
+                },
+                workRules: {
+                    createDate: [{ required: true, message: "请选择工作日期", trigger: "change" }],
+                }
+            };
+        },
+        methods: {
+            // 改变月份
+            changeMonth() {
+                this.getAllDate();
+                this.getReportList();
+            },
 
-    getAllDate() {
-      var dayArry = [];
-      var day = this.getCountDays();
-      for (var k = 1; k <= day; k++) {
-        var str =
-          new Date(this.date.replace(/-/g, "/")).getMonth() +
-          1 +
-          "月" +
-          k +
-          "日";
-        if (
-          new Date(this.date.replace(/-/g, "/")).getFullYear() ==
-            new Date(new Date()).getFullYear() &&
-          new Date(this.date.replace(/-/g, "/")).getMonth() ==
-            new Date(new Date()).getMonth()
-        ) {
-          if (new Date().getDate() == k) {
-            this.choseDay = k - 1;
-          }
-        } else {
-          this.choseDay = 0;
-        }
-        dayArry.push(str);
-      }
-      this.allDate = dayArry;
-    },
+            // 选择日期
+            choseDate(i) {
+                this.choseDay = i;
+                this.getReportList();
+            },
 
-    getCountDays() {
-      var newstr = this.date.replace(/-/g, "/");
-      var curDate = new Date(newstr);
-      var curMonth = curDate.getMonth();
-      curDate.setMonth(curMonth + 1);
-      curDate.setDate(0);
-      return curDate.getDate();
-    },
+            // 获取日期列表
+            getAllDate() {
+                var dayArry = [];
+                var day = this.getCountDays();
+                for (var k = 1; k <= day; k++) {
+                    var str = new Date(this.date.replace(/-/g, "/")).getMonth() + 1 + "月" + k + "日";
+                    if ( new Date(this.date.replace(/-/g, "/")).getFullYear() == new Date(new Date()).getFullYear() &&
+                    new Date(this.date.replace(/-/g, "/")).getMonth() == new Date(new Date()).getMonth()) {
+                        if (new Date().getDate() == k) {
+                            this.choseDay = k - 1;
+                        }
+                    } else {
+                        this.choseDay = 0;
+                    }
+                    dayArry.push(str);
+                }
+                this.allDate = dayArry;
+            },
 
-    //获取项目列表
-    getProjectList() {
-      this.listLoading = true;
-      this.http.post(
-        this.port.project.list,
-        {},
-        res => {
-          this.listLoading = false;
-          if (res.code == "ok") {
-            this.projectList = res.data;
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },
-        error => {
-          this.listLoading = false;
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    },
+            getCountDays() {
+                var newstr = this.date.replace(/-/g, "/");
+                var curDate = new Date(newstr);
+                var curMonth = curDate.getMonth();
+                curDate.setMonth(curMonth + 1);
+                curDate.setDate(0);
+                return curDate.getDate();
+            },
 
-    //删除项目
-    handleClose(item) {
-      this.$confirm("确定要删除项目" + item.projectName + "吗?", "删除项目", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          this.listLoading = true;
-          this.http.post(
-            this.port.project.delete,
-            { id: item.id },
-            res => {
-              this.listLoading = false;
-              if (res.code == "ok") {
-                this.$message({
-                  type: "success",
-                  message: "项目删除成功"
-                });
-                this.getProjectList();
-              } else {
-                this.$message({
-                  message: res.msg,
-                  type: "error"
+            //获取日报列表
+            getReportList() {
+                this.listLoading = true;
+                let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
+                this.http.post( this.port.report.list, { date: this.date + day },
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.reportList = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
                 });
-              }
             },
-            error => {
-              this.listLoading = false;
-              this.$message({
-                message: error,
-                type: "error"
-              });
-            }
-          );
-        })
-        .catch(() => {});
-    },
-
-    //显示输入
-    showInput() {
-      this.inputVisible = true;
-      this.$nextTick(_ => {
-        this.$refs.saveTagInput.$refs.input.focus();
-      });
-    },
 
-    //处理输入信息
-    handleInputConfirm() {
-      let inputValue = this.inputValue;
-      if (inputValue) {
-        this.$confirm("确定要新增项目" + inputValue + "吗?", "新增项目", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            this.listLoading = true;
-            this.http.post(
-              this.port.project.add,
-              { name: inputValue },
-              res => {
-                this.listLoading = false;
-                if (res.code == "ok") {
-                  this.$message({
-                    type: "success",
-                    message: "新增项目成功"
-                  });
-                  this.getProjectList();
+            //导出日报
+            exportReport() {
+                if (this.reportList.length > 0) {
+                    this.listLoading = true;
+                    //首先处理日期
+                    let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
+                    this.http.post( this.port.report.export, { date: this.date + day },
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            location.href = res.data;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
                 } else {
-                  this.$message({
-                    message: res.msg,
-                    type: "error"
-                  });
+                    this.$message({
+                        message: "当天没有报告 无法导出",
+                        type: "info"
+                    });
                 }
-              },
-              error => {
-                this.listLoading = false;
-                this.$message({
-                  message: error,
-                  type: "error"
+            },
+
+            //获取项目列表
+            getProjectList() {
+                this.listLoading = true;
+                this.http.post( this.port.project.list, {},
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.projectList = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
                 });
-              }
-            );
-          })
-          .catch(() => {});
-      }
-      this.inputVisible = false;
-      this.inputValue = "";
-    },
+            },
 
-    //获取日报列表
-    getReportList() {
-      this.listLoading = true;
-      //首先处理日期
-      let day =
-        this.choseDay > 9
-          ? "-" + (this.choseDay + 1)
-          : "-0" + (this.choseDay + 1);
-      this.http.post(
-        this.port.report.list,
-        {
-          date: this.date + day
-        },
-        res => {
-          this.listLoading = false;
-          if (res.code == "ok") {
-            this.reportList = res.data;
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },
-        error => {
-          this.listLoading = false;
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    },
+            // 获取个人某天的日报
+            getReport() {
+                this.http.post( this.port.report.getPort, {
+                    date: this.workForm.createDate
+                },
+                res => {
+                    if (res.code == "ok") {
+                        var list = res.data;
+                        this.report = list;
+                        if(list.report.length != 0) {
+                            var arr = [];
+                            for(var i in list.report) {
+                                arr.push({
+                                    id: list.report[i].id,
+                                    projectId: list.report[i].projectId,
+                                    workingTime: list.report[i].workingTime,
+                                    content: list.report[i].content
+                                })
+                            }
+                            this.workForm = {
+                                createDate: this.workForm.createDate,
+                                domains: arr,
+                            }
+                        } else {
+                            this.workForm = {
+                                createDate: this.workForm.createDate,
+                                domains: [{
+                                    id: null,
+                                    projectId: "",
+                                    workingTime: "",
+                                    content: ""
+                                }],
+                            }
+                        }
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
 
-    //导出日报
-    exportReport() {
-      if (this.reportList.length > 0) {
-        this.listLoading = true;
-        //首先处理日期
-        let day =
-          this.choseDay > 9
-            ? "-" + (this.choseDay + 1)
-            : "-0" + (this.choseDay + 1);
-        this.http.post(
-          this.port.report.export,
-          {
-            date: this.date + day
-          },
-          res => {
-            this.listLoading = false;
-            if (res.code == "ok") {
-              location.href = res.data;
-            } else {
-              this.$message({
-                message: res.msg,
-                type: "error"
-              });
-            }
-          },
-          error => {
-            this.listLoading = false;
-            this.$message({
-              message: error,
-              type: "error"
-            });
-          }
-        );
-      } else {
-        this.$message({
-          message: "当天没有报告 无法导出",
-          type: "info"
-        });
-      }
-    },
+            // 打开日报填写
+            fillInReport() {
+                this.getReport();
+                this.dialogVisible = true;
+            },
+
+            // 添加模块
+            addDomain() {
+                this.workForm.domains.push({
+                        projectId: "",
+                        workingTime: "",
+                        content: ""
+                });
+            },
 
-    // 获取异常列表
-    getUnusual() {
-      this.listLoading = true;
-      this.http.post(
-        this.port.project.projectList,
-        {},
-        res => {
-          this.listLoading = false;
-          if (res.code == "ok") {
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
+            // 移除模块
+            delDomain(i) {
+                this.workForm.domains.splice(i,1)
+            },
+
+            // 改变月份
+            changeMonth() {
+                this.getReport()
+            },
+
+            // 保存日报
+            submitDepartment() {
+                this.$refs.workForm.validate(valid => {
+                    if (valid) {
+                        this.listLoading = true;
+                        let formData = new FormData();
+                        for(var i in this.workForm.domains) {
+                            if (this.workForm.domains[i].id != null) {
+                                formData.append("id", this.workForm.domains[i].id);
+                            } else {
+                                formData.append("id", -1);
+                            }
+                            formData.append("projectId", this.workForm.domains[i].projectId);
+                            formData.append("workingTime", this.workForm.domains[i].workingTime);
+                            formData.append("content", this.workForm.domains[i].content);
+                            formData.append("createDate", this.workForm.createDate);
+                        }
+                        this.http.uploadFile( this.port.report.editPort, formData,
+                        res => {
+                            this.listLoading = false;
+                            if (res.code == "ok") {
+                                this.$message({
+                                    message: "填报成功",
+                                    type: "success"
+                                });
+                                this.dialogVisible = false;
+                                this.getReportList();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.listLoading = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                    }
+                });
+            },
+
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 170;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 170;
+            };
         },
-        error => {
-          this.listLoading = false;
-          this.$message({
-            message: error,
-            type: "error"
-          });
+        mounted() {
+            this.getAllDate();
+            this.getReportList();
+            this.getProjectList();
         }
-      );
-    }
-  },
-  created() {
-    let height = window.innerHeight;
-    this.tableHeight = height - 170;
-    const that = this;
-    window.onresize = function temp() {
-      that.tableHeight = window.innerHeight - 170;
     };
-  },
-  mounted() {
-    this.getAllDate();
-    this.getReportList();
-    this.getProjectList();
-  }
-};
 </script>
 
 <style lang="scss" scoped>
-.clearfix {
-  overflow-x: auto;
-  white-space: nowrap;
-  padding: 15px 0;
-  .date_item {
-    padding: 0 15px;
-    cursor: pointer;
-  }
-  .chooseDate {
-    color: #20a0ff;
-  }
-}
+    .clearfix {
+        overflow-x: auto;
+        white-space: nowrap;
+        padding: 15px 0;
+        .date_item {
+            padding: 0 15px;
+            cursor: pointer;
+        }
+        .chooseDate {
+            color: #20a0ff;
+        }
+    }
 
-.one_daily {
-  i {
-    color: #9ed0ff;
-    margin-right: 5px;
-  }
-  .one_daily_body {
-    padding: 15px 0px;
-    p {
-      margin: 0;
-      line-height: 30px;
+    .one_daily {
+        i {
+            color: #9ed0ff;
+            margin-right: 5px;
+        }
+        .one_daily_body {
+            padding: 15px 0px;
+            p {
+            margin: 0;
+            line-height: 30px;
+            }
+        }
+        ul {
+            padding: 0;
+        }
     }
-  }
-  ul {
-    padding: 0;
-  }
-}
 </style>
 <style lang="scss">
-.daily {
-  .el-card__body {
-    height: 82%;
-    overflow-y: auto;
-  }
-}
+    .daily {
+        .el-card__body {
+            height: 82%;
+            overflow-y: auto;
+        }
+    }
 </style>
 <style scoped>
 /* 项目标签的样式 */
-.el-tag + .el-tag {
-  margin-left: 10px;
-}
-.button-new-tag {
-  margin-left: 10px;
-  height: 32px;
-  line-height: 30px;
-  padding-top: 0;
-  padding-bottom: 0;
-}
-.input-new-tag {
-  width: 90px;
-  margin-left: 10px;
-  vertical-align: bottom;
-}
+    .el-tag + .el-tag {
+        margin-left: 10px;
+    }
+    .button-new-tag {
+        margin-left: 10px;
+        height: 32px;
+        line-height: 30px;
+        padding-top: 0;
+        padding-bottom: 0;
+    }
+    .input-new-tag {
+        width: 90px;
+        margin-left: 10px;
+        vertical-align: bottom;
+    }
 </style>