Merge remote-tracking branch 'origin/dev' into dev
commit
605feeceb8
|
@ -85,8 +85,7 @@ export default {
|
|||
rules: {
|
||||
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
VALIDITYTIME: [{ required: true, message: '证书有效期不能为空', trigger: 'blur' }],
|
||||
NUMBER: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
|
||||
FILE: [{ required: true, message: '图片不能为空', trigger: 'blur' }]
|
||||
NUMBER: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -191,6 +190,8 @@ export default {
|
|||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.pop()
|
||||
} else {
|
||||
this.beforeFileUpload(file)
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="USERNAME">
|
||||
<el-input v-model="form.USERNAME" placeholder="默认用户手机号码..."/>
|
||||
<el-input v-model="form.USERNAME" placeholder="默认用户手机号码..." @change="goCheck()"/>
|
||||
<a style="color: red">
|
||||
<span>如果修改手机号,登录密码则会变成初始密码“Aa@123456789”</span></a>
|
||||
</el-form-item>
|
||||
|
@ -63,18 +63,90 @@
|
|||
<el-button v-if="form.PERSON_TYPE == '主要负责人' || form.PERSON_TYPE == '安全管理人员' || form.PERSON_TYPE == '特种作业人员'" plain type="success" @click="changePersonType">补充证照信息</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="定位卡号" prop="CARDNO">
|
||||
<el-input v-model="form.CARDNO" placeholder="这里输入定位卡号..."/>
|
||||
</el-form-item>
|
||||
<el-form-item label="门口门禁卡号" prop="MKMJCARD">
|
||||
<el-input v-model="form.MKMJCARD" placeholder="这里输入门口门禁卡号..."/>
|
||||
<el-form-item label="身份证号" prop="USER_ID_CARD">
|
||||
<el-input v-model="form.USER_ID_CARD" placeholder="这里输入身份证号..." @change="goCheck()"/>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="民族" prop="NATION">
|
||||
<el-select v-model="form.NATION" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in uesrInfoDic.minzuList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="SEX">
|
||||
<el-select v-model="form.SEX" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in uesrInfoDic.xingbieList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item label="定位卡号" prop="CARDNO">-->
|
||||
<!-- <el-input v-model="form.CARDNO" placeholder="这里输入定位卡号..."/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="门口门禁卡号" prop="MKMJCARD">-->
|
||||
<!-- <el-input v-model="form.MKMJCARD" placeholder="这里输入门口门禁卡号..."/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否为隐患确认人" prop="IS_HAZARDCONFIRMER">
|
||||
<el-radio-group v-model="form.IS_HAZARDCONFIRMER">
|
||||
<el-radio :label="0" value="0">否</el-radio>
|
||||
<el-radio :label="1" value="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.face_file.length > 0" label="旧人脸信息">
|
||||
<div class="slideshow">
|
||||
<div class="disContent">
|
||||
<div v-for="(item, index) in form.face_file" :key="index" class="img-div">
|
||||
<img :src="config.fileUrl + item.FILEPATH" alt="">
|
||||
<div class="disContent-hide">
|
||||
<el-tooltip class="item" effect="dark" content="预览" placement="top">
|
||||
<span class="el-icon-zoom-in yuLan">
|
||||
<viewer :images="form.face_file">
|
||||
<img :src="config.fileUrl + item.FILEPATH" alt="" class="yuLanImg">
|
||||
</viewer>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="删除" placement="top">
|
||||
<span class="Delete" @click="deleteCertificate(index)"><i class="el-icon-delete"/></span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传人脸照片">
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-upload
|
||||
ref="uploadUserAvatar"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="beforeFileUploadByFace"
|
||||
:on-change="handleChangeIMGFace"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
class="avatar-uploader"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
<div style="margin-left:20px;line-height:1.6">
|
||||
<div style="color: red;font-size: 12px">(若新上传人脸图片将覆盖旧人脸信息,不上传则不做修改)</div>
|
||||
<div style="color: red;font-size: 12px">* 图像格式:JPEG、JPG、PNG、BMP</div>
|
||||
<div style="color: red;font-size: 12px">* 图像大小:不超过1M。</div>
|
||||
<div style="color: red;font-size: 12px">* 图像分辨率:大于32×32像素,小于4096×4096像素,<br>人脸占比不低于64×64像素。</div>
|
||||
<div style="color: red;font-size: 12px">(如无合适照片请该人员登陆曹港APP中进行人脸照片采集)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门排序" prop="SORT">
|
||||
<el-input v-model="form.SORT" placeholder="这里输入部门排序..." @keyup.native="number"/>
|
||||
</el-form-item>
|
||||
|
@ -151,33 +223,6 @@
|
|||
<el-col :span="12">
|
||||
<div class="left_border_super">
|
||||
<template v-if="form.ISSTUDENT">
|
||||
<el-form-item label="身份证号" prop="USER_ID_CARD">
|
||||
<el-input v-model="form.USER_ID_CARD" placeholder="这里输入身份证号..."/>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="民族" prop="NATION">
|
||||
<el-select v-model="form.NATION" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in uesrInfoDic.minzuList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="SEX">
|
||||
<el-select v-model="form.SEX" placeholder="请选择" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in uesrInfoDic.xingbieList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="政治面貌" prop="POLITICAL_OUTLOOK">
|
||||
|
@ -366,30 +411,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="上传人脸照片">
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-upload
|
||||
ref="uploadUserAvatar"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-change="handleChangeIMG"
|
||||
:on-exceed="handleExceed"
|
||||
:on-remove="handlePictureCardRemove"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
class="avatar-uploader"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
<div style="margin-left:20px;line-height:1.6">
|
||||
<div style="color: red;font-size: 12px">* 图像格式:JPEG、JPG、PNG、BMP</div>
|
||||
<div style="color: red;font-size: 12px">* 图像大小:不超过3M。</div>
|
||||
<div style="color: red;font-size: 12px">* 图像分辨率:大于32×32像素,小于4096×4096像素,<br>人脸占比不低于64×64像素。</div>
|
||||
<div style="color: red;font-size: 12px">(如无合适照片请该人员登陆秦港APP中进行人脸照片采集)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userCerList.length > 0" label="已上传证书">
|
||||
<div class="slideshow">
|
||||
<div class="disContent">
|
||||
|
@ -441,7 +462,8 @@
|
|||
</div>
|
||||
<div class="ui-height"/>
|
||||
<div class="ui-foot">
|
||||
<el-button type="success" @click="confirm">保 存</el-button>
|
||||
<el-button v-show="ISCHECK" type="success" @click="confirm">保 存</el-button>
|
||||
<el-button v-show="!ISCHECK" type="success" @click="goCheck">校 验</el-button>
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogFormLicenseInformation" title="证照信息" width="600px">
|
||||
|
@ -732,6 +754,7 @@ export default {
|
|||
}
|
||||
}
|
||||
return {
|
||||
ISCHECK: false,
|
||||
dayTime: [],
|
||||
LevelsData: [],
|
||||
dialogFormEditDate: false,
|
||||
|
@ -775,7 +798,7 @@ export default {
|
|||
{ validator: hasUser, trigger: 'blur' }
|
||||
],
|
||||
EMAIL: [
|
||||
{ required: false, message: '请输入邮箱', trigger: 'blur' },
|
||||
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
|
||||
message: '请输入正确的邮箱'
|
||||
|
@ -878,8 +901,11 @@ export default {
|
|||
letTypeOfWorkType: 'select',
|
||||
USER_ID_CARD: '',
|
||||
PERSONNEL_TYPE: '',
|
||||
userCerList: []
|
||||
userCerList: [],
|
||||
face_file: [],
|
||||
CORPINFO_NAME: ''
|
||||
},
|
||||
IMGFILES_ID: '',
|
||||
uesrInfoDic: {
|
||||
minzuList: [], // 民族 0a0e406f27f74ee698fe9979d25f62dd
|
||||
zhengzhimianmaoList: [], // 政治面貌 6351efdd12dc4730952e5d195718e252
|
||||
|
@ -988,6 +1014,9 @@ export default {
|
|||
this.getScheduleAll()
|
||||
this.getDict()
|
||||
// this.getLearnerCategory() // 学员类型已取消
|
||||
if (this.$parent.IMGFILES_ID != '') {
|
||||
this.IMGFILES_ID = this.$parent.IMGFILES_ID
|
||||
}
|
||||
if (this.$parent.USER_ID == '') {
|
||||
this.handleAdd()
|
||||
} else {
|
||||
|
@ -995,6 +1024,41 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
goCheck() {
|
||||
if (this.form.USER_ID_CARD && this.form.USERNAME) {
|
||||
const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
|
||||
const phoneResult = phoneJudge.test(this.form.USERNAME)
|
||||
const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
const cardResult = cardJudge.test(this.form.USER_ID_CARD)
|
||||
if (phoneResult && cardResult) {
|
||||
console.log('格式校验通过')
|
||||
requestFN(
|
||||
'user/goCheck',
|
||||
{
|
||||
CARD_NO: this.form.USER_ID_CARD,
|
||||
USER_ID: this.form.USER_ID,
|
||||
USERNAME: this.form.USERNAME
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message.success('验证通过')
|
||||
this.ISCHECK = true
|
||||
} else {
|
||||
this.$message.error('验证失败,请确认身份证号与手机号是否正确')
|
||||
this.ISCHECK = false
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
this.ISCHECK = false
|
||||
})
|
||||
} else {
|
||||
this.ISCHECK = false
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请确认身份证号与手机号后进行校验')
|
||||
this.ISCHECK = false
|
||||
}
|
||||
},
|
||||
getScheduleAll() {
|
||||
requestFN(
|
||||
'schedule/getData',
|
||||
|
@ -1260,6 +1324,7 @@ export default {
|
|||
this.form = { ...this.form, ...data.pd, ...data.licenseinfor }
|
||||
// this.form = Object.assign({}, this.form, data.pd, data.licenseinfor) // copy obj
|
||||
this.form.userCerList = data.userCerList
|
||||
this.form.face_file = data.face_file
|
||||
if (this.form.ROLE_ID != null && this.form.ROLE_ID != '') {
|
||||
// 将字符串转换成数组,此时是字符串数组
|
||||
console.log(typeof (this.form.ROLE_ID), '00000000')
|
||||
|
@ -1275,7 +1340,7 @@ export default {
|
|||
}
|
||||
this.form.ROLE_ID = arrString
|
||||
// this.form.PASSWORD = 'Aa@123456789'
|
||||
if (this.form.USER_ID_CARD || this.form.IS_ONLINELEARNING == '1') {
|
||||
if (this.form.IS_ONLINELEARNING == '1') {
|
||||
this.$set(this.form, 'ISSTUDENT', true)
|
||||
}
|
||||
this.form.USERAVATARURL = this.form.USERAVATARURL_CONVERT
|
||||
|
@ -1309,10 +1374,84 @@ export default {
|
|||
this.$forceUpdate()
|
||||
return false
|
||||
},
|
||||
goPush(row) {
|
||||
requestFN(
|
||||
'user/goPush',
|
||||
{
|
||||
USER_ID: row.USER_ID,
|
||||
STATUS: row.STATUS,
|
||||
BZ: row.BZ,
|
||||
SKIN: row.SKIN,
|
||||
PHONE: row.PHONE,
|
||||
NUMBER: row.NUMBER,
|
||||
ISMAIN: row.ISMAIN,
|
||||
OPENID: row.APPID,
|
||||
SORT: row.SORT,
|
||||
LEARNERCATEGORY: row.LEARNERCATEGORY,
|
||||
USERAVATARPREFIX: row.USERAVATARPREFIX,
|
||||
USERAVATARURL: row.USERAVATARURL,
|
||||
SHIFTDUTYONE: row.SHIFTDUTYONE,
|
||||
SHIFTDUTYTWO: row.SHIFTDUTYTWO,
|
||||
DURATION: row.DURATION,
|
||||
WORKSTATUS: row.WORKSTATUS,
|
||||
WORKPERIOD: row.WORKPERIOD,
|
||||
PERSONNEL_TYPE: row.PERSONNEL_TYPE,
|
||||
TITLE: row.TITLE,
|
||||
ISSTATE: row.ISSTATE,
|
||||
INCUMBENCY: row.INCUMBENCY,
|
||||
WORKING_DATE: row.WORKING_DATE,
|
||||
ENTRY_DATE: row.ENTRY_DATE,
|
||||
TYPE_OF_WORK: row.TYPE_OF_WORK,
|
||||
DUTIES: row.DUTIES,
|
||||
DEGREE_OF_EDUCATION: row.DEGREE_OF_EDUCATION,
|
||||
DATE_OF_BIRTH: row.DATE_OF_BIRTH,
|
||||
POLITICAL_OUTLOOK: row.POLITICAL_OUTLOOK,
|
||||
CARD_NO: row.CARD_NO,
|
||||
USERNAME: row.USERNAME,
|
||||
NAME: row.NAME,
|
||||
CORPINFO_ID: row.CORPINFO_ID,
|
||||
CORPINFO_NAME: row.CORPINFO_NAME || '',
|
||||
DEPARTMENT_ID: row.DEPARTMENT_ID,
|
||||
DEPARTMENT_NAME: row.DEPARTMENT_NAME,
|
||||
IMGFILES_ID: row.IMGFILES_ID,
|
||||
FOREIGN_KEY: row.FOREIGN_KEY,
|
||||
FILEPATH: row.FILEPATH,
|
||||
EMAIL: row.EMAIL || '',
|
||||
CARD_TYPE: '111',
|
||||
CARD_TYPE_NAME: '身份证',
|
||||
NATION: row.NATION || '',
|
||||
SEX: row.SEX || '',
|
||||
USER_TYPE: '1',
|
||||
ISDELETE: row.ISDELETE
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message.success('推送成功')
|
||||
this.$parent.activeName = 'List'
|
||||
} else {
|
||||
this.$message.error('推送失败,' + data.msg)
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
this.$parent.activeName = 'List'
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
// debugger
|
||||
// this.uploadImgByZhengshu(this.form.USER_ID) // 保存证书信息
|
||||
this.$refs.form.validate(valid => {
|
||||
if (this.$refs.uploadUserAvatar.uploadFiles.length < 1 && this.form.face_file.length < 1) {
|
||||
this.$message({
|
||||
message: '请上传人脸照片',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
let isUpdateFace = '0'
|
||||
if (this.$refs.uploadUserAvatar.uploadFiles.length > 0) {
|
||||
isUpdateFace = '1'
|
||||
}
|
||||
if (this.form.SHIFTDUTYONE) {
|
||||
// var
|
||||
if (!this.form.SHIFTDUTYTWO || this.selectPeriod.DURATION == undefined) {
|
||||
|
@ -1331,11 +1470,10 @@ export default {
|
|||
// return false
|
||||
// }
|
||||
if (valid) {
|
||||
console.log(this.selectPeriod.WORKSTATUS)
|
||||
console.log(this.form.WORKSTATUS)
|
||||
this.form.WORKSTATUS = this.selectPeriod.WORKSTATUS
|
||||
this.form.DURATION = this.selectPeriod.DURATION
|
||||
this.form.WORKPERIOD = this.selectPeriod.WORKPERIOD
|
||||
console.log(this.form)
|
||||
if (this.dialogType == 'saveUser') {
|
||||
this.form.ROLE_ID = this.form.ROLE_ID.join(',')
|
||||
this.listLoading = true
|
||||
|
@ -1346,11 +1484,10 @@ export default {
|
|||
this.listLoading = false
|
||||
if (this.form.ISSTUDENT) {
|
||||
this.uploadImgByZhengshu(data.USER_ID)
|
||||
this.uploadImgByFace(data.USER_ID)
|
||||
this.$parent.activeName = 'List'
|
||||
} else {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.uploadImgByFace(data.USER_ID)
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}).catch((e) => {
|
||||
|
@ -1370,17 +1507,20 @@ export default {
|
|||
this.listLoading = true
|
||||
requestFN(
|
||||
'/user/' + this.dialogType,
|
||||
this.form
|
||||
{
|
||||
IMGFILES_ID: this.IMGFILES_ID, // 旧人脸图片
|
||||
isUpdateFace: isUpdateFace,
|
||||
...this.form
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
if (this.form.ISSTUDENT) {
|
||||
this.uploadImgByZhengshu(this.form.USER_ID)
|
||||
this.uploadImgByFace(this.form.USER_ID)
|
||||
this.goPush(this.form)
|
||||
} else {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$parent.activeName = 'List'
|
||||
this.uploadImgByFace(this.form.USER_ID)
|
||||
this.goPush(this.form)
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
|
@ -1391,17 +1531,20 @@ export default {
|
|||
this.listLoading = true
|
||||
requestFN(
|
||||
'/user/' + this.dialogType,
|
||||
this.form
|
||||
{
|
||||
IMGFILES_ID: this.IMGFILES_ID, // 旧人脸图片
|
||||
isUpdateFace: isUpdateFace,
|
||||
...this.form
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
if (this.form.ISSTUDENT) {
|
||||
this.uploadImgByZhengshu(this.form.USER_ID)
|
||||
this.uploadImgByFace(this.form.USER_ID)
|
||||
this.goPush(this.form)
|
||||
} else {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$parent.activeName = 'List'
|
||||
this.uploadImgByFace(this.form.USER_ID)
|
||||
this.goPush(this.form)
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
|
@ -1413,21 +1556,6 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
/* 用户头像处理 Begin */
|
||||
handleChangeIMG(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.splice(0, fileList.length)
|
||||
} else {
|
||||
this.getBase64(file.raw).then(res => {
|
||||
this.form.USERAVATARPREFIX = res.substring(0, res.indexOf('base64,') + 7)
|
||||
this.form.USERAVATARURL = res.substring(res.indexOf('base64,') + 7)
|
||||
this.form.USERAVATARURL_CONVERT = res.substring(res.indexOf('base64,') + 7)
|
||||
})
|
||||
}
|
||||
},
|
||||
getBase64(file) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
const reader = new FileReader()
|
||||
|
@ -1513,6 +1641,12 @@ export default {
|
|||
}
|
||||
},
|
||||
getDict: function() {
|
||||
if (this.uesrInfoDic.minzuList.length == 0) {
|
||||
this.getDicListByPID('0a0e406f27f74ee698fe9979d25f62dd', '', 'minzuList')
|
||||
}
|
||||
if (this.uesrInfoDic.xingbieList.length == 0) {
|
||||
this.getDicListByPID('21501808bbc344d593fbf9ccfe6c4531', '', 'xingbieList')
|
||||
}
|
||||
requestFN(
|
||||
'/shiftworkrules/listAll',
|
||||
{
|
||||
|
@ -1542,9 +1676,6 @@ export default {
|
|||
},
|
||||
ISSTUDENTCK() {
|
||||
if (this.form.ISSTUDENT || this.dialogFormLicenseInformation) {
|
||||
if (this.uesrInfoDic.minzuList.length == 0) {
|
||||
this.getDicListByPID('0a0e406f27f74ee698fe9979d25f62dd', '', 'minzuList')
|
||||
}
|
||||
if (this.uesrInfoDic.zhengzhimianmaoList.length == 0) {
|
||||
this.getDicListByPID('6351efdd12dc4730952e5d195718e252', '', 'zhengzhimianmaoList')
|
||||
}
|
||||
|
@ -1557,9 +1688,6 @@ export default {
|
|||
if (this.uesrInfoDic.zaizhiqingkuangList.length == 0) {
|
||||
this.getDicListByPID('548764b5d4bf4bd7a18ef88274ef49e4', '', 'zaizhiqingkuangList')
|
||||
}
|
||||
if (this.uesrInfoDic.xingbieList.length == 0) {
|
||||
this.getDicListByPID('21501808bbc344d593fbf9ccfe6c4531', '', 'xingbieList')
|
||||
}
|
||||
this.getDicListByPID('09e36ac01e9540f8bc84eab1c1a78754', '', 'zhiwuList')
|
||||
this.getDicListByPID('945a6b10e59946078b500f0fbafa8679', '', 'zhichengList')
|
||||
this.getDicListByPID('55484e491a5e442d839c4595380713ec', '', 'gongzhongList')
|
||||
|
@ -1637,6 +1765,21 @@ export default {
|
|||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
/* 用户头像处理 Begin */
|
||||
handleChangeIMG(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.splice(0, fileList.length)
|
||||
} else {
|
||||
this.getBase64(file.raw).then(res => {
|
||||
this.form.USERAVATARPREFIX = res.substring(0, res.indexOf('base64,') + 7)
|
||||
this.form.USERAVATARURL = res.substring(res.indexOf('base64,') + 7)
|
||||
this.form.USERAVATARURL_CONVERT = res.substring(res.indexOf('base64,') + 7)
|
||||
})
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
|
||||
},
|
||||
|
@ -1645,6 +1788,14 @@ export default {
|
|||
this.form.USERAVATARURL = ''
|
||||
this.form.USERAVATARURL_CONVERT = ''
|
||||
},
|
||||
handleChangeIMGFace(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.pop()
|
||||
}
|
||||
},
|
||||
handleChangeIMGZhengshu(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
|
@ -1656,6 +1807,9 @@ export default {
|
|||
beforeFileUploadByZhengshu(file) {
|
||||
this.certificate_files.push(file)
|
||||
},
|
||||
beforeFileUploadByFace(file) {
|
||||
this.form.face_file.push(file)
|
||||
},
|
||||
uploadImgByZhengshu(userId) {
|
||||
this.$refs.upload.submit()
|
||||
if (this.certificate_files.length > 0) {
|
||||
|
@ -1667,6 +1821,25 @@ export default {
|
|||
}
|
||||
formData.append('FOREIGN_KEY', userId)
|
||||
formData.append('TYPE', 18)
|
||||
upload(
|
||||
'/imgfiles/add',
|
||||
formData
|
||||
).then((data) => {
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
uploadImgByFace(userId) {
|
||||
this.$refs.uploadUserAvatar.submit()
|
||||
if (this.form.face_file.length > 0) {
|
||||
const formData = new FormData()
|
||||
for (var i = 0; i < this.form.face_file.length; i++) {
|
||||
if (this.form.face_file[i]) {
|
||||
formData.append('FFILE', this.form.face_file[i])
|
||||
}
|
||||
}
|
||||
formData.append('FOREIGN_KEY', userId)
|
||||
formData.append('TYPE', 30)
|
||||
upload(
|
||||
'/imgfiles/add',
|
||||
formData
|
||||
|
@ -1675,7 +1848,6 @@ export default {
|
|||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$parent.activeName = 'List'
|
||||
}).catch((e) => {
|
||||
})
|
||||
} else {
|
||||
|
@ -1683,7 +1855,6 @@ export default {
|
|||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
},
|
||||
deleteCertificate(index) {
|
||||
|
|
|
@ -92,8 +92,9 @@
|
|||
<el-button v-show="edit" type="info" icon="el-icon-message" size="mini" @click="Scheduling(row,row.USER_ID,row.SHIFTDUTYTWO)">排班</el-button>
|
||||
<el-button v-show="edit" type="info" icon="el-icon-message" size="mini" @click="pageShowDate(row,row.USER_ID,row.SHIFTDUTYTWO)">排班表</el-button>
|
||||
</template>
|
||||
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.USER_ID)">编辑</el-button>
|
||||
<el-button v-show="del && row.ISMAIN=='0'" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.USER_ID, row.NAME)">删除</el-button>
|
||||
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button v-show="del && row.ISMAIN=='0'" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.USER_ID, row.NAME, row.ISPUSH)">删除</el-button>
|
||||
<el-button v-if="row.ISPUSH == '0'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)">推送</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -441,6 +442,67 @@ export default {
|
|||
// this.getLearnerCategory() // 学员类型已取消
|
||||
},
|
||||
methods: {
|
||||
goPush(row) {
|
||||
requestFN(
|
||||
'user/goPush',
|
||||
{
|
||||
USER_ID: row.USER_ID,
|
||||
STATUS: row.STATUS,
|
||||
BZ: row.BZ,
|
||||
SKIN: row.SKIN,
|
||||
PHONE: row.PHONE,
|
||||
NUMBER: row.NUMBER,
|
||||
ISMAIN: row.ISMAIN,
|
||||
OPENID: row.APPID,
|
||||
SORT: row.SORT,
|
||||
LEARNERCATEGORY: row.LEARNERCATEGORY,
|
||||
USERAVATARPREFIX: row.USERAVATARPREFIX,
|
||||
USERAVATARURL: row.USERAVATARURL,
|
||||
SHIFTDUTYONE: row.SHIFTDUTYONE,
|
||||
SHIFTDUTYTWO: row.SHIFTDUTYTWO,
|
||||
DURATION: row.DURATION,
|
||||
WORKSTATUS: row.WORKSTATUS,
|
||||
WORKPERIOD: row.WORKPERIOD,
|
||||
PERSONNEL_TYPE: row.PERSONNEL_TYPE,
|
||||
TITLE: row.TITLE,
|
||||
ISSTATE: row.ISSTATE,
|
||||
INCUMBENCY: row.INCUMBENCY,
|
||||
WORKING_DATE: row.WORKING_DATE,
|
||||
ENTRY_DATE: row.ENTRY_DATE,
|
||||
TYPE_OF_WORK: row.TYPE_OF_WORK,
|
||||
DUTIES: row.DUTIES,
|
||||
DEGREE_OF_EDUCATION: row.DEGREE_OF_EDUCATION,
|
||||
DATE_OF_BIRTH: row.DATE_OF_BIRTH,
|
||||
POLITICAL_OUTLOOK: row.POLITICAL_OUTLOOK,
|
||||
CARD_NO: row.CARD_NO,
|
||||
USERNAME: row.USERNAME,
|
||||
NAME: row.NAME,
|
||||
CORPINFO_ID: row.CORPINFO_ID,
|
||||
CORPINFO_NAME: row.CORPINFO_NAME || '',
|
||||
DEPARTMENT_ID: row.DEPARTMENT_ID,
|
||||
DEPARTMENT_NAME: row.DEPARTMENT_NAME,
|
||||
IMGFILES_ID: row.IMGFILES_ID,
|
||||
FOREIGN_KEY: row.FOREIGN_KEY,
|
||||
FILEPATH: row.FILEPATH,
|
||||
EMAIL: row.EMAIL || '',
|
||||
CARD_TYPE: '111',
|
||||
CARD_TYPE_NAME: '身份证',
|
||||
NATION: row.NATION || '',
|
||||
SEX: row.SEX || '',
|
||||
USER_TYPE: '1',
|
||||
ISDELETE: row.ISDELETE
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message.success('推送成功')
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error('推送失败,' + data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// schedulingChange(e) {
|
||||
// // console.log(e)
|
||||
// // this.PARENTID = e
|
||||
|
@ -669,8 +731,9 @@ export default {
|
|||
this.$parent.activeName = 'Edit'
|
||||
this.$parent.USER_ID = ''
|
||||
},
|
||||
handleEdit(USER_ID) {
|
||||
this.$parent.USER_ID = USER_ID
|
||||
handleEdit(row) {
|
||||
this.$parent.USER_ID = row.USER_ID
|
||||
this.$parent.IMGFILES_ID = row.IMGFILES_ID
|
||||
this.$parent.activeName = 'Edit'
|
||||
},
|
||||
getQuery() {
|
||||
|
@ -732,7 +795,8 @@ export default {
|
|||
SHIFTDUTYONE: this.SHIFTDUTYONE,
|
||||
SHIFTDUTYTWO: this.SHIFTDUTYTWO,
|
||||
IS_HAZARDCONFIRMER: this.IS_HAZARDCONFIRMER,
|
||||
USER_ID: this.USER_ID
|
||||
USER_ID: this.USER_ID,
|
||||
ISPUSH: '1'
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
|
@ -862,7 +926,7 @@ export default {
|
|||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
handleDelete(id, name) {
|
||||
handleDelete(id, name, ispush) {
|
||||
this.$confirm('确定要删除[' + name + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
@ -872,7 +936,8 @@ export default {
|
|||
requestFN(
|
||||
'/user/deleteUser',
|
||||
{
|
||||
USER_ID: id
|
||||
USER_ID: id,
|
||||
ISPUSH: ispush
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName=='List'" ref="list" />
|
||||
<Edit v-if="activeName=='Edit'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import Edit from './components/edit'
|
||||
export default {
|
||||
components: {
|
||||
List: List,
|
||||
Edit: Edit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
USER_ID: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeName(val) {
|
||||
if (val == 'List') {
|
||||
this.$refs.list.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -73,7 +73,7 @@
|
|||
<el-tag v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="380">
|
||||
<el-table-column label="操作" width="450">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
v-show="true"
|
||||
|
@ -97,6 +97,14 @@
|
|||
size="mini"
|
||||
@click="handleDelete(row)">删除
|
||||
</el-button>
|
||||
<!-- 新增按钮:检查记录二维码 -->
|
||||
<el-button
|
||||
class="tiffany-btn"
|
||||
icon="el-icon-document"
|
||||
type="info"
|
||||
size="mini"
|
||||
@click="handleShowRecordQr(row)">检查记录二维码
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -143,6 +151,22 @@
|
|||
<el-button v-print="'#printTest'" type="primary">打 印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogRecordFormShow" title="查看检查记录二维码" width="680px" class="top-dialog">
|
||||
<div id="recordPrintTest" style="border: 1px solid #fff;">
|
||||
<div class="level-title" style="margin-top:20px">
|
||||
<h1>检查记录二维码</h1>
|
||||
</div>
|
||||
<div class="table-qrcode">
|
||||
<vue-qr :text="recordQrcodeStr" :margin="0" :size="300" color-dark="#000" color-light="#fff" />
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogRecordFormShow = false">关 闭</el-button>
|
||||
<el-button v-print="'#recordPrintTest'" type="primary">打 印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-loading ="listLoading" :visible.sync="dialogEditUser" title="批量修改负责人" width="800px">
|
||||
<el-form ref="firefightingBatchEditDept" :model="dialogEditUserForm" :rules="dialogEditUserRules" label-width="150px">
|
||||
<el-row>
|
||||
|
@ -157,7 +181,6 @@
|
|||
<el-button @click="dialogEditUser = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogEditUserConfirm">确 定</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -171,9 +194,7 @@ import waves from '@/directive/waves' // waves directive
|
|||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree, vueQr },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
|
@ -181,7 +202,9 @@ export default {
|
|||
addBtnType: true,
|
||||
listLoading: true,
|
||||
dialogFormShow: false,
|
||||
dialogRecordFormShow: false,
|
||||
qrcodeStr: '',
|
||||
recordQrcodeStr: '',
|
||||
qrInfo: {},
|
||||
add: false,
|
||||
del: false,
|
||||
|
@ -246,38 +269,36 @@ export default {
|
|||
handleShowQr(ROW) {
|
||||
this.dialogFormShow = true
|
||||
this.qrInfo = ROW
|
||||
// this.qrcodeStr = this.config.weburlWaiwang + 'static/qrcode/views/bsbw/point_list.html?id=' + ROW.FIRE_POINT_ID
|
||||
this.qrcodeStr = this.config.weburlWaiwang + 'static/qrcode/views/bsbw/point_list.html?id=' + ROW.FIRE_POINT_ID
|
||||
},
|
||||
handleShowRecordQr(ROW) {
|
||||
this.dialogRecordFormShow = true
|
||||
const json = {
|
||||
MANAGER_TYPE: 'fireListManager',
|
||||
FIRE_POINT_ID: ROW.FIRE_POINT_ID
|
||||
USER_ID: ROW.USER_ID,
|
||||
DEPARTMENT_ID: ROW.DEPARTMENT_ID
|
||||
}
|
||||
const jsonStr = JSON.stringify(json)
|
||||
this.qrcodeStr = jsonStr
|
||||
this.recordQrcodeStr = JSON.stringify(json)
|
||||
},
|
||||
handleEdit(FIRE_POINT_ID) {
|
||||
this.$parent.FIRE_POINT_ID = FIRE_POINT_ID
|
||||
this.$parent.activeName = 'Edit'
|
||||
},
|
||||
selectable(row, index) {
|
||||
// return row.DEVICE_COUNT == 0
|
||||
return true
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.FIRE_POINT_ID
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'Edit'
|
||||
this.$parent.FIRE_POINT_ID = ''
|
||||
this.$parent.FIRE_POINT_CODE = ''
|
||||
this.$parent.FIRE_POINT_NAME = ''
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
|
@ -298,7 +319,8 @@ export default {
|
|||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
},
|
||||
goKeyReset() {
|
||||
this.FIRE_POINT_NAME = ''
|
||||
this.FIRE_POINT_CODE = ''
|
||||
this.IS_PUNCTUATION = ''
|
||||
|
@ -344,7 +366,6 @@ export default {
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 部门列表树
|
||||
getTreeData() {
|
||||
requestFN(
|
||||
'/department/listTreeV2',
|
||||
|
@ -354,7 +375,6 @@ export default {
|
|||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 批量修改负责人
|
||||
handleEditUser(row) {
|
||||
this.editDataIds = []
|
||||
if (row.FIRE_POINT_ID) {
|
||||
|
@ -504,15 +524,15 @@ export default {
|
|||
}
|
||||
</script>
|
||||
|
||||
<style scoped >
|
||||
<style scoped>
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
.table-qrcode{
|
||||
.table-qrcode {
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
width: 100%;
|
||||
|
|
|
@ -101,6 +101,13 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="hiddenVueType !='ignore'" :span="4">
|
||||
<el-form-item label="是否相关方">
|
||||
<el-select v-model="condform.isrelevant" placeholder="请选择" style="width: 100%;">
|
||||
<el-option v-for="item in isrelevantList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
|
@ -271,7 +278,8 @@ export default {
|
|||
state: '', // 隐患状态
|
||||
hiddenpart: '', // 隐患部位
|
||||
hiddenType: '', // 隐患类型
|
||||
creatorUserDept: ''// 隐患发现部门
|
||||
creatorUserDept: '', // 隐患发现部门
|
||||
isrelevant: '' // 是否相关方
|
||||
},
|
||||
/** 条件中的字段,没有放在form表单中,是因为怕动态加载中出现问题 **/
|
||||
sourceList: [
|
||||
|
@ -281,6 +289,10 @@ export default {
|
|||
{ ID: '5', NAME: '安全环保检查(企业端)' },
|
||||
{ ID: '6', NAME: '消防检查' }
|
||||
],
|
||||
isrelevantList: [
|
||||
{ ID: '1', NAME: '是' },
|
||||
{ ID: '2', NAME: '否' }
|
||||
],
|
||||
statusList: [
|
||||
{ ID: '1', NAME: '未整改' },
|
||||
{ ID: '2', NAME: '已整改' },
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<div class="iframe-container">
|
||||
<iframe
|
||||
:src="'http://192.168.42.57:8080/QinHuangDao'"
|
||||
width="100%"
|
||||
height="100%"
|
||||
allowfullscreen
|
||||
style="overflow-y:hidden;overflow-x:hidden;"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.iframe-container {
|
||||
position: fixed;
|
||||
top: 10;
|
||||
left: 10;
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue