diff --git a/src/api/index.js b/src/api/index.js index 474bdf5..5292a7d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -3,10 +3,14 @@ import dept from './dept/index' import schedule from './schedule/index' import quarterlyAssess from './quarterlyAssess/index' import problemmodify from './problemmodify/index' +import workFile from './workFile/index' +import workTrain from './workTrain/index' export default { project, dept, schedule, quarterlyAssess, - problemmodify + problemmodify, + workFile, + workTrain } \ No newline at end of file diff --git a/src/api/workFile/index.js b/src/api/workFile/index.js new file mode 100644 index 0000000..d26f070 --- /dev/null +++ b/src/api/workFile/index.js @@ -0,0 +1,12 @@ +import request from '@/utils/request' + +const getWorkFileList=(fileBelong)=> { + return request({ + url: `bgscreen/workfile/getWorkFileList?fileBelong=${fileBelong}`, + method: 'get' + }) +} + +export default{ + getWorkFileList +} \ No newline at end of file diff --git a/src/api/workTrain/index.js b/src/api/workTrain/index.js new file mode 100644 index 0000000..3771496 --- /dev/null +++ b/src/api/workTrain/index.js @@ -0,0 +1,12 @@ +import request from '@/utils/request' + +const getWorkTrainList=(trainType,deptId)=> { + return request({ + url: `bgscreen/workTrain/getWorkTrainList?trainType=${trainType}&deptId=${deptId}`, + method: 'get' + }) +} + +export default{ + getWorkTrainList +} \ No newline at end of file diff --git a/src/pages/projectSafety.vue b/src/pages/projectSafety.vue index 7f70411..dcff466 100644 --- a/src/pages/projectSafety.vue +++ b/src/pages/projectSafety.vue @@ -54,32 +54,52 @@ - -
-
-
专项培训
-
- {{it.id}} - {{it.title}} - + +
+
+
+ {{index+1}} + {{it.trainNatureName}} +
-
- +
+
-
参与人数:{{it.cnt}}
+
参与人数:{{it.trainParticipants}}
- 培训时间:{{it.start}}~{{it.end}} + 培训时间:{{it.beginDate}}~{{it.endDate}}
-
协作队伍:{{it.team}}
+
协作队伍:{{it.trainDeptNames}}
- + + +
+
+
+ {{index+1}} + {{it.trainNatureName}} + +
+
+
+ +
+
+
参与人数:{{it.trainParticipants}}
+
+ 培训时间:{{it.beginDate}}~{{it.endDate}} +
+
+
+
协作队伍:{{it.trainDeptNames}}
+
+
+
- +
- 上级部门 - 集团公司 - 子分公司 + 上级部门 + 集团公司 + 子分公司
-
+
-
{{it.name}}
-
{{it.time}}
-
-
- 查看详情 -
-
- -
- -
-
{{it.name}}
-
{{it.time}}
-
-
- 查看详情 -
-
- -
- -
-
{{it.name}}
-
{{it.time}}
+
{{it.fileName}}
+
{{it.createTime}}
查看详情 @@ -210,39 +208,29 @@ import '../components/rank-chart' import '../components/staff-survey-chart' import '../components/idle-list-chart' import '../components/people-number' +import '../components/people-number' export default { data() { return { elKey:0, dept:null, safeNav:0, - safeText:'汇总总数', + safeText:'汇总总数', rowStyle:{ color:'#B6CFEF', fontSize:'12px', height:'32px' }, - trainingData:[ - {id:'01',title:'消防应急演练',img:'images/840.jpg',cnt:32,start:'2023-05-30',end:'2023-06-08',team:'中铁一局',flag:0}, - {id:'02',title:'防汛应急演练',img:'images/841.jpg',cnt:48,start:'2023-05-14',end:'2023-05-23',team:'中铁一局',flag:0}, - {id:'03',title:'防汛应急培训',img:'images/842.jpg',cnt:25,start:'2023-06-04',end:'2023-06-13',team:'中铁一局,陕西澜海泓森建设工程有限公司',flag:0}, - {id:'04',title:'超重吊装专项培训',img:'images/843.jpg',cnt:16,start:'2023-06-04',end:'2023-06-13',team:'中铁一局,大国工匠',flag:1}, - ], - fileNav:0, - files:[ - {name:'2023.7.28关于泾河在建工程安全管理的通知',time:'2023-07-15 11:22:33',url:'/jhfiles/1.上级部门/2023.7.28关于泾河在建工程安全管理的通知.pdf'}, - ], - files2:[ - {name:'2023.8.7建设项目检查周报',time:'2023-07-15 11:22:33',url:'/jhfiles/2.集团公司/2023.8.7建设项目检查周报.pdf'}, - ], - files3:[ - {name:'1.城投公司项目推进会材料7.17.pdf',time:'2023-07-15 11:22:33',url:'/jhfiles/3.分子公司/1.城投公司项目推进会材料7.24.pdf'}, - {name:'2.置业公司项目推进会材料7.21.pdf',time:'2023-07-15 11:22:33',url:'/jhfiles/3.分子公司/2.置业公司项目推进会材料7.21.pdf'}, - {name:'3.投资公司项目推进会材料7.21.pdf',time:'2023-07-15 11:22:33',url:'/jhfiles/3.分子公司/3.投资公司项目推进会材料7.21.pdf'}, - {name:'4.产发绿能项目推进会材料7.21.pdf',time:'2023-07-15 11:22:33',url:'/jhfiles/3.分子公司/4.产发绿能项目推进会材料7.21.pdf'}, - {name:'5.智能产业园项目推进会材料7.24.pdf',time:'2023-07-15 11:22:33',url:'/jhfiles/3.分子公司/5.智能产业园项目推进会材料7.24.pdf'}, - {name:'6.医疗公司项目推进会材料7.21.pdf',time:'2023-07-15 11:22:33',url:'/jhfiles/3.分子公司/6.医疗公司项目推进会材料7.21.pdf'}, - ], + // 专项培训数据 + workTrainList:[], + // 应急演练数据 + emergencyDrillList:[], + // 传达文件路由 + fileNav:1, + // 传达文件标题 + fileTitle:"传达文件(0)", + // 传达文件列表 + fileList:[], infoNav:0, staffText:'在岗人员', surveyUrl:'images/survey_icon_4.png', @@ -273,15 +261,52 @@ export default { } }, created() { - this.init() + this.init(); + this.getWorkFileList(); + this.getWorkTrainList(); + this.getEmergencyDrillList(); }, mounted() { this.$bus.$on("deptChange",dept=>{ this.dept=dept; this.doDeptChane(); + this.getWorkTrainList(); + this.getEmergencyDrillList(); }); }, methods: { + fileNavChage(val){ + this.fileNav = val; + this.getWorkFileList(); + }, + // 获取传达文件列表 + getWorkFileList(){ + this.$api.workFile.getWorkFileList(this.fileNav).then(d=>{ + this.fileList = d.rows; + let _title = "传达文件("+this.fileList.length+")"; + this.fileTitle = _title; + }); + }, + // 获取专项培训列表 + getWorkTrainList(){ + let deptId = ''; + if(this.dept){ + deptId = this.dept.id; + } + this.$api.workTrain.getWorkTrainList(0,deptId).then(d=>{ + this.workTrainList = d.rows; + }); + }, + // 获取专项培训列表 + getEmergencyDrillList(){ + let deptId = ''; + if(this.dept){ + deptId = this.dept.id; + } + this.$api.workTrain.getWorkTrainList(1,deptId).then(d=>{ + this.emergencyDrillList = d.rows; + }); + }, fmt(n){ n=""+n; return " ".substring(0,3-n.length)+n; @@ -333,10 +358,17 @@ export default { }) this.elKey++; }) + }, + // 获取图片映射 + getProfileImage(url){ + if(url){ + return '/jhapi'+url; + } + return url; }, downloadFile(it){ - if(it && it.url){ - window.open(''+it.url); + if(it && it.filePath){ + window.open('/jhapi'+it.filePath); } }, //劳务人员概况 @@ -490,8 +522,20 @@ export default { max-height: calc(100% - 90px); margin-right: 12px; overflow-y: auto; - - + } + .train-list{ + max-height: calc(100% - 45px); + margin-right: 12px; + overflow-y: auto; + } + .train-img{ + width: 85px; + height: 60px; + } + .train-img-par{ + height: 60px; + overflow: hidden; + margin: 10px 5px 5px 5px; } } \ No newline at end of file