Commit bb16dba7 authored by liuyuping's avatar liuyuping

'initial'

parent f654b080
...@@ -105,3 +105,24 @@ export function getAllIndustry(params) { ...@@ -105,3 +105,24 @@ export function getAllIndustry(params) {
params params
}) })
} }
/**
* 查询已参加培训的企业
*/
export function findTrainEnterprise() {
return request({
url: 'api/trainImage/findTrainEnterprise',
method: 'get'
})
}
/**
* 查询今日参加培训的企业
*/
export function findTodayTrainEnterprise() {
return request({
url: 'api/trainImage/findTodayTrainEnterprise',
method: 'get'
})
}
...@@ -2788,6 +2788,7 @@ import { ...@@ -2788,6 +2788,7 @@ import {
findUploadedDangerJobReport, findUploadedDangerJobReport,
dangerJobReport } from '@/api/hwapproval.js' dangerJobReport } from '@/api/hwapproval.js'
// import PDFViewer from 'pdf-viewer-vue'; // import PDFViewer from 'pdf-viewer-vue';
import { findTrainEnterprise, findTodayTrainEnterprise } from '@/api/trainimage.js'
export default { export default {
components: { components: {
LivePlayer, LivePlayer,
...@@ -2795,6 +2796,8 @@ export default { ...@@ -2795,6 +2796,8 @@ export default {
}, },
data() { data() {
return { return {
trainEnterprises: [],
todayTrainEnterprises: [],
isCurCertifyPdfFile: false, isCurCertifyPdfFile: false,
// 危险作业 // 危险作业
dangerWorkRecord: [], dangerWorkRecord: [],
...@@ -3567,6 +3570,7 @@ export default { ...@@ -3567,6 +3570,7 @@ export default {
// axios.get('http://118.190.98.56:9090/jz/daq/nextList?id=36').then(res => { // axios.get('http://118.190.98.56:9090/jz/daq/nextList?id=36').then(res => {
// console.log(res, 'hahahhahaha') // console.log(res, 'hahahhahaha')
// }) // })
this.initTrainEnterprises()
this.initAllDanger() this.initAllDanger()
this.initAllCertifies() this.initAllCertifies()
findUploadEnterprise().then(res => { findUploadEnterprise().then(res => {
...@@ -3617,6 +3621,16 @@ export default { ...@@ -3617,6 +3621,16 @@ export default {
this.videoPlayer(); this.videoPlayer();
}, },
methods: { methods: {
async initTrainEnterprises() {
await findTrainEnterprise().then(res => {
this.trainEnterprises = [...res]
console.log(res, 'findTrainEnterprise findTrainEnterprise')
})
await findTodayTrainEnterprise().then(res => {
this.todayTrainEnterprises = [...res]
console.log(res, 'findTodayTrainEnterprise findTodayTrainEnterprise')
})
},
async initAllDanger() { async initAllDanger() {
let result = [] let result = []
await findUploadedDangerJobReport().then(res => { await findUploadedDangerJobReport().then(res => {
...@@ -3916,6 +3930,15 @@ export default { ...@@ -3916,6 +3930,15 @@ export default {
this.curDepartIndusEnters[i].induses[j].coms = []; this.curDepartIndusEnters[i].induses[j].coms = [];
} }
} }
for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
for (let k = 0; k < this.trainEnterprises.length; k++) {
if (this.curDepartIndusEnters[i].induses[j].indus === this.trainEnterprises[k].industryName) {
this.curDepartIndusEnters[i].induses[j].coms.push(this.trainEnterprises[k])
}
}
}
}
for (let i = 0; i < this.curDepartIndusEnters.length; i++) { for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
let sum = 0; let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) { for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
...@@ -3942,6 +3965,15 @@ export default { ...@@ -3942,6 +3965,15 @@ export default {
this.curDepartIndusEnters[i].induses[j].coms = []; this.curDepartIndusEnters[i].induses[j].coms = [];
} }
} }
for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
for (let k = 0; k < this.trainEnterprises.length; k++) {
if (this.curDepartIndusEnters[i].induses[j].indus === this.trainEnterprises[k].industryName) {
this.curDepartIndusEnters[i].induses[j].coms.push(this.trainEnterprises[k])
}
}
}
}
for (let i = 0; i < this.curDepartIndusEnters.length; i++) { for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
let sum = 0; let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) { for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
...@@ -3968,6 +4000,15 @@ export default { ...@@ -3968,6 +4000,15 @@ export default {
this.curDepartIndusEnters[i].induses[j].coms = []; this.curDepartIndusEnters[i].induses[j].coms = [];
} }
} }
for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
for (let k = 0; k < this.todayTrainEnterprises.length; k++) {
if (this.curDepartIndusEnters[i].induses[j].indus === this.todayTrainEnterprises[k].industryName) {
this.curDepartIndusEnters[i].induses[j].coms.push(this.todayTrainEnterprises[k])
}
}
}
}
for (let i = 0; i < this.curDepartIndusEnters.length; i++) { for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
let sum = 0; let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) { for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
...@@ -3994,6 +4035,15 @@ export default { ...@@ -3994,6 +4035,15 @@ export default {
this.curDepartIndusEnters[i].induses[j].coms = []; this.curDepartIndusEnters[i].induses[j].coms = [];
} }
} }
for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
for (let k = 0; k < this.todayTrainEnterprises.length; k++) {
if (this.curDepartIndusEnters[i].induses[j].indus === this.todayTrainEnterprises[k].industryName) {
this.curDepartIndusEnters[i].induses[j].coms.push(this.todayTrainEnterprises[k])
}
}
}
}
for (let i = 0; i < this.curDepartIndusEnters.length; i++) { for (let i = 0; i < this.curDepartIndusEnters.length; i++) {
let sum = 0; let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) { for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
......
...@@ -111,20 +111,21 @@ export default { ...@@ -111,20 +111,21 @@ export default {
this.isLoadingData = true this.isLoadingData = true
let params = { let params = {
enterpriseId: this.companyId, enterpriseId: this.companyId,
page: this.currentPage, page: this.currentPage - 1,
size: this.curPageSize, size: this.curPageSize,
sort: 'time,desc' sort: 'time,desc'
} }
searchTrainImage(params).then(res => { searchTrainImage(params).then(res => {
console.log(res ,'searchTrainImg searchTrainImg searchTrainImg')
this.trainimgData = [...res.content.map(item => { this.trainimgData = [...res.content.map(item => {
return { return {
briefIntroduction: item.briefIntroduction, briefIntroduction: item.briefIntroduction,
location: item.location, location: item.location,
peopleNum: item.peopleNum, peopleNum: item.peopleNum,
time: item.time, time: item.time,
beforeImgPath: item.beforeImgPath, beforeImgPath: '/train-image/' + item.beforeImgPath.split('\\train-image\\')[1],
trainingImgPath: item.trainingImgPath, trainingImgPath: '/train-image/' + item.trainingImgPath.split('\\train-image\\')[1],
afterImgPath: item.afterImgPath afterImgPath: '/train-image/' + item.afterImgPath.split('\\train-image\\')[1]
} }
})] })]
this.totalSize = res.totalElements this.totalSize = res.totalElements
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment