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