安全培训管理:更改编辑弹框,添加培训照片表单项

This commit is contained in:
杜海鹏 2022-07-14 10:55:30 +08:00
parent ffb0b1c3a2
commit ce54b6fd29
4 changed files with 56 additions and 5 deletions

View File

@ -52,6 +52,7 @@ export default {
remarks:'备注',
educateTypeList:['入场三级教育','定期安全教育','安全技术交底','VR安全教育'],
signInInfo:'签到信息',
photo:'培训照片',
selectWorker: '选择工人',
allGroup:'全部班组',
allCompany:'全部企业',

View File

@ -39,7 +39,8 @@ 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://124.71.178.44:100/'
axios.defaults.baseURL = 'http://192.168.34.125:6033/'
// tag: 本地
// axios.defaults.baseURL = 'http://192.168.88.220:6023/'; //本地 http/1.1
// axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇

View File

@ -45,16 +45,16 @@ export default new Vuex.Store({
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
// FILEURL:'http://10.0.1.43:6023/image/',//测试
BASEURL: baseUrl?baseUrl:window.location.protocol + '//' + window.location.host + '/', //
UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
FILEURL: window.location.protocol + '//' + window.location.host + '/image/',//测试
// UPLOADURL: window.location.protocol + '//' + window.location.host + '/upload/image', //
// FILEURL: window.location.protocol + '//' + window.location.host + '/image/',//测试
/* 2022-05-16 */
// tag: 部署河南项目时,需要打开这两行代码
// UPLOADURL: 'http://124.71.178.44:100/upload/image',
// FILEURL: 'http://124.71.178.44:100/image/',
/* 2022-06-06 */ // tag: 本地测试接口
// UPLOADURL: 'http://192.168.34.125:6023/upload/image',
// FILEURL: 'http://192.168.34.125:6023/image/',
UPLOADURL: 'http://192.168.34.125:6033/upload/image',
FILEURL: 'http://192.168.34.125:6033/image/',
// UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式
// FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式
ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员2企业管理员账号3企业区账号4企业市账号5项目账号

View File

@ -244,6 +244,23 @@
<el-button type="primary">材料上传</el-button>
</el-upload>
</el-form-item>
<!-- 培训照片 -->
<el-form-item :label="$t('message.laborDev.photo')" prop="photo" style="margin-left: 126px" >
<div class="form-photo" >
<el-upload
v-for="i in 3" :key="i"
name="files"
class="photoUpload"
:action="$store.state.UPLOADURL"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<span>培训{{i === 1 ? '前' : i === 2 ? '中' : '后'}}</span>
</el-upload>
</div>
</el-form-item>
<el-table
class="tables dialogTable"
:data="cardForm.list"
@ -343,6 +360,7 @@
size="medium"
>{{ $t("message.personnelPosition.cancel") }}
</el-button>
<!-- 取消 -->
<el-button
type="primary"
icon="el-icon-circle-check"
@ -350,6 +368,7 @@
size="medium"
>{{ $t("message.personnelPosition.determine") }}
</el-button>
<!-- 确认 -->
</div>
</el-form>
</div>
@ -697,4 +716,34 @@ export default {
left: 50%;
transform: translate(-50%, -50%);
}
.form-photo{
display: flex;
flex-wrap: wrap;
.photoUpload{
margin-right: 10px;
}
}
/deep/.photoUpload .el-upload {
position: relative;
width: 80px;
height: 80px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
overflow: hidden;
cursor: pointer;
span{
position: relative;
bottom: 36px;
}
}
.avatar-uploader-icon {
font-size: 20px;
color: #8c939d;
width: 80px;
height: 80px;
line-height: 80px;
text-align: center;
}
</style>