Reiskuchen 5 years ago
parent
commit
a23b0703a9

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java

@@ -1,5 +1,6 @@
 package com.management.platform.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import java.time.LocalDate;
@@ -59,7 +60,7 @@ public class Report extends Model<Report> {
     /**
      * 报告内容
      */
-    @TableField("content")
+    @TableField(value = "content", updateStrategy = FieldStrategy.IGNORED)
     private String content;
 
     /**

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ReportMapper.java

@@ -17,6 +17,6 @@ import java.util.Map;
  * @since 2019-12-31
  */
 public interface ReportMapper extends BaseMapper<Report> {
-    List<Map<String, Object>> getReportByDate(@Param("date")String date, @Param("id")Integer id);
+    List<Map<String, Object>> getReportByDate(@Param("date")String date, @Param("id")String id);
     List<Map<String, Object>> getReportNameByDate(@Param("date")String date);
 }

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

@@ -39,7 +39,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         List<Map<String, Object>> nameList = reportMapper.getReportNameByDate(date);
         for (Map<String, Object> map : nameList) {
-            map.put("data", reportMapper.getReportByDate(date, (Integer) map.get("id")));
+            map.put("data", reportMapper.getReportByDate(date, (String) map.get("id")));
         }
         httpRespMsg.data = nameList;
         return httpRespMsg;

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ScreenshotServiceImpl.java

@@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import javax.annotation.Resources;
+import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.List;
@@ -54,7 +55,12 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
     @Override
     public HttpRespMsg getLatestScreenshotList() {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
-        httpRespMsg.data = screenshotMapper.getLatestScreenshotList();
+        List<Map<String, Object>> resultMap = screenshotMapper.getLatestScreenshotList();
+        for(Map<String, Object> map : resultMap){
+            map.put("time", new SimpleDateFormat("HH:mm:ss").format(map.get("indate")));
+            map.remove("indate");
+        }
+        httpRespMsg.data = resultMap;
         return httpRespMsg;
     }
 

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ScreenshotMapper.xml

@@ -22,7 +22,7 @@
 
     <!--获取每个人最新的桌面截图-->
     <select id="getLatestScreenshotList" resultType="java.util.Map">
-        SELECT c.name, a.pic_url, a.indate
+        SELECT c.name, a.pic_url, a.indate, a.pic_type
         FROM screenshot AS a
         JOIN(
         SELECT uid, MAX(indate) AS max_indate

+ 9 - 107
fhKeeper/formulahousekeeper/timesheet/src/port.js

@@ -2,117 +2,19 @@ export default {
     manage: {
         login: '/user/loginAdmin', // 登录
     },
-    //消息提示相关
-    notice: {
-        list: '/vnoticeuser/list',  // 消息列表
-        read: '/vnoticeuser/read'  // 消息读取
-    },
-    pwd: {
-        resetPwd: '/user/updatePassword' // 重置密码
-    },
-    map: { 
-        mapList: '/company/getCoutomCompanyAndMouldsByUser', // 生产方公司和公司下所属的模具
-        newMap: '/mould/listMap' // 获取地图
-    },
-    project: {
-        addUser: '/user/add',  // 添加或修改用户
-        userList: '/user/list',  // 用户列表
-        delUser: '/user/delete',  // 删除用户
-
-        addProject: '/project/add', // 添加或修改项目
-        projectList: '/project/list', // 项目列表
-        projectDetail: '/project/detail', // 项目详情
-        projects: '/project/projectList', // 筛选模具列表时作为筛选条件所加载的项目列表
-        projectByUser: '/project/getProjectListByUserAndCompany',// 获取创建人员分配项目时根据当前人和公司获取项目列表
-
-        uploadFile: '/projectfile/uploadFile', //项目文档的上传
-        dowloadFile: '/projectfile/dowloadFile', //项目文档的下载
-        fileList: '/projectfile/list', //项目文档列表
-        delFile: '/projectfile/delFile', //项目文档的删除
-        operList: '/projectoperationdynamics/list', //项目操作记录列表
 
-        getUserList: '/user/getUserList', //获取用户列表
-        getUserById: '/user/getUserListByCompanyIds', // 给项目分配参与人的时候根据公司id获取公司下的人员
-
-        inviteUser: '/invitationrecord/inviteUser', //添加邀请记录并产生链接
-
-        powerList: '/power/list', // 权限列表
-        powerUpdate: '/power/update', //修改权限
+    //桌面
+    desktop: {
+        list: '/screenshot/getLatestScreenshotList', //获取当前每个人最新的桌面截图
     },
-    //模具
-    mold: {
-        addMold: '/mould/addOrUpdate', //添加/修改模具设备
-        molds: '/mould/list', //模具列表
-        modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
-        delMold: '/mould/delMould', //删除模具
-
-        moldDetail: '/mould/detail', //模具详情
-        moldFileList: '/mouldfile/list', //获取模具文档
-        moldFileListAll: '/mouldfile/allList', //获取全部模具文档
-        moldFileUpload: '/mouldfile/uploadFile', //上传模具文档
-        moldFileDowload: '/mouldfile/dowloadFile', //模具文档的下载
-        moldFileDowloadList: '/mouldfile/fileList', //获取模具文档下载列表
-
-        moldFileDowloadFile: '/mouldfile/downloadfileList', //批量下载
-        moldFileCheck: '/mouldfile/check', //审批模具文档 
-        exportOperationExcel: '/mouldfile/downloadFileListExcel', //下载操作记录
-
-        chooseModelList: '/mould/chooseModelList', //编辑项目时显示的模具列表
-
-        moldFileDelete: '/mouldfile/delFile', //项目文档的删除
-        moldOperationList: '/mouldoperationdynamics/list', //项目操作记录列表
 
-        partList: '/part/list', //零件列表
-        addPart: '/part/addOrUpdate', //单个零件添加
-        importPart: '/part/importAppLogin',//零件的excel导入
-        partUpload: '/mouldfile/uploadPartFileList', //零件文档的批量上传
-
-        download: '/mouldfile/download',
-
-        moldMaintain: '/mouldmaintain/maintain', //维护
-        moldMaintainList: '/mouldmaintain/list', //获取列表
-        moldMaintainListGet: '/mould/maintainMouldList', //主页获取保养模具列表
-        moldDiscardListGet: '/mould/scrapMouldList', //主页获取报废模具列表
-        moldChange: '/mould/changeMouldEquipment', //处理告警
-        moldChangeRequirement: '/mouldequipment/getEquipmentListByOldMouldAndUser' //处理告警所需的设备
+    //项目
+    project: {
+        list: '/project/getProjectList', //获取项目列表
     },
-    //基础管理
-    base: {
-        addCompany: '/company/add', // 添加资产方
-        companyList: '/company/list', // 资产方列表
-        delCompany: '/company/delete', // 删除资产方
-
-        getCompanyList: '/company/getCompanyList', // 管理员创建人员时显示公司
-        
-        getCompanys: '/company/getCompanys', // 云模盒所属公司
-
-        addCompanyListToProject: '/company/addCompanyListToProject', // 编辑项目时获取生产方公司
-
-        relationList: '/company/relationList', // 获取关联公司列表
 
-        //ownerComps: '/company/ownerRelateCompany', // 返回当前公司的关联公司列表
-
-        getProduceCompany: '/company/getProduceCompany', // 根据项目id获取生产方列表
-        
-        getInfo: '/company/getProduceCompanyByCurrentUser', // 根据当前人登录人所能看到的公司进行筛选
-
-        addFactory: '/factory/add',  // 添加生产方
-        factoryList: '/factory/list',   // 生产方列表
-        delFactory: '/factory/delete',  // 删除生产方
-
-        editMould: '/mouldequipment/addOrUpdate', // 添加 / 修改云模盒
-        mouldeList: '/mouldequipment/getEquipmentList', // 云模盒列表
-        enableMould: '/mouldequipment/use', // 启用云模盒
-
-        moulds: '/mouldequipment/getMouldEquipmentList', // 创建模具时获取资产方的云模盒列表
-        importMouldEquipmentExcel: '/mouldequipment/importMouldEquipmentExcel', //批量导入云模盒
-        
-        setPacket: '/mouldequipment/use',// 云平台下行配置数据包接口
-        openingAndClosingTimesChart: '/mouldhistory/openingAndClosingTimesChart', //获取云模盒的每日开合次数图表 (时间/次数)
-        openingAndClosingTimesChartCycle: '/mouldhistory/openingAndClosingTimesChartCycle', //获取云模盒的每日开合次数周期 (时间/次数)
-
-    },
-    file: {
-        view: '/pdffile/getPdfFile' // 文件预览
+    //日报
+    report: {
+        list: '/report/getReportList',  // 获取报告列表
     }
 }

+ 36 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/desktop/index.vue

@@ -10,19 +10,26 @@
 
         <!-- 卡片列表 -->
         <div>
-            <el-col :span="6" v-for="(item, index) in 12" :key="item" class="one_div">
+            <el-col :span="6" v-for="(item, index) in desktopList" :key="index" class="one_div">
                 <el-card :body-style="{ padding: '0px' }" shadow="hover" class="one_card">
                     <div class="one_card_img">
-                        <el-image :src="index==0?require('../../assets/image/047_S.jpg'):require('../../assets/image/noPic.png')" class="image" lazy></el-image>
+                        <el-image :src="this.pic_url" class="image" lazy>
+                            <div slot="error" class="image-slot">
+                                <el-image :src="require('../../assets/image/noPic.png')" class="image" lazy></el-image>
+                            </div>
+                        </el-image>
                         <div :id="'over'+index" class="over">
                             <el-button type="primary" plain @click.native="jumpTo(item)"><i class="fa fa-link"></i> 所有截图</el-button>
                         </div>
                     </div>
                     <div class="one_card_txt">
-                        <span>在玩游戏呢!!!!!</span>
+                        <!-- pic_type 这里需要一个巨长的三目运算符 -->
+                        <!-- 0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐 -->
+                        <!-- 现在基本都是null -->
+                        <span>{{item.pic_type}}</span>
                         <div class="bottom clearfix">
-                            <el-link><i class="fa fa-circle"></i> 吴涛涛</el-link>
-                            <time class="time">9点59分59秒</time>
+                            <el-link><i class="fa fa-circle"></i> {{item.name}}</el-link>
+                            <time class="time">{{item.time}}</time>
                         </div>
                     </div>
                 </el-card>
@@ -42,6 +49,7 @@
                 user: JSON.parse(sessionStorage.getItem('user')),
                 timer: "",
                 currentTime: util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd hh:mm:ss'),
+                desktopList: [],
 			}
 		},
 		methods: {
@@ -51,6 +59,27 @@
                     _this.currentTime = util.formatDate.format(new Date(new Date()), 'yyyy-MM-dd hh:mm:ss');
                 }, 1000);
             },
+            //获取项目列表
+			      getDesktopList() {
+				        this.listLoading = true;
+				        this.http.post(this.port.desktop.list, {}, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.desktopList = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            },
             jumpTo(id) {
                 this.$router.push('/desktop/' + id);
             }
@@ -58,7 +87,8 @@
         created() {
             this.getTime();
         },
-		mounted() {
+		    mounted() {
+            this.getDesktopList();
         },
         beforeDestroy() {
             if (this.timer) {

+ 44 - 104
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -20,73 +20,18 @@
             <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)">{{item}}</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">
-                        <el-link><i class="fa fa-circle"></i> 吴涛涛</el-link>
+                    <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>
+                                <el-timeline-item v-for="(item2,index2) in item1.data" :key="index2">
                                     <el-card shadow="never">
-                                        <p>项目:<b>工时管家开发项目</b></p>
-                                        <p>时长:1.5h</p>
-                                        <p>事项:1.重新设计工作日报模块<br>
-
-                                            2.绘制原型图<br>
-
-                                            3.敲代码<br>
-                                        </p>
-                                    </el-card>
-                                </el-timeline-item>
-                            </el-timeline>
-                        </div>
-                    </div>
-                    <div class="one_daily">
-                        <el-link><i class="fa fa-circle"></i> 吴涛涛</el-link>
-                        <div class="one_daily_body">
-                            <el-timeline>
-                                <el-timeline-item>
-                                    <el-card shadow="never">
-                                        <p>项目:<b>工时管家开发项目</b></p>
-                                        <p>时长:1.5h</p>
-                                        <p>事项:1.重新设计工作日报模块<br>
-
-                                            2.绘制原型图<br>
-
-                                            3.敲代码<br>
-                                        </p>
-                                    </el-card>
-                                </el-timeline-item>
-                            </el-timeline>
-                        </div>
-                    </div>
-                    <div class="one_daily">
-                        <el-link><i class="fa fa-circle"></i> 吴涛涛</el-link>
-                        <div class="one_daily_body">
-                            <el-timeline>
-                                <el-timeline-item>
-                                    <el-card shadow="never">
-                                        <p>项目:<b>工时管家开发项目</b></p>
-                                        <p>时长:1.5h</p>
-                                        <p>事项:1.重新设计工作日报模块<br>
-
-                                            2.绘制原型图<br>
-
-                                            3.敲代码<br>
-                                        </p>
-                                    </el-card>
-                                </el-timeline-item>
-                                <el-timeline-item>
-                                    <el-card shadow="never">
-                                        <p>项目:<b>工时管家开发项目</b></p>
-                                        <p>时长:1.5h</p>
-                                        <p>事项:1.重新设计工作日报模块<br>
-
-                                            2.绘制原型图<br>
-
-                                            3.敲代码<br>
-                                        </p>
+                                        <p>项目:<b>{{item2.project}}</b></p>
+                                        <p>时长:{{item2.time}}h</p>
+                                        <p>事项:{{item2.content}}</p>
                                     </el-card>
                                 </el-timeline-item>
                             </el-timeline>
@@ -115,7 +60,8 @@
 				total: 0,
                 page: 1,
                 size: 20,
-                list: [],
+                projectList: [], //项目列表
+                reportList: [], //日报列表
                 
                 addFormVisible: false,
 				addLoading: false,
@@ -124,11 +70,12 @@
 		methods: {
             changeMonth() {
                 this.getAllDate();
-                this.getList();
+                this.getReportList();
             },
 
             choseDate(i) {
                 this.choseDay = i;
+                this.getReportList();
             },
 
             getAllDate() {
@@ -161,38 +108,47 @@
 			//分页
 			handleCurrentChange(val) {
 				this.page = val;
-				this.getList();
+				this.getReportList();
             },
 
             handleSizeChange(val) {
                 this.size = val;
-				this.getList();
+				this.getReportList();
             },
             
 			//获取项目列表
-			getList() {
+			getProjectList() {
 				this.listLoading = true;
-				this.http.post(this.port.project.projectList, {
-                    keyName: '',
-                    pageNum: this.page,
-                    pageSize: this.size,
-                }, res => {
+				this.http.post(this.port.project.list, {}, res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
-                        var list = res.data.list;
-                        for(var i in list){
-                            var customCompaniesStr = "";
-                            for(var j in list[i].customCompanies){
-                                if(j == list[i].customCompanies.length -1){
-                                    customCompaniesStr += list[i].customCompanies[j].companyName;
-                                } else {
-                                    customCompaniesStr += list[i].customCompanies[j].companyName + "、";
-                                }
-                            }
-                            list[i].customCompaniesStr = customCompaniesStr;
-                        }
-                        this.list = list;
-                        this.total = res.data.total;
+                        this.projectList = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        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,
@@ -218,26 +174,9 @@
             getUnusual() {
                 this.listLoading = true;
 				this.http.post(this.port.project.projectList, {
-                    keyName: '',
-                    pageNum: this.page,
-                    pageSize: this.size,
                 }, res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
-                        var list = res.data.list;
-                        for(var i in list){
-                            var customCompaniesStr = "";
-                            for(var j in list[i].customCompanies){
-                                if(j == list[i].customCompanies.length -1){
-                                    customCompaniesStr += list[i].customCompanies[j].companyName;
-                                } else {
-                                    customCompaniesStr += list[i].customCompanies[j].companyName + "、";
-                                }
-                            }
-                            list[i].customCompaniesStr = customCompaniesStr;
-                        }
-                        this.list = list;
-                        this.total = res.data.total;
                     } else {
                         this.$message({
                             message: res.msg,
@@ -264,7 +203,8 @@
         },
 		mounted() {
             this.getAllDate();
-            this.getList();
+            this.getReportList();
+            this.getProjectList();
 		}
 	}