安全培训管理:新增培训时间表单项
This commit is contained in:
parent
70391446e5
commit
a4cfd15bfd
@ -53,6 +53,7 @@ export default {
|
||||
educateTypeList:['入场三级教育','定期安全教育','安全技术交底','VR安全教育'],
|
||||
signInInfo:'签到信息',
|
||||
photo:'培训照片',
|
||||
trainDateTime:'培训时间',
|
||||
selectWorker: '选择工人',
|
||||
allGroup:'全部班组',
|
||||
allCompany:'全部企业',
|
||||
|
||||
@ -40,7 +40,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://36.137.53.203:9090/'; // 南昌地铁 17512009894 123456789 gdjt 123456789
|
||||
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:100/'
|
||||
axios.defaults.baseURL = 'http://192.168.34.125:6033/'
|
||||
axios.defaults.baseURL = 'http://192.168.34.125:6023/'
|
||||
// tag: 本地
|
||||
// axios.defaults.baseURL = 'http://192.168.88.220:6023/'; //本地 http/1.1
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇
|
||||
|
||||
@ -53,8 +53,8 @@ export default new Vuex.Store({
|
||||
// FILEURL: 'http://124.71.178.44:100/image/',
|
||||
|
||||
/* 2022-06-06 */ // tag: 本地测试接口
|
||||
UPLOADURL: 'http://192.168.34.125:6033/upload/image',
|
||||
FILEURL: 'http://192.168.34.125:6033/image/',
|
||||
UPLOADURL: 'http://192.168.34.125:6023/upload/image',
|
||||
FILEURL: 'http://192.168.34.125:6023/image/',
|
||||
// UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式
|
||||
// FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式
|
||||
ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员,2企业管理员账号,3企业区账号,4企业市账号,5项目账号
|
||||
|
||||
@ -205,6 +205,33 @@
|
||||
style="width: 100%"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('message.laborDev.trainDateTime')"
|
||||
prop="eduDateTime"
|
||||
>
|
||||
<el-time-select
|
||||
class="startTime"
|
||||
placeholder="起始时间"
|
||||
v-model="cardForm.eduStartTime"
|
||||
:picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:15',
|
||||
end: '18:30',
|
||||
maxTime: cardForm.eduEndTime
|
||||
}">
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
class="endTime"
|
||||
placeholder="结束时间"
|
||||
v-model="cardForm.eduEndTime"
|
||||
:picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:15',
|
||||
end: '18:30',
|
||||
minTime: cardForm.eduStartTime
|
||||
}">
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('message.laborDev.trainPerson')"
|
||||
prop="eduTeacher"
|
||||
@ -245,7 +272,7 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<!-- 培训照片 -->
|
||||
<el-form-item :label="$t('message.laborDev.photo')" prop="photo" style="margin-left: 126px" >
|
||||
<el-form-item :label="$t('message.laborDev.photo')" prop="photo" >
|
||||
<div class="form-photo" >
|
||||
<el-upload
|
||||
v-for="i in 3" :key="i"
|
||||
@ -255,7 +282,9 @@
|
||||
:show-file-list="false"
|
||||
:on-success="file => handleUpload(file, i)"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="eduPhotos['photo' + i]" :src="$store.state.FILEURL + eduPhotos['photo' + i]" class="photo">
|
||||
<img v-if="cardForm[`edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo`]"
|
||||
:src="$store.state.FILEURL + cardForm[`edu${i === 1 ? 'Before': i === 2 ? 'In' : 'After'}Photo`]"
|
||||
class="photo">
|
||||
<template v-else>
|
||||
<i class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<span>培训{{i === 1 ? '前' : i === 2 ? '中' : '后'}}</span>
|
||||
@ -370,7 +399,7 @@
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.determine") }}
|
||||
</el-button>
|
||||
<!-- 确认 -->
|
||||
<!-- 确定 -->
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -426,8 +455,13 @@ export default {
|
||||
eduContent: "",
|
||||
eduCourseName: "",
|
||||
eduPhoto: "",
|
||||
eduBeforePhoto: "",
|
||||
eduInPhoto: "",
|
||||
eduAfterPhoto: "",
|
||||
eduTeacher: "",
|
||||
eduTime: "",
|
||||
eduStartTime: '',
|
||||
eduEndTime: '',
|
||||
eduType: 1,
|
||||
list: [],
|
||||
workernum: 0,
|
||||
@ -460,11 +494,6 @@ export default {
|
||||
allPersonList: [],
|
||||
educateTypeList: this.$t("message.laborDev.educateTypeList"),
|
||||
selectWorkerDialog: false,
|
||||
eduPhotos: {
|
||||
photo1: '',
|
||||
photo2: '',
|
||||
photo3: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -476,7 +505,7 @@ export default {
|
||||
methods: {
|
||||
handleUpload(res, num) {
|
||||
const imageUrl = res.data[0].imageUrl
|
||||
this.eduPhotos['photo' + num] = imageUrl
|
||||
this.cardForm[`edu${num === 1 ? 'Before': num === 2 ? 'In' : 'After'}Photo`] = imageUrl
|
||||
console.log(this.eduPhoto1,this.eduPhoto2,this.eduPhoto3, num);
|
||||
},
|
||||
handlePreview(file,type){
|
||||
@ -762,4 +791,13 @@ export default {
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
.startTime, .endTime{
|
||||
width: 160px !important;
|
||||
/deep/.el-input__inner{
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
/deep/.el-date-editor{
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user