人员中台对接内容

xuyifeng-0724-人员中台对接-dev
water_xu 2024-07-24 08:44:58 +08:00
parent 5505de7f30
commit bfb78fcb90
6 changed files with 3779 additions and 110 deletions

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

@ -108,7 +108,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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">