From d641a73d5e75b8e6459cc05d02d36476913d3d7b Mon Sep 17 00:00:00 2001 From: lijun Date: Sat, 7 Dec 2024 12:49:34 +0800 Subject: [PATCH] update code --- .../public/css/largeScreenStyle.css | 63 ++- .../public/css/largeScreenStyle.less | 71 +++- yanzhu-bigscreen/src/api-old/dict/index.js | 4 +- yanzhu-bigscreen/src/api-old/gzaiBox/dict.js | 4 +- yanzhu-bigscreen/src/api/detail.js | 39 ++ yanzhu-bigscreen/src/api/dict.js | 31 ++ yanzhu-bigscreen/src/api/index.js | 6 +- .../src/components/DictTag/index.vue | 81 ++++ yanzhu-bigscreen/src/components/header.vue | 11 +- yanzhu-bigscreen/src/pages-old/init.js | 2 +- .../src/pages-old/progress/indexDlg3.vue | 4 +- .../src/views/detail/attendanceInfoDlg.vue | 378 ++++++++++++++++++ yanzhu-bigscreen/src/views/init.js | 4 +- yanzhu-bigscreen/src/views/projectDetail.vue | 72 +++- .../ProProjectInfoSubdeptsUsersMapper.java | 8 + .../ProProjectInfoSubdeptsUsersMapper.xml | 57 +++ ...ProProjectInfoSubdeptsUsersController.java | 19 + .../IProProjectInfoSubdeptsUsersService.java | 9 +- ...roProjectInfoSubdeptsUsersServiceImpl.java | 15 + 19 files changed, 803 insertions(+), 75 deletions(-) create mode 100644 yanzhu-bigscreen/src/api/detail.js create mode 100644 yanzhu-bigscreen/src/api/dict.js create mode 100644 yanzhu-bigscreen/src/components/DictTag/index.vue create mode 100644 yanzhu-bigscreen/src/views/detail/attendanceInfoDlg.vue diff --git a/yanzhu-bigscreen/public/css/largeScreenStyle.css b/yanzhu-bigscreen/public/css/largeScreenStyle.css index fc93caf8..0edcb828 100644 --- a/yanzhu-bigscreen/public/css/largeScreenStyle.css +++ b/yanzhu-bigscreen/public/css/largeScreenStyle.css @@ -270,6 +270,49 @@ table { padding-top: 32px; display: flex; } +.head-title-tab .head-nav { + text-align: center; + color: #6383aa; + cursor: pointer; + background: url("../images/title_tab.png") no-repeat center / 100% 100%; +} +.head-title-tab .head-nav.active { + background: url("../images/title_tab_active.png") no-repeat center / 100% 100%; + color: #ffffff; +} +.head-title-tab .head-nav.active.hover { + color: #ffffff; +} +.head-title-tab .head-nav.hove { + color: #86b2e3; +} +@media (max-width: 1920px) { + .head-title-tab .head-nav { + font-size: 14px; + padding: 0px 20px; + height: 35px; + line-height: 35px; + } +} +@media (min-width: 1921px) and (max-width: 2560px) { + .head-title-tab .head-nav { + font-size: 20px; + padding: 0px 30px; + height: 44px; + line-height: 44px; + } +} +@media (min-width: 2561px) { + .head-title-tab { + padding-top: 20px; + } + .head-title-tab .head-nav { + font-size: 28px; + padding: 0px 50px; + height: 60px; + line-height: 60px; + } +} .head-title-select { padding-top: 23px; width: 12% ; @@ -281,26 +324,6 @@ table { display: flex; align-items: center; } -.head-nav { - width: 105px; - height: 35px; - padding: 0px 8px; - line-height: 35px; - text-align: center; - color: #6383aa; - cursor: pointer; - background: url("../images/title_tab.png") no-repeat center / 100% 100%; -} -.head-nav.active { - background: url("../images/title_tab_active.png") no-repeat center / 100% 100%; - color: #ffffff; -} -.head-nav:hover { - color: #86b2e3; -} -.head-nav.active:hover { - color: #ffffff; -} .head-select { height: 35px; padding-left: 25px; diff --git a/yanzhu-bigscreen/public/css/largeScreenStyle.less b/yanzhu-bigscreen/public/css/largeScreenStyle.less index 9957bcdf..bb64767f 100644 --- a/yanzhu-bigscreen/public/css/largeScreenStyle.less +++ b/yanzhu-bigscreen/public/css/largeScreenStyle.less @@ -284,6 +284,55 @@ table{ .head-title-tab{ padding-top: 32px; display: flex; + .head-nav{ + + + text-align: center; + color: #6383aa; + cursor: pointer; + background: url("../images/title_tab.png") no-repeat center/100% 100%; + &.active{ + background: url("../images/title_tab_active.png") no-repeat center/100% 100%; + color: #ffffff; + &.hover{ + color: #ffffff; + } + } + &.hove{ + color: #86b2e3; + } + } +} +@media (max-width: 1920px) { + .head-title-tab{ + .head-nav{ + font-size:14px; + padding:0px 20px; + height: 35px; + line-height: 35px; + } + } +} +@media (min-width: 1921px) and (max-width: 2560px) { + .head-title-tab{ + .head-nav{ + font-size:20px; + padding:0px 30px; + height: 44px; + line-height: 44px; + } + } +} +@media (min-width: 2561px) { + .head-title-tab{ + padding-top: 20px; + .head-nav{ + font-size:28px; + padding:0px 50px; + height: 60px; + line-height: 60px; + } + } } .head-title-select{ @@ -297,26 +346,8 @@ table{ display: flex; align-items: center; } -.head-nav{ - width: 105px; - height: 35px; - padding:0px 8px; - line-height: 35px; - text-align: center; - color: #6383aa; - cursor: pointer; - background: url("../images/title_tab.png") no-repeat center/100% 100%; -} -.head-nav.active{ - background: url("../images/title_tab_active.png") no-repeat center/100% 100%; - color: #ffffff; -} -.head-nav:hover{ - color: #86b2e3; -} -.head-nav.active:hover{ - color: #ffffff; -} + + .head-select{ height: 35px; padding-left: 25px; diff --git a/yanzhu-bigscreen/src/api-old/dict/index.js b/yanzhu-bigscreen/src/api-old/dict/index.js index 8fe09a88..96180b13 100644 --- a/yanzhu-bigscreen/src/api-old/dict/index.js +++ b/yanzhu-bigscreen/src/api-old/dict/index.js @@ -2,7 +2,7 @@ import request from '@/utils/request' const getDict=(dictName)=> { let key='dict_'+dictName; - let obj=window.jhcaches[key]; + let obj=window.xdcaches[key]; if(obj && obj.length>0){ return new Promise((resolve)=>{ resolve(obj); @@ -15,7 +15,7 @@ const getDict=(dictName)=> { }); let obj=data.data||[]; if(obj && obj.length>0){ - window.jhcaches[key]=obj; + window.xdcaches[key]=obj; } resolve(obj); }); diff --git a/yanzhu-bigscreen/src/api-old/gzaiBox/dict.js b/yanzhu-bigscreen/src/api-old/gzaiBox/dict.js index 3709f22a..4ab4e569 100644 --- a/yanzhu-bigscreen/src/api-old/gzaiBox/dict.js +++ b/yanzhu-bigscreen/src/api-old/gzaiBox/dict.js @@ -2,7 +2,7 @@ import request from '@/utils/requestOthers' const getDict = (dictName) => { let key = 'dict_' + dictName; - let obj = window.jhcaches[key]; + let obj = window.xdcaches[key]; if (obj && obj.length > 0) { return new Promise((resolve) => { resolve(obj); @@ -15,7 +15,7 @@ const getDict = (dictName) => { }); let obj = data.data || []; if (obj && obj.length > 0) { - window.jhcaches[key] = obj; + window.xdcaches[key] = obj; } resolve(obj); }); diff --git a/yanzhu-bigscreen/src/api/detail.js b/yanzhu-bigscreen/src/api/detail.js new file mode 100644 index 00000000..03ef4224 --- /dev/null +++ b/yanzhu-bigscreen/src/api/detail.js @@ -0,0 +1,39 @@ +import request from "@/utils/request"; + +const groupByCraftType = (data) => { + return request({ + url: "/manage/proProjectInfoSubdeptsUsers/groupByCraftType", + method: "get", + params:data + }); + }; + + const groupByCraftTypeByAttendance = (data) => { + return request({ + url: "/manage/proProjectInfoSubdeptsUsers/groupByCraftTypeByAttendance", + method: "get", + params:data + }); + }; + + const subdeptsUsersList=(data)=>{ + return request({ + url: "/manage/proProjectInfoSubdeptsUsers/list", + method: "get", + params:data + }); + } + + const attendanceUbiDataList=(data)=>{ + return request({ + url: "/manage/attendanceUbiData/list", + method: "get", + params:data + }); + } +export default{ + groupByCraftType, + groupByCraftTypeByAttendance, + subdeptsUsersList, + attendanceUbiDataList +} \ No newline at end of file diff --git a/yanzhu-bigscreen/src/api/dict.js b/yanzhu-bigscreen/src/api/dict.js new file mode 100644 index 00000000..c9eb93a0 --- /dev/null +++ b/yanzhu-bigscreen/src/api/dict.js @@ -0,0 +1,31 @@ +import request from '@/utils/request' + +const getDict=(dictName)=> { + let key='dict_'+dictName; + let obj=window.xdcaches[key]; + if(obj && obj.length>0){ + return new Promise((resolve)=>{ + resolve(obj); + }) + }else{ + return new Promise(async (resolve)=>{ + let data=await request({ + url: `system/dict/data/type/${dictName}`, + method: 'get' + }); + let obj=(data.data||[]).map(p=>{ + return { + label:p.dictLabel, + value:p.dictValue, + raw:p + } + }); + if(obj && obj.length>0){ + window.xdcaches[key]=obj; + } + resolve(obj); + }); + } +} + +export default getDict; diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js index f9074947..5ac86311 100644 --- a/yanzhu-bigscreen/src/api/index.js +++ b/yanzhu-bigscreen/src/api/index.js @@ -2,9 +2,13 @@ import {axios,download} from '@/utils/request' import project from './project' import weather from './weather' +import detail from './detail' +import dict from './dict' export default { http:axios, downFile:download, project, - weather + weather, + detail, + dict } \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/DictTag/index.vue b/yanzhu-bigscreen/src/components/DictTag/index.vue new file mode 100644 index 00000000..5e11c968 --- /dev/null +++ b/yanzhu-bigscreen/src/components/DictTag/index.vue @@ -0,0 +1,81 @@ + + + + diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index d0b87a55..9fa8ff70 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -144,16 +144,7 @@ export default { } @media (min-width: 2561px) { - .div-header { - .head-nav { - font-size: 30px; - width: auto; - height: auto; - padding: 10px 30px; - position: relative; - top: -8px; - } - } + .header-center { font-size: 52px !important; diff --git a/yanzhu-bigscreen/src/pages-old/init.js b/yanzhu-bigscreen/src/pages-old/init.js index 0be2a101..103914d3 100644 --- a/yanzhu-bigscreen/src/pages-old/init.js +++ b/yanzhu-bigscreen/src/pages-old/init.js @@ -59,7 +59,7 @@ window.fullscreenInterval=setInterval(()=>{ } } },500); -window.jhcaches={}; +window.xdcaches={}; /* Api.project.getInfo().then(d=>{ if(d.code==200){ diff --git a/yanzhu-bigscreen/src/pages-old/progress/indexDlg3.vue b/yanzhu-bigscreen/src/pages-old/progress/indexDlg3.vue index 9d7d3732..16c8e306 100644 --- a/yanzhu-bigscreen/src/pages-old/progress/indexDlg3.vue +++ b/yanzhu-bigscreen/src/pages-old/progress/indexDlg3.vue @@ -212,14 +212,14 @@ export default { }, mounted() { - // let objs = window.jhcaches?.progressProjects + // let objs = window.xdcaches?.progressProjects // if (objs && objs.length > 0) { // this.prjs = objs; // return; // } // this.$api.project.getProgressProjects().then(d => { // this.prjs = d.data || []; - // window.jhcaches.progressProjects = this.prjs; + // window.xdcaches.progressProjects = this.prjs; // }); this.$bus.$on('fullscreen',b=>{ setTimeout(()=>{ diff --git a/yanzhu-bigscreen/src/views/detail/attendanceInfoDlg.vue b/yanzhu-bigscreen/src/views/detail/attendanceInfoDlg.vue new file mode 100644 index 00000000..d1e07cc8 --- /dev/null +++ b/yanzhu-bigscreen/src/views/detail/attendanceInfoDlg.vue @@ -0,0 +1,378 @@ + + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/views/init.js b/yanzhu-bigscreen/src/views/init.js index b32cf3e2..2ca4dbd7 100644 --- a/yanzhu-bigscreen/src/views/init.js +++ b/yanzhu-bigscreen/src/views/init.js @@ -13,6 +13,7 @@ import moduleOne21 from '../components/module/module-one-2-1.vue' import moduleOne22 from '../components/module/module-one-2-2.vue' import moduleOne23 from '../components/module/module-one-2-3.vue' import peopleNumber from '@/components/people-number.vue' +import dictTag from '@/components/DictTag/index.vue' import MyDialog from '@/components/MyDialog.vue' //import projectOverviewChart from '../components/project-overview-chart.vue' //import peopleNumber from '../components/people-number.vue' @@ -29,6 +30,7 @@ Vue.component("module-one-2-1",moduleOne21) Vue.component("module-one-2-2",moduleOne22) Vue.component("module-one-2-3",moduleOne23) Vue.component("people-number",peopleNumber) +Vue.component("dict-tag",dictTag) Vue.component("MyDialog",MyDialog) Vue.prototype.$bus=new Vue(); //Vue.component("people-number",peopleNumber) @@ -81,4 +83,4 @@ window.fullscreenInterval=setInterval(()=>{ } } },500); -window.jhcaches={}; +window.xdcaches={}; diff --git a/yanzhu-bigscreen/src/views/projectDetail.vue b/yanzhu-bigscreen/src/views/projectDetail.vue index 45a4fd1e..fcfee7b6 100644 --- a/yanzhu-bigscreen/src/views/projectDetail.vue +++ b/yanzhu-bigscreen/src/views/projectDetail.vue @@ -118,18 +118,17 @@ +
-
- 在岗人数 +
+ 在岗人员
-
+
今日出勤
-
@@ -142,7 +141,7 @@
{{ attendanceTotal }}
-

{{ attendanceNav == 0 ? '在岗人数' : '今日出勤' }}

+

{{ attendanceNav == 0 ? '在岗人员' : '今日出勤' }}

@@ -494,6 +493,7 @@ +
@@ -501,13 +501,15 @@ import projectInfoDialog from './detail/projectInfoDialog.vue'; import staffSurveyChart from '@/components/staffSurveyChart.vue'; import MonitAndWarning from './components/MonitAndWarning.vue'; +import attendanceInfoDlg from './detail/attendanceInfoDlg.vue'; import testData from './test/detail' import debounce from 'lodash.debounce' export default { components: { projectInfoDialog, staffSurveyChart, - MonitAndWarning + MonitAndWarning, + attendanceInfoDlg, }, data() { return { @@ -525,9 +527,9 @@ export default { attendanceNav: 0, attendanceTotal: 0, attendanceData: [ - { text: "普通工种", value: 10 }, - { text: "特殊工种", value: 20 }, - { text: "管理人员", value: 30 }, + { text: "普通工种", value: 0, id: 0, }, + { text: "特殊工种", value: 0, id: 0, }, + { text: "管理人员", value: 0, id: 0, }, ], deviceNav: 0, deviceData: [ @@ -619,6 +621,33 @@ export default { this.getWeatherNowInfo(); } }); + this.loadAttendanceData(); + }, + loadAttendanceData() { + let ajax = this.$api.detail.groupByCraftType; + let posData = { + comId: this.prjInfo.comId, + projectId: this.prjInfo.id + } + if (this.attendanceNav == 1) { + ajax = this.$api.detail.groupByCraftTypeByAttendance; + //posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD"); + posData.createTime ='2024-10-13'; + } + ajax(posData).then(d => { + this.attendanceData = (d.data || []).map(it => { + return { + text: it.createBy, + value: it.id || 0, + id: it.craftType + } + }); + let count = 0; + this.attendanceData.forEach(it => { + count += it.value; + }); + this.attendanceTotal = count; + }); }, getWeatherNowInfo() { this.$api.weather.getCityNowInfo(this.cityId).then(cn => { @@ -628,9 +657,15 @@ export default { }, doAttendanceNav(n) { this.attendanceNav = n; + this.loadAttendanceData(); }, doShowAttendanceDetail() { - + this.$refs.attDlg.showDialog({ + prjInfo: this.prjInfo, + attendanceData: this.attendanceData, + type: this.attendanceNav + } + ); }, doDeviceNav(n) { this.deviceNav = n; @@ -938,7 +973,12 @@ export default { } } } + .attendance-info-title { + * { + font-size: 24px; + } + } .attendance-tag { * { font-size: 24px; @@ -1430,13 +1470,15 @@ export default { .dangerous-timeline-max { width: 1790px; height: 570px; - .strip-max{ - top:136px; + + .strip-max { + top: 136px; } + .dangerous-timeline-con { width: 500px; font-size: 42px; - + } .dangerous-text { diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java index fa65c709..52cae656 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java @@ -66,4 +66,12 @@ public interface ProProjectInfoSubdeptsUsersMapper * @return 结果 */ public int findUserByUserPhone(String phonenumber); + /** + * 大屏-项目详情-在岗人员统计 + */ + List groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers); + /** + * 大屏-项目详情-今日出勤期统计 + */ + List groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where); } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml index 451add76..5c1164c1 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml @@ -218,4 +218,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(1) from sys_user where phonenumber=#{phonenumber} + + + + \ No newline at end of file diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java index 39ccdb65..4614b3f8 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java @@ -49,6 +49,25 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController return getDataTable(list); } + /** + * 大屏-项目详情-在岗人员统计 + */ + @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list") + @GetMapping("/groupByCraftType") + public AjaxResult groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers){ + List list = proProjectInfoSubdeptsUsersService.groupByCraftType(proProjectInfoSubdeptsUsers); + return AjaxResult.success(list); + } + + /** + * 大屏-项目详情-今日出勤期统计 + */ + @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list") + @GetMapping("/groupByCraftTypeByAttendance") + public AjaxResult groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where){ + List list = proProjectInfoSubdeptsUsersService.groupByCraftTypeByAttendance(where); + return AjaxResult.success(list); + } /** * 导出分包单位工人列表 */ diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java index 6a786c98..7056099c 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java @@ -59,5 +59,12 @@ public interface IProProjectInfoSubdeptsUsersService */ public int deleteProProjectInfoSubdeptsUsersById(Long id); - + /** + * 大屏-项目详情-在岗人员统计 + */ + List groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers); + /** + * 大屏-项目详情-今日出勤期统计 + */ + List groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index 18c391bb..574317f3 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -65,6 +65,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu @Override public int insertProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) { + proProjectInfoSubdeptsUsers.setUseStatus("0"); proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate()); proProjectInfoSubdeptsUsers.setCreateBy(SecurityContextHolder.getUserName()); SysUser user=proProjectInfoSubdeptsUsers.getUser(); @@ -131,4 +132,18 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu uniService.syncUserRevoke(id); return proProjectInfoSubdeptsUsersMapper.deleteProProjectInfoSubdeptsUsersById(id); } + /** + * 大屏-项目详情-在岗人员统计 + */ + @Override + public List groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) { + return proProjectInfoSubdeptsUsersMapper.groupByCraftType(proProjectInfoSubdeptsUsers); + } + /** + * 大屏-项目详情-今日出勤期统计 + */ + @Override + public List groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where) { + return proProjectInfoSubdeptsUsersMapper.groupByCraftTypeByAttendance(where); + } }