From ca2f29b4e7f88c86069353164301cb992c7182d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Fri, 11 Aug 2023 22:16:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 4 +- src/api/workFile/index.js | 12 ++++++ src/pages/projectSafety.vue | 79 +++++++++++++++---------------------- 3 files changed, 46 insertions(+), 49 deletions(-) create mode 100644 src/api/workFile/index.js diff --git a/src/api/index.js b/src/api/index.js index 474bdf5..f893313 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -3,10 +3,12 @@ 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' export default { project, dept, schedule, quarterlyAssess, - problemmodify + problemmodify, + workFile } \ 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/pages/projectSafety.vue b/src/pages/projectSafety.vue index 7f70411..863aca4 100644 --- a/src/pages/projectSafety.vue +++ b/src/pages/projectSafety.vue @@ -99,40 +99,18 @@ - +
- 上级部门 - 集团公司 - 子分公司 + 上级部门 + 集团公司 + 子分公司
-
+
-
{{it.name}}
-
{{it.time}}
-
-
- 查看详情 -
-
- -
- -
-
{{it.name}}
-
{{it.time}}
-
-
- 查看详情 -
-
- -
- -
-
{{it.name}}
-
{{it.time}}
+
{{it.fileName}}
+
{{it.createTime}}
查看详情 @@ -210,13 +188,14 @@ 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', @@ -228,21 +207,12 @@ export default { {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'}, - ], + // 传达文件路由 + fileNav:1, + // 传达文件标题 + fileTitle:"传达文件(0)", + // 传达文件列表 + fileList:[], infoNav:0, staffText:'在岗人员', surveyUrl:'images/survey_icon_4.png', @@ -273,7 +243,8 @@ export default { } }, created() { - this.init() + this.init(); + this.getWorkFileList(); }, mounted() { this.$bus.$on("deptChange",dept=>{ @@ -282,6 +253,18 @@ export default { }); }, 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; + }); + }, fmt(n){ n=""+n; return " ".substring(0,3-n.length)+n; @@ -335,8 +318,8 @@ export default { }) }, downloadFile(it){ - if(it && it.url){ - window.open(''+it.url); + if(it && it.filePath){ + window.open('/jhapi'+it.filePath); } }, //劳务人员概况 From c58f656f4daeccfadcdd8cfcbba3146bdb0f2240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sat, 12 Aug 2023 00:32:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 4 +- src/api/workTrain/index.js | 12 ++++ src/pages/projectSafety.vue | 109 ++++++++++++++++++++++++++++-------- 3 files changed, 100 insertions(+), 25 deletions(-) create mode 100644 src/api/workTrain/index.js diff --git a/src/api/index.js b/src/api/index.js index f893313..5292a7d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -4,11 +4,13 @@ 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, - workFile + workFile, + workTrain } \ 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 863aca4..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}}
+
+
+
{ this.dept=dept; this.doDeptChane(); + this.getWorkTrainList(); + this.getEmergencyDrillList(); }); }, methods: { @@ -265,6 +287,26 @@ export default { 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; @@ -316,6 +358,13 @@ export default { }) this.elKey++; }) + }, + // 获取图片映射 + getProfileImage(url){ + if(url){ + return '/jhapi'+url; + } + return url; }, downloadFile(it){ if(it && it.filePath){ @@ -473,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