diff --git a/public/favicon.ico b/public/favicon.ico index af9875b..0908b50 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html index 75a709c..f9723c0 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - + 产发工程数字管理平台-大屏 diff --git a/src/api/costOut/index.js b/src/api/costOut/index.js index c482481..bd7b93a 100644 --- a/src/api/costOut/index.js +++ b/src/api/costOut/index.js @@ -7,7 +7,7 @@ const selectYearAndMonth=(data)=> { url: `/bgscreen/costOut/selectYearAndMonth`, method: 'post', data:data - }).then(d=>{ + }).then(d=>{ const getValue=(tmps,type)=>{ let objs=tmps.filter(d=>d.costType==type); return objs.length>0?objs[0]:{}; diff --git a/src/pages/components/AttendanceDetailDialog.vue b/src/pages/components/AttendanceDetailDialog.vue index 361d6a1..277f425 100644 --- a/src/pages/components/AttendanceDetailDialog.vue +++ b/src/pages/components/AttendanceDetailDialog.vue @@ -2,38 +2,43 @@
-
总包人员
-
监理人员
-
劳务人员
+
总包人员
+
监理人员
+
劳务人员
- + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + +
@@ -49,57 +54,69 @@ export default { data() { return { - loading:false, + loading: false, show: false, tableData: [], - projectId:0, - deptId:0, - size:10, - index:1, - total:0, - nav:101 + projectId: 0, + deptId: 0, + size: 10, + index: 1, + total: 0, + nav: 101 }; }, mounted() { - + }, methods: { - handleCurrentChange(n){ - this.index=n; + handleCurrentChange(n) { + this.index = n; this.loadData(); }, - doNav(n){ - this.nav=n; - this.index=1; + doNav(n) { + this.nav = n; + this.index = 1; this.loadData(); }, showDialog(data) { - this.projectId=data?.projectId||0; - this.deptId=data?.deptId||0; - this.size=10; - this.index=1; + this.projectId = data?.projectId || 0; + this.deptId = data?.deptId || 0; + this.size = 10; + this.index = 1; this.loadData(); this.show = true }, - loadData(){ - let postData={ - attendanceTime:this.$dt(new Date()).format("YYYY-MM-DD"), - projectId:this.projectId, - pageSize:this.size, - pageNum:this.index, - companyTypeId:this.nav + loadData() { + let postData = { + attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD"), + projectId: this.projectId, + pageSize: this.size, + pageNum: this.index, + companyTypeId: this.nav } - this.tableData=[]; - this.loading=true; - this.$api.attendance.listAttendance(postData).then(d=>{ - this.total=d.total||0; - this.tableData=(d.rows||[]).map(it=>{ - it.scanPhoto=it.scanPhoto && it.scanPhoto.indexOf("/profile")==0?"/jhapi"+it.scanPhoto:it.scanPhoto; + this.tableData = []; + this.loading = true; + this.$api.attendance.listAttendance(postData).then(d => { + this.total = d.total || 0; + this.tableData = (d.rows || []).map(it => { + let dt1 = it.attendanceTime; + let dt2 = it.attendanceOutTime; + if ((!dt1 || !dt2) || dt1 == dt2) { + let dt = dt1 || dt2; + if (it.remark == "E") { + it.attendanceTime = dt; + it.attendanceOutTime = ""; + } else { + it.attendanceTime = ""; + it.attendanceOutTime = dt; + } + } + it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto; return it; }); - this.loading=false; + this.loading = false; }) } }, @@ -107,27 +124,30 @@ export default { \ No newline at end of file diff --git a/src/pages/components/MonitAndWarning.vue b/src/pages/components/MonitAndWarning.vue index 9931e1a..0c566f3 100644 --- a/src/pages/components/MonitAndWarning.vue +++ b/src/pages/components/MonitAndWarning.vue @@ -46,7 +46,14 @@
{{ item.name }}
- {{ item.data }}/{{ item.total }} + + +
diff --git a/src/pages/index.vue b/src/pages/index.vue index 386e24e..3219692 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -495,6 +495,7 @@ export default { this.elKey++; this.onWarningInfoNav(0); this.sumCostOutByDeptId(); + this.groupByProjectCategory(this.deptInfo.id); })); this.$bus.$on("deptChange", debounce(dept => { @@ -591,7 +592,7 @@ export default { this.$refs.dlg2.showDetailDialog(this.prjProcessNav,idx,this.deptInfo); } }, - sumCostOutByDeptId() { + sumCostOutByDeptId() { let dt = this.$dt(new Date()); let postData = { year: dt.$y, @@ -602,13 +603,7 @@ export default { postData.projectId = this.prj.id; } else { postData.id = this.deptInfo.id; - } - if (this.callSumCostTime) { - if (+new Date() - this.callSumCostTime < 400) { - return; - } - } - this.callSumCostTime = +new Date(); + } this.$api.costOut.sumByDeptId(postData).then(d => { this.sumCost = d; }); diff --git a/src/pages/projectDetail.vue b/src/pages/projectDetail.vue index 117fb57..4247d35 100644 --- a/src/pages/projectDetail.vue +++ b/src/pages/projectDetail.vue @@ -883,12 +883,13 @@ export default { } return ""; }, - getCurProject() { + getCurProject() { if (!this.project) { return {}; } if (this.project.id == 0) { if (this.prjs.length > 1) { + return this.prjs[1]; } return {}; @@ -992,7 +993,7 @@ export default { this.$api.costOut.selectYearAndMonth({ projectId: id, year: dt.$y, - month: dt.$M + month: dt.$M+1 }).then(d => { d.totalMonth = d.totalMonth.toFixed(2); d.totalYear = d.totalYear.toFixed(2); diff --git a/src/pages/quality/projectChecking.vue b/src/pages/quality/projectChecking.vue index 4345be5..0239a03 100644 --- a/src/pages/quality/projectChecking.vue +++ b/src/pages/quality/projectChecking.vue @@ -269,11 +269,11 @@ export default { } }, - queryDataList(nav, t) { + queryDataList(nav, t) { let postData = { - projectId: this.projectInfo.id, - dataTypeLvl2: nav - } + projectId: this.projectInfo.id, + dataTypeLvl2:nav + } this.$api.projectChecking.queryProjectCheckingList(1, 20, postData).then(d => { if (t == "a") { this.dataList1 = d.rows || []; diff --git a/vue.config.js b/vue.config.js index b12bb24..bbccaad 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,8 +38,8 @@ module.exports = defineConfig({ }, '/jhapi':{ //target: `http://62.234.3.186/jhapi/`, - //target: `http://127.0.0.1:8090/jhapi/`, - target: `http://szgc.jhncidg.com/jhapi/`, + target: `http://127.0.0.1:8090/jhapi/`, + //target: `http://szgc.jhncidg.com/jhapi/`, changeOrigin: true, pathRewrite: { '^/jhapi':'/'