修复安全教育安全培训记录

This commit is contained in:
骆乐 2022-07-19 16:08:57 +08:00
parent f58a8d1a44
commit c0951b378b
6 changed files with 70 additions and 25 deletions

View File

@ -42,8 +42,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' // axios.defaults.baseURL = 'http://192.168.34.125:6023/'
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南 // axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
// tag: 本地 // tag: 本地
// axios.defaults.baseURL = 'http://192.168.34.148:6023/' // 老大本地 axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
axios.defaults.baseURL = 'http://192.168.34.125:6043/'; //杨意本地 http/1.1 // axios.defaults.baseURL = 'http://192.168.34.125:6043/'; //杨意本地 http/1.1
// axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇 // axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇
// axios.defaults.baseURL = 'http://120.196.217.6:7000/'; // axios.defaults.baseURL = 'http://120.196.217.6:7000/';
// axios.defaults.baseURL = 'http://139.9.66.234:8/'; // axios.defaults.baseURL = 'http://139.9.66.234:8/';

View File

@ -92,7 +92,12 @@ import {
getWorkerInfoList,getTeamInfoList getWorkerInfoList,getTeamInfoList
} from "@/assets/js/api/laborPerson"; } from "@/assets/js/api/laborPerson";
export default { export default {
props:['personType'], // props:['personType','selectWorkerDialog'],
props:{
personType:Number,
selectWorkerDialog:Boolean,
},
data() { data() {
return { return {
enterpriseListData: [], enterpriseListData: [],
@ -150,12 +155,14 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
closeFn(){ closeFn(){
this.$emit('close','') this.$emit('close',false)
}, },
submitData(){ submitData(){
this.$emit('getData',this.multipleSelection) this.$emit('getData',this.multipleSelection)
this.multipleSelection=[] this.multipleSelection=[]
this.tableListData = [] this.tableListData = []
console.log('selectWorkerDialog',this.selectWorkerDialog)
this.$emit('close',false)
}, },
}, },
}; };

View File

@ -53,8 +53,9 @@ export default new Vuex.Store({
// FILEURL: 'http://124.71.178.44:100/image/', // FILEURL: 'http://124.71.178.44:100/image/',
/* 2022-06-06 */ // tag: 本地测试接口 /* 2022-06-06 */ // tag: 本地测试接口
// UPLOADURL: 'http://192.168.34.125:6023/upload/image', // BASEURL:'http://192.168.34.174:6023/',
// FILEURL: 'http://192.168.34.125:6023/image/', // UPLOADURL: 'http://192.168.34.125:6043/upload/image',
// FILEURL: 'http://192.168.34.125:6043/image/',
// UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式 // UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式
// FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式 // FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式
ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员2企业管理员账号3企业区账号4企业市账号5项目账号 ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员2企业管理员账号3企业区账号4企业市账号5项目账号

View File

@ -53,9 +53,9 @@
style=" style="
float: right; float: right;
clear: both; clear: both;
height: 32px; height: 25px;
margin-right: 20px; margin-right: 30px;
" v-if="$route.path.indexOf('/project/')==-1" " v-if="$route.path.indexOf('/project/') == -1 "
> >
<!-- <img <!-- <img
@click="add(2,name.id)" @click="add(2,name.id)"
@ -69,7 +69,8 @@
style="font-size: 14px" style="font-size: 14px"
@click="add(2, name.id)" @click="add(2, name.id)"
> >
{{$t('message.safeMangeCheck.add')+$t('message.safeMangeCheck.subordinate')}} <!-- $t('message.safeMangeCheck.add')+$t('message.safeMangeCheck.subordinate') -->
{{'新增下级'}}
<!-- 新增下级 --> <!-- 新增下级 -->
</el-button </el-button
> >
@ -109,7 +110,7 @@
slot="reference" slot="reference"
@mouseenter=" @mouseenter="
item.visible = item.visible =
item.hiddenDangerName.length > 9 ? true : false item.hiddenDangerName.length > 0 ? true : false
" "
@mouseleave="item.visible = false" @mouseleave="item.visible = false"
style="display: inline-block; width: 60%" style="display: inline-block; width: 60%"
@ -126,8 +127,8 @@
style=" style="
float: right; float: right;
clear: both; clear: both;
height: 32px; height: 25px;
margin-right: 20px; margin-right: 30px;
" v-if="$route.path.indexOf('/project/')==-1" " v-if="$route.path.indexOf('/project/')==-1"
> >
<!-- <el-button <!-- <el-button
@ -715,6 +716,7 @@ export default {
sn: this.$store.state.userInfo.headquartersSn, sn: this.$store.state.userInfo.headquartersSn,
}; };
getinspectHiddenDangerLibraryListApi(param).then((res) => { getinspectHiddenDangerLibraryListApi(param).then((res) => {
console.log('dataList===============',res)
this.dataList = res.result; this.dataList = res.result;
}); });
}, },

View File

@ -297,8 +297,7 @@
:show-file-list="false" :show-file-list="false"
:on-success="file => handleUpload(file, i)" :on-success="file => handleUpload(file, i)"
> >
<img v-if="cardForm[`edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo`]" <img v-if="picName(i)" :src="picUrl(i)"
:src="$store.state.FILEURL + cardForm[`edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo`]"
class="photo" /> class="photo" />
<template v-else> <template v-else>
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
@ -429,6 +428,7 @@
<div class="dialog_content"> <div class="dialog_content">
<selectWorker <selectWorker
:personType="1" :personType="1"
:show = "selectWorkerDialog"
@getData="getWorkerData" @getData="getWorkerData"
v-if="selectWorkerDialog" v-if="selectWorkerDialog"
@close="closeSelectWorkerDialog" @close="closeSelectWorkerDialog"
@ -484,7 +484,7 @@
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="age" :label="$t('message.laborMange.age')"> </el-table-column> <el-table-column prop="age" :label="$t('message.laborMange.age')"> </el-table-column>
<el-table-column prop="idCard" :label="$t('message.laborMange.IdNumber')" > </el-table-column> <el-table-column prop="idcardnumber" width="200" align="center" :label="$t('message.laborMange.IdNumber')" > </el-table-column>
<el-table-column prop="teamName" :label="$t('message.laborMange.team')" > </el-table-column> <el-table-column prop="teamName" :label="$t('message.laborMange.team')" > </el-table-column>
<el-table-column prop="isQualified" :label="$t('message.laborDev.isQualified')" > <el-table-column prop="isQualified" :label="$t('message.laborDev.isQualified')" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -558,7 +558,7 @@ export default {
allPersonList: [], allPersonList: [],
educateTypeList: this.$t("message.laborDev.educateTypeList"), educateTypeList: this.$t("message.laborDev.educateTypeList"),
selectWorkerDialog: false, selectWorkerDialog: false,
detailDialog: false detailDialog: false,
}; };
}, },
mounted() { mounted() {
@ -568,8 +568,17 @@ export default {
console.log('url',xxx) console.log('url',xxx)
}, },
methods: { methods: {
picName(i){
// console.log('========',this.cardForm[ `edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo` ])
return this.cardForm[ `edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo` ]
},
picUrl(i){
return this.$store.state.FILEURL + this.cardForm[ `edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo` ]
},
handleUpload(res, num) { handleUpload(res, num) {
console.log('添加成功',res)
const imageUrl = res.data[0].imageUrl const imageUrl = res.data[0].imageUrl
// console.log(res.data[0].imageUrl)
this.cardForm[`edu${num === 1 ? 'Before': num === 2 ? 'In' : 'After'}Photo`] = imageUrl this.cardForm[`edu${num === 1 ? 'Before': num === 2 ? 'In' : 'After'}Photo`] = imageUrl
console.log(this.eduPhoto1,this.eduPhoto2,this.eduPhoto3, num); console.log(this.eduPhoto1,this.eduPhoto2,this.eduPhoto3, num);
}, },
@ -673,9 +682,11 @@ export default {
id: item.id, id: item.id,
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
}).then((res) => { }).then((res) => {
if(res.result.workerSafeEducation != null){
this.cardForm = res.result.workerSafeEducation; this.cardForm = res.result.workerSafeEducation;
console.log(res); }if(res.result.list != null){
this.cardForm.list = res.result.list; this.cardForm.list = res.result.list;
}
}); });
}, },
// //
@ -781,14 +792,38 @@ export default {
this.loadCardData(); this.loadCardData();
}, },
handleDetail(id) { handleDetail(id) {
// console.log('--------------id',id)
this.detailDialog = true this.detailDialog = true
workerSafeEducationDetailApi({ workerSafeEducationDetailApi({
id: id, id: id,
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
}).then((res) => { }).then((res) => {
console.log('获取详情',res)
if(res.result.workerSafeEducation != null){
this.cardForm = res.result.workerSafeEducation; this.cardForm = res.result.workerSafeEducation;
}if(res.result.list != null){
this.cardForm.list = res.result.list; this.cardForm.list = res.result.list;
console.log(this.cardForm,'但是现实是'); }
console.log('点击当前行获取详情',this.cardForm);
if(this.cardForm.eduType == 1){
this.cardForm.eduType ='入场安全教育'
}else if(this.cardForm.eduType == 2){
this.cardForm.eduType ='日常安全教育'
}else if(this.cardForm.eduType == 3){
this.cardForm.eduType ='每日安全交底'
}else if(this.cardForm.eduType == 4){
this.cardForm.eduType ='VR安全教育'
}else if(this.cardForm.eduType == 5){
this.cardForm.eduType ='班前教育'
}else if(this.cardForm.eduType == 6){
this.cardForm.eduType ='日常教育(日常违规教育'
}else if(this.cardForm.eduType == 7){
this.cardForm.eduType ='每日交底(方案交底)'
}else if(this.cardForm.eduType == 8){
this.cardForm.eduType ='每日交底(安全技术交底)'
}else if(this.cardForm.eduType == 9){
this.cardForm.eduType ='每日交底(大工程交底)'
}
}); });
}, },

View File

@ -56,8 +56,8 @@
}}</el-button> }}</el-button>
<el-button type="warning" size="medium" plain @click="refresh">{{$t('message.deviceManage.refresh')}}</el-button> <el-button type="warning" size="medium" plain @click="refresh">{{$t('message.deviceManage.refresh')}}</el-button>
<!-- 目前广西联通需要安全教育导出功能 20220706--> <!-- 目前广西联通需要安全教育导出功能 20220706-->
<el-button type="primary" size="medium" plain @click="exportBtn"> <el-button type="primary" size="medium" plain >
<a :href="printUrl" class="printUrl">导出</a> <a :href="printUrl" class="printUrl" @click="exportBtn">导出</a>
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>