+
项目概况
-
-
项目概况
-
项目详情
-
安全管理
-
质量管理
-
进度管理
-
-
工程管理
+
项目详情
+
安全管理
+
质量管理
+
进度管理
+
+
工程管理
+
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
![]()
-
{{condTxt}}
-
{{temperature}}℃
-
-
-
-
-
-
+
+
+
+
+
+
{{ date }}
+
{{ time }}
+
+
+
![]()
+
{{ condTxt }}
+
{{ temperature }}℃
+
+
+
+
+
+
+
+
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index b411d44..0f9ef81 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,11 +1,14 @@
import Vue from 'vue'
import App from './App.vue'
+import store from './store'
import router from './router'
+import './permission'
import './pages/init.js'
Vue.config.productionTip = false
new Vue({
router,
+ store,
render: h => h(App)
}).$mount('#app')
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 4e8f47b..ccba7e5 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -463,7 +463,10 @@ export default {
},
mounted() {
window.xapp = this;
- this.$nextTick(() => {
+ this.$nextTick(() => {
+ if(this.$root.isTypeBuser){
+ this.$router.push("/detail");
+ }
this.loading = true;
});
this.$bus.$on("loadProjects", debounce(prjs => {
diff --git a/src/pages/projectSafety.vue b/src/pages/projectSafety.vue
index ab2b45a..015cbc3 100644
--- a/src/pages/projectSafety.vue
+++ b/src/pages/projectSafety.vue
@@ -485,22 +485,50 @@ export default {
}
});
} else {
- //查询出勤人数
- this.$api.attendance.getWorkAttendanceList(this.dept?.id||0,this.projectInfo?.id||0).then(d => {
- this.laborPersonnelTotal=0;
- this.laborPersonnelData=[{text: "劳务人员", value: 0},{text: "监理人员", value: 0},{text: "总包人员", value: 0}];
- if(d.rows.length>0 && d.rows[0]!=null){
- this.laborPersonnelData=[];
- this.laborPersonnelTotal += d.rows[0].servicePersonnel;
- this.laborPersonnelData.push({text: "劳务人员", value: d.rows[0].servicePersonnel});
- this.laborPersonnelTotal += d.rows[0].supervisorPersonnel;
- this.laborPersonnelData.push({text: "监理人员", value: d.rows[0].supervisorPersonnel});
- this.laborPersonnelTotal += d.rows[0].contractorPersonnel;
- this.laborPersonnelData.push({text: "总包人员", value: d.rows[0].contractorPersonnel});
- }
- });
+ this.loadAttendanceData();
}
},
+ getProjectId(cb) {
+ let func = () => {
+ let prjId = this.projectInfo?.id||0;
+ if (prjId == 0) {
+ if (!this.projects||this.projects.length == 0) {
+ setTimeout(func, 100);
+ } else {
+ cb && cb(this.projects[1].id);
+ }
+ } else {
+ cb && cb(prjId);
+ }
+ }
+ func();
+ },
+ loadAttendanceData(){
+ this.getProjectId(id => {
+ let data={
+ subDeptId:this.dept.id||0,
+ projectId:id||0,
+ attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
+ }
+ this.$api.attendance.groupByComany(data).then(d=>{
+ let tmps=d.data||[];
+ const func=(ids)=>{
+ let sum=0;
+ tmps.filter(it=>ids.includes(it.companyTypeId)).map(it=>it.id).forEach(it=>{
+ sum+=it*1;
+ })
+ return sum;
+ }
+
+ this.laborPersonnelTotal = 0;
+ this.laborPersonnelData = [{ text: "劳务人员", value: func(["2","3"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1"]) }];
+ this.laborPersonnelData.forEach(it=>{
+ this.laborPersonnelTotal += it.value;
+ })
+ this.elDeptWorks++;
+ });
+ });
+ },
getProjectInsuranceList(){
this.$api.insurance.getProjectInsuranceList(this.dept?.id||0,this.projectInfo?.id||0).then(d => {
this.insuranceDataList=[];
diff --git a/src/pages/quality/checkDetectionDlg.vue b/src/pages/quality/checkDetectionDlg.vue
index 41affe3..d6c442b 100644
--- a/src/pages/quality/checkDetectionDlg.vue
+++ b/src/pages/quality/checkDetectionDlg.vue
@@ -89,7 +89,7 @@
送检时间:
- {{ it.checkTime|dateFormat }}
+ {{ it.checkTime|formatDate }}
检测结果:
@@ -107,7 +107,7 @@
提交时间:
- {{ it.createTime|dateFormat }}
+ {{ it.createTime|formatDate }}
登记结果用户:
@@ -115,7 +115,7 @@
登记结果时间:
- {{ it.updateTime|dateFormat }}
+ {{ it.updateTime|formatDate }}