Merge remote-tracking branch 'origin/dev' into dev

liujun-2024-09-05-九公司人员定位
guoyuepeng 2024-09-04 11:23:59 +08:00
commit 605feeceb8
9 changed files with 3866 additions and 131 deletions

View File

@ -85,8 +85,7 @@ export default {
rules: { rules: {
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }], NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
VALIDITYTIME: [{ required: true, message: '证书有效期不能为空', trigger: 'blur' }], VALIDITYTIME: [{ required: true, message: '证书有效期不能为空', trigger: 'blur' }],
NUMBER: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }], NUMBER: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }]
FILE: [{ required: true, message: '图片不能为空', trigger: 'blur' }]
} }
} }
}, },
@ -191,6 +190,8 @@ export default {
if (!isImage) { if (!isImage) {
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!') this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
fileList.pop() fileList.pop()
} else {
this.beforeFileUpload(file)
} }
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {

View File

@ -42,7 +42,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="用户名" prop="USERNAME"> <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"> <a style="color: red">
<span>如果修改手机号登录密码则会变成初始密码Aa@123456789</span></a> <span>如果修改手机号登录密码则会变成初始密码Aa@123456789</span></a>
</el-form-item> </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> <el-button v-if="form.PERSON_TYPE == '主要负责人' || form.PERSON_TYPE == '安全管理人员' || form.PERSON_TYPE == '特种作业人员'" plain type="success" @click="changePersonType"></el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="定位卡号" prop="CARDNO"> <el-form-item label="身份证号" prop="USER_ID_CARD">
<el-input v-model="form.CARDNO" placeholder="这里输入定位卡号..."/> <el-input v-model="form.USER_ID_CARD" placeholder="这里输入身份证号..." @change="goCheck()"/>
</el-form-item> </el-form-item>
<el-form-item label="门口门禁卡号" prop="MKMJCARD"> <el-row :gutter="20">
<el-input v-model="form.MKMJCARD" placeholder="这里输入门口门禁卡号..."/> <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-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-form-item label="是否为隐患确认人" prop="IS_HAZARDCONFIRMER">
<el-radio-group v-model="form.IS_HAZARDCONFIRMER"> <el-radio-group v-model="form.IS_HAZARDCONFIRMER">
<el-radio :label="0" value="0"></el-radio> <el-radio :label="0" value="0"></el-radio>
<el-radio :label="1" value="1"></el-radio> <el-radio :label="1" value="1"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </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">* 图像格式JPEGJPGPNGBMP</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-form-item label="部门排序" prop="SORT">
<el-input v-model="form.SORT" placeholder="这里输入部门排序..." @keyup.native="number"/> <el-input v-model="form.SORT" placeholder="这里输入部门排序..." @keyup.native="number"/>
</el-form-item> </el-form-item>
@ -151,33 +223,6 @@
<el-col :span="12"> <el-col :span="12">
<div class="left_border_super"> <div class="left_border_super">
<template v-if="form.ISSTUDENT"> <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-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="政治面貌" prop="POLITICAL_OUTLOOK"> <el-form-item label="政治面貌" prop="POLITICAL_OUTLOOK">
@ -366,30 +411,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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">* 图像格式JPEGJPGPNGBMP</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="已上传证书"> <el-form-item v-if="form.userCerList.length > 0" label="已上传证书">
<div class="slideshow"> <div class="slideshow">
<div class="disContent"> <div class="disContent">
@ -441,7 +462,8 @@
</div> </div>
<div class="ui-height"/> <div class="ui-height"/>
<div class="ui-foot"> <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> <el-button plain type="info" @click="goBack"> </el-button>
</div> </div>
<el-dialog :visible.sync="dialogFormLicenseInformation" title="证照信息" width="600px"> <el-dialog :visible.sync="dialogFormLicenseInformation" title="证照信息" width="600px">
@ -732,6 +754,7 @@ export default {
} }
} }
return { return {
ISCHECK: false,
dayTime: [], dayTime: [],
LevelsData: [], LevelsData: [],
dialogFormEditDate: false, dialogFormEditDate: false,
@ -775,7 +798,7 @@ export default {
{ validator: hasUser, trigger: 'blur' } { validator: hasUser, trigger: 'blur' }
], ],
EMAIL: [ EMAIL: [
{ required: false, message: '请输入邮箱', trigger: 'blur' }, { required: true, message: '请输入邮箱', trigger: 'blur' },
{ {
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/, pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
message: '请输入正确的邮箱' message: '请输入正确的邮箱'
@ -878,8 +901,11 @@ export default {
letTypeOfWorkType: 'select', letTypeOfWorkType: 'select',
USER_ID_CARD: '', USER_ID_CARD: '',
PERSONNEL_TYPE: '', PERSONNEL_TYPE: '',
userCerList: [] userCerList: [],
face_file: [],
CORPINFO_NAME: ''
}, },
IMGFILES_ID: '',
uesrInfoDic: { uesrInfoDic: {
minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd
zhengzhimianmaoList: [], // 6351efdd12dc4730952e5d195718e252 zhengzhimianmaoList: [], // 6351efdd12dc4730952e5d195718e252
@ -988,6 +1014,9 @@ export default {
this.getScheduleAll() this.getScheduleAll()
this.getDict() this.getDict()
// this.getLearnerCategory() // // this.getLearnerCategory() //
if (this.$parent.IMGFILES_ID != '') {
this.IMGFILES_ID = this.$parent.IMGFILES_ID
}
if (this.$parent.USER_ID == '') { if (this.$parent.USER_ID == '') {
this.handleAdd() this.handleAdd()
} else { } else {
@ -995,6 +1024,41 @@ export default {
} }
}, },
methods: { 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() { getScheduleAll() {
requestFN( requestFN(
'schedule/getData', 'schedule/getData',
@ -1260,6 +1324,7 @@ export default {
this.form = { ...this.form, ...data.pd, ...data.licenseinfor } this.form = { ...this.form, ...data.pd, ...data.licenseinfor }
// this.form = Object.assign({}, this.form, data.pd, data.licenseinfor) // copy obj // this.form = Object.assign({}, this.form, data.pd, data.licenseinfor) // copy obj
this.form.userCerList = data.userCerList this.form.userCerList = data.userCerList
this.form.face_file = data.face_file
if (this.form.ROLE_ID != null && this.form.ROLE_ID != '') { if (this.form.ROLE_ID != null && this.form.ROLE_ID != '') {
// //
console.log(typeof (this.form.ROLE_ID), '00000000') console.log(typeof (this.form.ROLE_ID), '00000000')
@ -1275,7 +1340,7 @@ export default {
} }
this.form.ROLE_ID = arrString this.form.ROLE_ID = arrString
// this.form.PASSWORD = 'Aa@123456789' // 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.$set(this.form, 'ISSTUDENT', true)
} }
this.form.USERAVATARURL = this.form.USERAVATARURL_CONVERT this.form.USERAVATARURL = this.form.USERAVATARURL_CONVERT
@ -1309,10 +1374,84 @@ export default {
this.$forceUpdate() this.$forceUpdate()
return false 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() { confirm() {
// debugger // debugger
// this.uploadImgByZhengshu(this.form.USER_ID) // // this.uploadImgByZhengshu(this.form.USER_ID) //
this.$refs.form.validate(valid => { 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) { if (this.form.SHIFTDUTYONE) {
// var // var
if (!this.form.SHIFTDUTYTWO || this.selectPeriod.DURATION == undefined) { if (!this.form.SHIFTDUTYTWO || this.selectPeriod.DURATION == undefined) {
@ -1331,11 +1470,10 @@ export default {
// return false // return false
// } // }
if (valid) { if (valid) {
console.log(this.selectPeriod.WORKSTATUS)
console.log(this.form.WORKSTATUS)
this.form.WORKSTATUS = this.selectPeriod.WORKSTATUS this.form.WORKSTATUS = this.selectPeriod.WORKSTATUS
this.form.DURATION = this.selectPeriod.DURATION this.form.DURATION = this.selectPeriod.DURATION
this.form.WORKPERIOD = this.selectPeriod.WORKPERIOD this.form.WORKPERIOD = this.selectPeriod.WORKPERIOD
console.log(this.form)
if (this.dialogType == 'saveUser') { if (this.dialogType == 'saveUser') {
this.form.ROLE_ID = this.form.ROLE_ID.join(',') this.form.ROLE_ID = this.form.ROLE_ID.join(',')
this.listLoading = true this.listLoading = true
@ -1346,11 +1484,10 @@ export default {
this.listLoading = false this.listLoading = false
if (this.form.ISSTUDENT) { if (this.form.ISSTUDENT) {
this.uploadImgByZhengshu(data.USER_ID) this.uploadImgByZhengshu(data.USER_ID)
this.uploadImgByFace(data.USER_ID)
this.$parent.activeName = 'List'
} else { } else {
this.$message({ this.uploadImgByFace(data.USER_ID)
message: '操作成功',
type: 'success'
})
this.$parent.activeName = 'List' this.$parent.activeName = 'List'
} }
}).catch((e) => { }).catch((e) => {
@ -1370,17 +1507,20 @@ export default {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/user/' + this.dialogType, '/user/' + this.dialogType,
this.form {
IMGFILES_ID: this.IMGFILES_ID, //
isUpdateFace: isUpdateFace,
...this.form
}
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
if (this.form.ISSTUDENT) { if (this.form.ISSTUDENT) {
this.uploadImgByZhengshu(this.form.USER_ID) this.uploadImgByZhengshu(this.form.USER_ID)
this.uploadImgByFace(this.form.USER_ID)
this.goPush(this.form)
} else { } else {
this.$message({ this.uploadImgByFace(this.form.USER_ID)
message: '操作成功', this.goPush(this.form)
type: 'success'
})
this.$parent.activeName = 'List'
} }
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
@ -1391,17 +1531,20 @@ export default {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/user/' + this.dialogType, '/user/' + this.dialogType,
this.form {
IMGFILES_ID: this.IMGFILES_ID, //
isUpdateFace: isUpdateFace,
...this.form
}
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
if (this.form.ISSTUDENT) { if (this.form.ISSTUDENT) {
this.uploadImgByZhengshu(this.form.USER_ID) this.uploadImgByZhengshu(this.form.USER_ID)
this.uploadImgByFace(this.form.USER_ID)
this.goPush(this.form)
} else { } else {
this.$message({ this.uploadImgByFace(this.form.USER_ID)
message: '操作成功', this.goPush(this.form)
type: 'success'
})
this.$parent.activeName = 'List'
} }
}).catch((e) => { }).catch((e) => {
this.listLoading = false 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) { getBase64(file) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
const reader = new FileReader() const reader = new FileReader()
@ -1513,6 +1641,12 @@ export default {
} }
}, },
getDict: function() { getDict: function() {
if (this.uesrInfoDic.minzuList.length == 0) {
this.getDicListByPID('0a0e406f27f74ee698fe9979d25f62dd', '', 'minzuList')
}
if (this.uesrInfoDic.xingbieList.length == 0) {
this.getDicListByPID('21501808bbc344d593fbf9ccfe6c4531', '', 'xingbieList')
}
requestFN( requestFN(
'/shiftworkrules/listAll', '/shiftworkrules/listAll',
{ {
@ -1542,9 +1676,6 @@ export default {
}, },
ISSTUDENTCK() { ISSTUDENTCK() {
if (this.form.ISSTUDENT || this.dialogFormLicenseInformation) { if (this.form.ISSTUDENT || this.dialogFormLicenseInformation) {
if (this.uesrInfoDic.minzuList.length == 0) {
this.getDicListByPID('0a0e406f27f74ee698fe9979d25f62dd', '', 'minzuList')
}
if (this.uesrInfoDic.zhengzhimianmaoList.length == 0) { if (this.uesrInfoDic.zhengzhimianmaoList.length == 0) {
this.getDicListByPID('6351efdd12dc4730952e5d195718e252', '', 'zhengzhimianmaoList') this.getDicListByPID('6351efdd12dc4730952e5d195718e252', '', 'zhengzhimianmaoList')
} }
@ -1557,9 +1688,6 @@ export default {
if (this.uesrInfoDic.zaizhiqingkuangList.length == 0) { if (this.uesrInfoDic.zaizhiqingkuangList.length == 0) {
this.getDicListByPID('548764b5d4bf4bd7a18ef88274ef49e4', '', 'zaizhiqingkuangList') this.getDicListByPID('548764b5d4bf4bd7a18ef88274ef49e4', '', 'zaizhiqingkuangList')
} }
if (this.uesrInfoDic.xingbieList.length == 0) {
this.getDicListByPID('21501808bbc344d593fbf9ccfe6c4531', '', 'xingbieList')
}
this.getDicListByPID('09e36ac01e9540f8bc84eab1c1a78754', '', 'zhiwuList') this.getDicListByPID('09e36ac01e9540f8bc84eab1c1a78754', '', 'zhiwuList')
this.getDicListByPID('945a6b10e59946078b500f0fbafa8679', '', 'zhichengList') this.getDicListByPID('945a6b10e59946078b500f0fbafa8679', '', 'zhichengList')
this.getDicListByPID('55484e491a5e442d839c4595380713ec', '', 'gongzhongList') this.getDicListByPID('55484e491a5e442d839c4595380713ec', '', 'gongzhongList')
@ -1637,6 +1765,21 @@ export default {
this.dialogImageUrl = file.url this.dialogImageUrl = file.url
this.dialogVisible = true 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) { handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
}, },
@ -1645,6 +1788,14 @@ export default {
this.form.USERAVATARURL = '' this.form.USERAVATARURL = ''
this.form.USERAVATARURL_CONVERT = '' 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) { handleChangeIMGZhengshu(file, fileList) {
const types = ['image/jpeg', 'image/jpg', 'image/png'] const types = ['image/jpeg', 'image/jpg', 'image/png']
const isImage = types.includes(file.raw.type) const isImage = types.includes(file.raw.type)
@ -1656,6 +1807,9 @@ export default {
beforeFileUploadByZhengshu(file) { beforeFileUploadByZhengshu(file) {
this.certificate_files.push(file) this.certificate_files.push(file)
}, },
beforeFileUploadByFace(file) {
this.form.face_file.push(file)
},
uploadImgByZhengshu(userId) { uploadImgByZhengshu(userId) {
this.$refs.upload.submit() this.$refs.upload.submit()
if (this.certificate_files.length > 0) { if (this.certificate_files.length > 0) {
@ -1667,6 +1821,25 @@ export default {
} }
formData.append('FOREIGN_KEY', userId) formData.append('FOREIGN_KEY', userId)
formData.append('TYPE', 18) 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( upload(
'/imgfiles/add', '/imgfiles/add',
formData formData
@ -1675,7 +1848,6 @@ export default {
message: '操作成功', message: '操作成功',
type: 'success' type: 'success'
}) })
this.$parent.activeName = 'List'
}).catch((e) => { }).catch((e) => {
}) })
} else { } else {
@ -1683,7 +1855,6 @@ export default {
message: '操作成功', message: '操作成功',
type: 'success' type: 'success'
}) })
this.$parent.activeName = 'List'
} }
}, },
deleteCertificate(index) { deleteCertificate(index) {

View File

@ -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="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> <el-button v-show="edit" type="info" icon="el-icon-message" size="mini" @click="pageShowDate(row,row.USER_ID,row.SHIFTDUTYTWO)"></el-button>
</template> </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="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)"></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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -441,6 +442,67 @@ export default {
// this.getLearnerCategory() // // this.getLearnerCategory() //
}, },
methods: { 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) { // schedulingChange(e) {
// // console.log(e) // // console.log(e)
// // this.PARENTID = e // // this.PARENTID = e
@ -669,8 +731,9 @@ export default {
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
this.$parent.USER_ID = '' this.$parent.USER_ID = ''
}, },
handleEdit(USER_ID) { handleEdit(row) {
this.$parent.USER_ID = USER_ID this.$parent.USER_ID = row.USER_ID
this.$parent.IMGFILES_ID = row.IMGFILES_ID
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
}, },
getQuery() { getQuery() {
@ -732,7 +795,8 @@ export default {
SHIFTDUTYONE: this.SHIFTDUTYONE, SHIFTDUTYONE: this.SHIFTDUTYONE,
SHIFTDUTYTWO: this.SHIFTDUTYTWO, SHIFTDUTYTWO: this.SHIFTDUTYTWO,
IS_HAZARDCONFIRMER: this.IS_HAZARDCONFIRMER, IS_HAZARDCONFIRMER: this.IS_HAZARDCONFIRMER,
USER_ID: this.USER_ID USER_ID: this.USER_ID,
ISPUSH: '1'
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
@ -862,7 +926,7 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}, },
handleDelete(id, name) { handleDelete(id, name, ispush) {
this.$confirm('确定要删除[' + name + ']吗?', { this.$confirm('确定要删除[' + name + ']吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -872,7 +936,8 @@ export default {
requestFN( requestFN(
'/user/deleteUser', '/user/deleteUser',
{ {
USER_ID: id USER_ID: id,
ISPUSH: ispush
} }
).then(() => { ).then(() => {
this.$message({ this.$message({

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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>

View File

@ -73,7 +73,7 @@
<el-tag v-else type="danger"></el-tag> <el-tag v-else type="danger"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="380"> <el-table-column label="操作" width="450">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button <el-button
v-show="true" v-show="true"
@ -97,6 +97,14 @@
size="mini" size="mini"
@click="handleDelete(row)">删除 @click="handleDelete(row)">删除
</el-button> </el-button>
<!-- 新增按钮检查记录二维码 -->
<el-button
class="tiffany-btn"
icon="el-icon-document"
type="info"
size="mini"
@click="handleShowRecordQr(row)">检查记录二维码
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -143,6 +151,22 @@
<el-button v-print="'#printTest'" type="primary"> </el-button> <el-button v-print="'#printTest'" type="primary"> </el-button>
</div> </div>
</el-dialog> </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-dialog v-loading ="listLoading" :visible.sync="dialogEditUser" title="批量修改负责人" width="800px">
<el-form ref="firefightingBatchEditDept" :model="dialogEditUserForm" :rules="dialogEditUserRules" label-width="150px"> <el-form ref="firefightingBatchEditDept" :model="dialogEditUserForm" :rules="dialogEditUserRules" label-width="150px">
<el-row> <el-row>
@ -157,7 +181,6 @@
<el-button @click="dialogEditUser = false"> </el-button> <el-button @click="dialogEditUser = false"> </el-button>
<el-button type="primary" @click="dialogEditUserConfirm"> </el-button> <el-button type="primary" @click="dialogEditUserConfirm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -171,9 +194,7 @@ import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree' import SelectTree from '@/components/SelectTree'
export default { export default {
components: { Pagination, SelectTree, vueQr }, components: { Pagination, SelectTree, vueQr },
directives: { waves }, directives: { waves },
data() { data() {
return { return {
@ -181,7 +202,9 @@ export default {
addBtnType: true, addBtnType: true,
listLoading: true, listLoading: true,
dialogFormShow: false, dialogFormShow: false,
dialogRecordFormShow: false,
qrcodeStr: '', qrcodeStr: '',
recordQrcodeStr: '',
qrInfo: {}, qrInfo: {},
add: false, add: false,
del: false, del: false,
@ -246,38 +269,36 @@ export default {
handleShowQr(ROW) { handleShowQr(ROW) {
this.dialogFormShow = true this.dialogFormShow = true
this.qrInfo = ROW 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 = { const json = {
MANAGER_TYPE: 'fireListManager', 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.recordQrcodeStr = JSON.stringify(json)
this.qrcodeStr = jsonStr
}, },
handleEdit(FIRE_POINT_ID) { handleEdit(FIRE_POINT_ID) {
this.$parent.FIRE_POINT_ID = FIRE_POINT_ID this.$parent.FIRE_POINT_ID = FIRE_POINT_ID
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
}, },
selectable(row, index) { selectable(row, index) {
// return row.DEVICE_COUNT == 0
return true return true
}, },
getRowKey(row) { getRowKey(row) {
return row.FIRE_POINT_ID return row.FIRE_POINT_ID
}, },
//
handleAdd() { handleAdd() {
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
this.$parent.FIRE_POINT_ID = '' this.$parent.FIRE_POINT_ID = ''
this.$parent.FIRE_POINT_CODE = '' this.$parent.FIRE_POINT_CODE = ''
this.$parent.FIRE_POINT_NAME = '' this.$parent.FIRE_POINT_NAME = ''
}, },
//
getQuery() { getQuery() {
// this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
}, },
//
getList(pid) { getList(pid) {
this.listLoading = true this.listLoading = true
this.varList = [] this.varList = []
@ -298,7 +319,8 @@ export default {
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}, goKeyReset() { },
goKeyReset() {
this.FIRE_POINT_NAME = '' this.FIRE_POINT_NAME = ''
this.FIRE_POINT_CODE = '' this.FIRE_POINT_CODE = ''
this.IS_PUNCTUATION = '' this.IS_PUNCTUATION = ''
@ -344,7 +366,6 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
//
getTreeData() { getTreeData() {
requestFN( requestFN(
'/department/listTreeV2', '/department/listTreeV2',
@ -354,7 +375,6 @@ export default {
}).catch((e) => { }).catch((e) => {
}) })
}, },
//
handleEditUser(row) { handleEditUser(row) {
this.editDataIds = [] this.editDataIds = []
if (row.FIRE_POINT_ID) { if (row.FIRE_POINT_ID) {
@ -509,7 +529,7 @@ export default {
float: right; float: right;
} }
.app-container { .app-container {
display: flex; /**/ display: flex;
align-items: baseline; align-items: baseline;
} }
.table-qrcode { .table-qrcode {

View File

@ -101,6 +101,13 @@
/> />
</el-form-item> </el-form-item>
</el-col> </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-col :span="4">
<el-form-item label-width="10px"> <el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery"> <el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
@ -271,7 +278,8 @@ export default {
state: '', // state: '', //
hiddenpart: '', // hiddenpart: '', //
hiddenType: '', // hiddenType: '', //
creatorUserDept: ''// creatorUserDept: '', //
isrelevant: '' //
}, },
/** 条件中的字段,没有放在form表单中,是因为怕动态加载中出现问题 **/ /** 条件中的字段,没有放在form表单中,是因为怕动态加载中出现问题 **/
sourceList: [ sourceList: [
@ -281,6 +289,10 @@ export default {
{ ID: '5', NAME: '安全环保检查(企业端)' }, { ID: '5', NAME: '安全环保检查(企业端)' },
{ ID: '6', NAME: '消防检查' } { ID: '6', NAME: '消防检查' }
], ],
isrelevantList: [
{ ID: '1', NAME: '是' },
{ ID: '2', NAME: '否' }
],
statusList: [ statusList: [
{ ID: '1', NAME: '未整改' }, { ID: '1', NAME: '未整改' },
{ ID: '2', NAME: '已整改' }, { ID: '2', NAME: '已整改' },

View File

@ -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>