Commit bb16dba7 authored by liuyuping's avatar liuyuping

'initial'

parent f654b080
......@@ -105,3 +105,24 @@ export function getAllIndustry(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 {
findUploadedDangerJobReport,
dangerJobReport } from '@/api/hwapproval.js'
// import PDFViewer from 'pdf-viewer-vue';
import { findTrainEnterprise, findTodayTrainEnterprise } from '@/api/trainimage.js'
export default {
components: {
LivePlayer,
......@@ -2795,6 +2796,8 @@ export default {
},
data() {
return {
trainEnterprises: [],
todayTrainEnterprises: [],
isCurCertifyPdfFile: false,
// 危险作业
dangerWorkRecord: [],
......@@ -3567,6 +3570,7 @@ export default {
// axios.get('http://118.190.98.56:9090/jz/daq/nextList?id=36').then(res => {
// console.log(res, 'hahahhahaha')
// })
this.initTrainEnterprises()
this.initAllDanger()
this.initAllCertifies()
findUploadEnterprise().then(res => {
......@@ -3617,6 +3621,16 @@ export default {
this.videoPlayer();
},
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() {
let result = []
await findUploadedDangerJobReport().then(res => {
......@@ -3916,6 +3930,15 @@ export default {
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++) {
let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
......@@ -3942,6 +3965,15 @@ export default {
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++) {
let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
......@@ -3968,6 +4000,15 @@ export default {
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++) {
let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
......@@ -3994,6 +4035,15 @@ export default {
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++) {
let sum = 0;
for (let j = 0; j < this.curDepartIndusEnters[i].induses.length; j++) {
......
......@@ -111,20 +111,21 @@ export default {
this.isLoadingData = true
let params = {
enterpriseId: this.companyId,
page: this.currentPage,
page: this.currentPage - 1,
size: this.curPageSize,
sort: 'time,desc'
}
searchTrainImage(params).then(res => {
console.log(res ,'searchTrainImg searchTrainImg searchTrainImg')
this.trainimgData = [...res.content.map(item => {
return {
briefIntroduction: item.briefIntroduction,
location: item.location,
peopleNum: item.peopleNum,
time: item.time,
beforeImgPath: item.beforeImgPath,
trainingImgPath: item.trainingImgPath,
afterImgPath: item.afterImgPath
beforeImgPath: '/train-image/' + item.beforeImgPath.split('\\train-image\\')[1],
trainingImgPath: '/train-image/' + item.trainingImgPath.split('\\train-image\\')[1],
afterImgPath: '/train-image/' + item.afterImgPath.split('\\train-image\\')[1]
}
})]
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