diff --git a/anrui-management/anrui-management-ui/package.json b/anrui-management/anrui-management-ui/package.json index ddefe99998..48c94f7525 100644 --- a/anrui-management/anrui-management-ui/package.json +++ b/anrui-management/anrui-management-ui/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "axios": "0.18.1", - "core-js": "3.6.5", + "core-js": "^3.22.5", "element-ui": "2.13.2", "js-cookie": "2.2.0", "normalize.css": "7.0.0", diff --git a/anrui-management/anrui-management-ui/src/api/management/yuangongguanli.js b/anrui-management/anrui-management-ui/src/api/management/yuangongguanli.js index 0e15876442..d9c1d00a61 100644 --- a/anrui-management/anrui-management-ui/src/api/management/yuangongguanli.js +++ b/anrui-management/anrui-management-ui/src/api/management/yuangongguanli.js @@ -41,6 +41,15 @@ export default { }) }, + // 通过sid删除一条或多条记录 + del: function(data) { + return request({ + url: '/portal/v1/sysstaffinfo/del', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, // 员工信息编辑初始化及详情 fetchBySid: function(sid) { return request({ diff --git a/anrui-management/anrui-management-ui/src/components/ButtonBar/index.vue b/anrui-management/anrui-management-ui/src/components/ButtonBar/index.vue index fe76690bf2..963a81e972 100644 --- a/anrui-management/anrui-management-ui/src/components/ButtonBar/index.vue +++ b/anrui-management/anrui-management-ui/src/components/ButtonBar/index.vue @@ -55,13 +55,6 @@ export default { btnKey: 'doDel', btnLabel: '删除' }, - { - type: 'danger', - size: 'small', - icon: '', - btnKey: 'doQuit', - btnLabel: '离职' - }, { type: 'success', size: 'small', @@ -103,9 +96,12 @@ export default { }, btnHandle(btnKey) { this.$emit('btnhandle', btnKey) + }, + setButtonList(value) { + this.btnList = value } } } - \ No newline at end of file + diff --git a/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload.vue b/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload.vue index f010a15917..d87cf534ad 100644 --- a/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload.vue +++ b/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload.vue @@ -1,253 +1,224 @@ diff --git a/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload_head.vue b/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload_head.vue index 489c60a484..6b133c40ec 100644 --- a/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload_head.vue +++ b/anrui-management/anrui-management-ui/src/components/uploadFileimg/upload_head.vue @@ -1,270 +1,144 @@ - removeImage(file, ImageFileList) { - this.files.splice(this.files.indexOf(file), 1); - const imgFiles = []; + +.avatar { + margin-top: 5%; + width: 178px; + height: 178px; + display: block; +} + diff --git a/anrui-management/anrui-management-ui/src/styles/index.scss b/anrui-management/anrui-management-ui/src/styles/index.scss index e74499658e..27872b95c0 100644 --- a/anrui-management/anrui-management-ui/src/styles/index.scss +++ b/anrui-management/anrui-management-ui/src/styles/index.scss @@ -120,7 +120,7 @@ div:focus { } .filter-item { padding: 0 10px; - width: 220px; + width: 168px; display: inline-block; } .listtop { @@ -149,11 +149,11 @@ div:focus { padding: 20px 0; // height: calc(100vh - 200px);overflow-y: auto; .title { - padding: 10px;font-weight: bold; + padding: 10px;font-weight: bold; font-size: 20px; background-color: $header-bg; - text-align: center; - color: #ffffff; + text-align: center; + color: #ffffff; } .el-row { display:flex; @@ -172,7 +172,7 @@ div:focus { } } - } + } .footer{margin: 20px;} } @@ -180,11 +180,11 @@ div:focus { .forminfo { padding: 20px 0; .title { - padding: 10px;font-weight: bold; + padding: 10px;font-weight: bold; font-size: 20px; background-color: $header-bg; - text-align: center; - color: #ffffff; + text-align: center; + color: #ffffff; } .el-row { display:flex; @@ -197,12 +197,12 @@ div:focus { border-bottom: 1px solid $table-border-color; padding: 0px 15px 0px 15px !important; min-height: 50px; - line-height: 50px; - font-size: 14px; + line-height: 50px; + font-size: 14px; } - } + } .footer{margin: 20px;} } diff --git a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongAdd.vue b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongAdd.vue index ee8d7c8900..e99a6ad0db 100644 --- a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongAdd.vue +++ b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongAdd.vue @@ -1,71 +1,28 @@ @@ -951,7 +563,6 @@ export default { orgSid: '', orgName_list: [], // 所在部门 dataArr: [], - refreshItem: 0, // 级联列表key值 options: [], // 级联列表选项 props: { // props传值 @@ -960,15 +571,13 @@ export default { children: 'children' }, // 上传图片 - photo_list: [], + // photo_list: [], idCardA_list: [], idCardB_list: [], diploma_list: [], degree_list: [], leave_list: [], sid: '', // 一条数据的sid - sysStaffOrgDto: {}, // 编辑回显所用 - sysStaffPostDto: {}, temp: { provinceCode: '', postName: '', @@ -976,44 +585,20 @@ export default { countyCode: '', genderKey: '', // 性别code nativePlace: '', // 籍贯 - sysStaffOrgDto: { + sysStaffOrg: { orgName: '', orgSid: '' - }, // 部门信息 - sysStaffPostDto: {} // 岗位信息 + }, + sysStaffPost: {} // 岗位信息 }, rules: { - // jobNumber: [{required: true, message: '单据类型不能为空', trigger: 'change'}], name: [{ required: true, message: '姓名不能为空', trigger: 'change' }], - gender: [ - { required: true, message: '性别不能为空', trigger: 'change' } - ], - idNo: [ - { - required: true, - message: '身份证号不能为空', - validator: identitycard, - trigger: 'change' - } - ], - idTerm: [ - { required: true, message: '证件有效期不能为空', trigger: 'change' } - ], - national: [ - { required: true, message: '民族不能为空', trigger: 'change' } - ], - mobile: [ - { - required: true, - message: '手机号不能为空', - validator: checkSubmit, - trigger: 'change' - } - ], - personType: [ - { required: true, message: '员工类型不能为空', trigger: 'change' } - ] - // joinCompnyDate: [{required: true, message: '入职时间不能为空', trigger: 'change'}], + gender: [{ required: true, message: '性别不能为空', trigger: 'change' }], + idNo: [{ required: true, message: '身份证号不能为空', trigger: 'change' }], + idTerm: [{ required: true, message: '证件有效期不能为空', trigger: 'change' }], + national: [{ required: true, message: '民族不能为空', trigger: 'change' }], + mobile: [{ required: true, message: '手机号不能为空', validator: checkSubmit, trigger: 'change' }], + personType: [{ required: true, message: '员工类型不能为空', trigger: 'change' }] }, submitdisabled: false } @@ -1076,13 +661,7 @@ export default { }) this.temp.city = bb.name this.temp.cityCode = bb.districtCode - // this.deCode.push(bb.districtCode) this.huoquXian(bb.sid) - // this.temp.orgmoneVakue.push(bb) - // let aa = '' - // this.temp.orgmoneVakue.forEach((e)=>{ - // aa = aa +e.districtCode - // }) }, huoquXian(sid1) { var sid = { @@ -1107,8 +686,7 @@ export default { } }) this.temp.county = bb.name - this.temp.countyCode = bb.districtCode - // this.deCode.push(bb.districtCode) + this.temp.countyCode = bb.districtCodes console.log('6666677777777', this.deCode) }, // 级联列表 部门 @@ -1123,12 +701,14 @@ export default { }, BuMen0(data) { data.forEach((e) => { - if (e.children.length !== 0) { - this.BuMen0(e.children) - } else { - delete e.children - this.dataArr.push(e) - return + if (e.children) { + if (e.children.length !== 0) { + this.BuMen0(e.children) + } else { + delete e.children + this.dataArr.push(e) + return + } } }) }, @@ -1162,7 +742,7 @@ export default { result = result.substring(0, result.length - 1) } if (namePath !== '') { - namePath = namePath.substring(0, result.length - 1) + namePath = namePath.substring(0, namePath.length - 1) } if (result_Sid !== '') { result_Sid = result_Sid.substring(0, result_Sid.length - 1) @@ -1173,147 +753,100 @@ export default { const orgNameArray = result.split(',') const orgName = orgNameArray[orgNameArray.length - 1] - this.temp.sysStaffOrgDto.orgName = orgName - this.temp.sysStaffOrgDto.orgSid = orgSid - this.temp.sysStaffOrgDto.orgSidPath = sidPath - this.temp.sysStaffOrgDto.orgNamePath = namePath - this.temp.sysStaffOrgDto.orgCode = result_code - console.log( - '选中名称:' + orgName, - orgSid, - sidPath, - namePath, - result_code - ) + this.temp.sysStaffOrg.orgName = orgName + this.temp.sysStaffOrg.orgSid = orgSid + this.temp.sysStaffOrg.orgSidPath = sidPath + this.temp.sysStaffOrg.orgNamePath = namePath + this.temp.sysStaffOrg.orgCode = result_code }, - // --- 循环查询 findOrgId(id, options) { - console.log('这是部门id', id) - for (var i = 0; i < options.length; i++) { - if (id === options[i].sid) { - this.select_temp_Name = options[i].name // 保存找到的内容 - this.select_temp_Sid = options[i].sid - this.select_temp_NamePath = options[i].name - this.select_temp_SidPath = options[i].orgSidPath - this.select_temp_code = options[i].orgCode - return true - } else { - // 判断是否最后一级 - if (options[i].children !== undefined) { - // 不是的话查询下一级 - if (this.findOrgId(id, options[i].children)) { - return true + if (options.length > 0) { + for (var i = 0; i < options.length; i++) { + if (id === options[i].sid) { + this.select_temp_Name = options[i].name // 保存找到的内容 + this.select_temp_Sid = options[i].sid + this.select_temp_NamePath = options[i].name + this.select_temp_SidPath = options[i].orgSidPath + this.select_temp_code = options[i].orgCode + return true + } else { + // 判断是否最后一级 + if (options[i].children !== undefined && options[i].children !== null) { + // 不是的话查询下一级 + if (this.findOrgId(id, options[i].children)) { + return true + } } } } } + }, // -------------------------数据字典下拉框------------------------- getType() { - req - .pullDown({ - type: 'national' - }) - .then((res) => { - if (res.code === '200') { - this.national_list = res.data - console.log('下拉框请求民族', res.data) - } - }) - - req - .pullDown({ - type: 'maritalstatus' - }) - .then((res) => { - if (res.code === '200') { - this.maritalstatus_list = res.data - console.log('下拉框请求婚姻', res.data) - } - }) - - req - .pullDown({ - type: 'political' - }) - .then((res) => { - if (res.code === '200') { - this.political_list = res.data - console.log('下拉框请求政治', res.data) - } - }) - - req - .pullDown({ - type: 'personType' - }) - .then((res) => { - if (res.code === '200') { - this.personType_list = res.data - console.log('下拉框员工类型', res.data) - } - }) - - req - .pullDown({ - type: 'probPeriod' - }) - .then((res) => { - if (res.code === '200') { - this.probPeriod_list = res.data - console.log('下拉框试用期', res.data) - } - }) - - req - .pullDown({ - type: 'sex' - }) - .then((res) => { - if (res.code === '200') { - this.gender_list = res.data - console.log('下拉框性别', res.data) - } - }) - + req.pullDown({ type: 'national' }).then((res) => { + if (res.code === '200') { + this.national_list = res.data + console.log('下拉框请求民族', res.data) + } + }) + req.pullDown({ type: 'maritalstatus' }).then((res) => { + if (res.code === '200') { + this.maritalstatus_list = res.data + console.log('下拉框请求婚姻', res.data) + } + }) + req.pullDown({ type: 'political' }).then((res) => { + if (res.code === '200') { + this.political_list = res.data + console.log('下拉框请求政治', res.data) + } + }) + req.pullDown({ type: 'personType' }).then((res) => { + if (res.code === '200') { + this.personType_list = res.data + console.log('下拉框员工类型', res.data) + } + }) + req.pullDown({ type: 'probPeriod' }).then((res) => { + if (res.code === '200') { + this.probPeriod_list = res.data + console.log('下拉框试用期', res.data) + } + }) + req.pullDown({ type: 'sex' }).then((res) => { + if (res.code === '200') { + this.gender_list = res.data + console.log('下拉框性别', res.data) + } + }) req.postName().then((res) => { if (res.code === '200') { this.postSid_list = res.data console.log('下拉框请求岗位', res.data) } }) - - req - .pullDown({ - type: 'educationdegree' - }) - .then((res) => { - if (res.code === '200') { - this.educate_list = res.data - console.log('下拉框请求学历', res.data) - } - }) - - req - .pullDown({ - type: 'carType' - }) - .then((res) => { - if (res.code === '200') { - this.licenseType_list = res.data - console.log('下拉框请求驾照', res.data) - } - }) + req.pullDown({ type: 'educationdegree' }).then((res) => { + if (res.code === '200') { + this.educate_list = res.data + console.log('下拉框请求学历', res.data) + } + }) + req.pullDown({ type: 'carType' }).then((res) => { + if (res.code === '200') { + this.licenseType_list = res.data + console.log('下拉框请求驾照', res.data) + } + }) }, getNational(value) { console.log('触发下拉框按钮') - let bb = {} + let bb = null this.national_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1324,16 +857,14 @@ export default { }) this.temp.national = bb.name this.temp.nationalKey = bb.key - // this.formobj.scmOtherInboundDto.billType = bb.sid console.log('name', this.temp.national) }, getMari(value) { console.log('触发下拉框按钮') - let bb = {} + let bb = null this.maritalstatus_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1344,16 +875,14 @@ export default { }) this.temp.maritalStatus = bb.name this.temp.maritalStatusKey = bb.key - // this.formobj.scmOtherInboundDto.billType = bb.sid console.log('name', this.temp.maritalStatus) }, getPoliCode(value) { console.log('触发下拉框按钮') - let bb = {} + let bb = null this.political_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1362,17 +891,16 @@ export default { } } }) - this.temp.political = bb.name + this.temp.poliCode = bb.name this.temp.poliCodeKey = bb.key console.log('name', this.temp.political) }, getPersonType(value) { console.log('触发下拉框按钮') - let bb = {} + let bb = null this.personType_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1393,10 +921,9 @@ export default { getProbPeriod(value) { console.log('触发下拉框按钮') - let bb = {} + let bb = null this.probPeriod_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1412,10 +939,9 @@ export default { getPostSid(value) { console.log('触发下拉框按钮', value) - let bb = {} + let bb = null this.postSid_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.postCode == value) { + if (e.postCode === value) { bb = { name: e.name, key: e.postCode, @@ -1423,19 +949,17 @@ export default { } } }) - this.temp.sysStaffPostDto.postSid = bb.sid + this.temp.sysStaffPost.postSid = bb.sid this.temp.postName = bb.name - this.temp.sysStaffPostDto.postCode = bb.key - // this.formobj.scmOtherInboundDto.billType = bb.sid - console.log('name', this.temp.sysStaffPostDto.postSid) + this.temp.sysStaffPost.postCode = bb.key + console.log('name', this.temp.sysStaffPost.postSid) }, getEducate(value) { console.log('触发下拉框按钮', value) - let bb = {} + let bb = null this.educate_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1446,15 +970,14 @@ export default { }) this.temp.education = bb.name this.temp.educationKey = bb.key - console.log('name', this.temp.sysStaffPostDto.postSid) + console.log('name', this.temp.sysStaffPost.postSid) }, getLicenseType(value) { console.log('触发下拉框按钮', value) - let bb = {} + let bb = null this.licenseType_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictKey == value) { + if (e.dictKey === value) { bb = { type: e.dictType, name: e.dictValue, @@ -1472,8 +995,7 @@ export default { console.log('触发下拉框按钮') let bb = {} this.gender_list.forEach((e) => { - // eslint-disable-next-line eqeqeq - if (e.dictValue == this.temp.gender) { + if (e.dictValue === this.temp.gender) { bb = { type: e.dictType, name: e.dictValue, @@ -1485,47 +1007,56 @@ export default { if (this.temp.gender === bb.name) { this.temp.genderKey = bb.key } - // this.temp.probPeriod = bb.name - // this.temp.probPeriodKey = bb.key - // console.log('name', this.temp.probPeriod) }, - + photoPath(val) { + this.temp.photo = val + }, // 上传附件 getUrl() { // 员工照片 - this.temp.photo = this.photo_list[this.photo_list.length - 1].url + // if (this.photo_list.length > 0) { + // this.temp.photo = this.photo_list[this.photo_list.length - 1].url + // } // for (var i = 0; i < this.photo_list.length; i++) { // this.temp.photo = this.photo_list[i].url; // console.log("图片信息", this.temp.photo); // } // 身份证(人像面) - this.temp.idCardA = this.idCardA_list[this.idCardA_list.length - 1].url + if (this.idCardA_list.length > 0) { + this.temp.idCardA = this.idCardA_list[this.idCardA_list.length - 1].url + } // for (var i = 0; i < this.idCardA_list.length; i++) { // this.temp.idCardA = this.idCardA_list[i].url; // console.log("图片信息", this.temp.idCardA); // } // 身份证(国徽面) - this.temp.idCardB = this.idCardB_list[this.idCardB_list.length - 1].url + if (this.idCardB_list.length > 0) { + this.temp.idCardB = this.idCardB_list[this.idCardB_list.length - 1].url + } // for (var i = 0; i < this.idCardB_list.length; i++) { // this.temp.idCardB = this.idCardB_list[i].url; // console.log("图片信息", this.temp.idCardB); // } // 学历证书 - this.temp.diploma = this.diploma_list[this.diploma_list.length - 1].url + if (this.diploma_list.length > 0) { + this.temp.diploma = this.diploma_list[this.diploma_list.length - 1].url + } // for (var i = 0; i < this.diploma_list.length; i++) { // this.temp.diploma = this.diploma_list[i].url; // console.log("图片信息", this.temp.diploma); // } // 学位证书 - this.temp.degreeCertificate = - this.degree_list[this.degree_list.length - 1].url + if (this.degree_list.length > 0) { + this.temp.degreeCertificate = this.degree_list[this.degree_list.length - 1].url + } // for (var i = 0; i < this.degree_list.length; i++) { // this.temp.degreeCertificate = this.degree_list[i].url; // console.log("图片信息", this.temp.degreeCertificate); // } // 前公司离职证明 leaveCertificate - this.temp.leaveCertificate = - this.leave_list[this.leave_list.length - 1].url + if (this.leave_list.length > 0) { + this.temp.leaveCertificate = this.leave_list[this.leave_list.length - 1].url + } // for (var i = 0; i < this.leave_list.length; i++) { // this.temp.leaveCertificate = this.leave_list[i].url; // console.log("图片信息", this.temp.leaveCertificate); @@ -1536,19 +1067,20 @@ export default { // 返回(===既判断又赋值) handleReturn(isreload) { if (isreload === 'true') this.$emit('reloadlist') - this.photo_list = [] + // this.photo_list = [] this.idCardA_list = [] this.idCardB_list = [] this.diploma_list = [] this.degree_list = [] this.leave_list = [] this.temp = { - sysStaffOrgDto: {}, // 部门信息 - sysStaffPostDto: {} // 岗位信息 + sysStaffOrg: {}, // 部门信息 + sysStaffPost: {} // 岗位信息 } + this.orgName_list = [] + // this.$refs['clearableCascader'].checkedValue = '' this.$refs['dataForm'].resetFields() this.$emit('doback') - this.refreshItem++ }, showAdd() { @@ -1556,7 +1088,7 @@ export default { this.$refs['dataForm'].clearValidate() }) this.dialogStatus = 'add' - this.viewTitle = '员工信息登记' + this.viewTitle = '【新增】员工信息' }, showEdit(sid, row) { @@ -1564,127 +1096,105 @@ export default { this.$refs['dataForm'].clearValidate() }) this.dialogStatus = 'edit' - this.viewTitle = '【编辑】其他入库单' + this.viewTitle = '【编辑】员工信息' console.log('编辑页面sid', sid) - req - .fetchBySid(sid) - .then((resp) => { - const data = resp.data - this.sid = sid - this.temp = data - this.orgName_list = data.sysStaffOrgDetailsVo.orgSid - // ---修改名称--- - this.temp = JSON.parse( - JSON.stringify(this.temp).replace( - /sysStaffOrgDetailsVo/g, - 'sysStaffOrgDto' - ) - ) - this.temp = JSON.parse( - JSON.stringify(this.temp).replace( - /sysStaffPostDetailsVo/g, - 'sysStaffPostDto' - ) - ) - // ---修改名称--- - // this.sysStaffOrgDto =data.sysStaffOrgDetailsVo - // this.sysStaffPostDto = data.sysStaffPostDetailsVo - // this.temp.sysStaffOrgDetailsVo = this.sysStaffOrgDto - // this.temp.sysStaffPostDetailsVo = this.sysStaffPostDto - // console.log('1111111',this.sysStaffOrgDto,this.sysStaffPostDto) - console.log('888999', this.temp) - let bb = {} - this.postSid_list.forEach((e) => { - if (e.sid === data.sysStaffPostDetailsVo.postSid) { - bb = { - name: e.name, - key: e.postCode, - sid: e.sid - } + req.fetchBySid(sid).then((resp) => { + const data = resp.data + this.sid = sid + this.temp = data + if (this.temp.personType === '全职') { + this.isQuit = false + } else { + this.isQuit = true + } + this.orgName_list = data.sysStaffOrg.orgSid + let bb = {} + this.postSid_list.forEach((e) => { + if (e.sid === data.sysStaffPost.postSid) { + bb = { + name: e.name, + key: e.postCode, + sid: e.sid } - }) - this.temp.postName = bb.name - if (this.temp.photo !== '') { - const imgName = this.temp.photo.split('/') - this.photo_list.push({ - name: imgName[imgName.length - 1], - url: this.temp.photo - }) - } - if (this.temp.idCardA !== '') { - const imgName = this.temp.idCardA.split('/') - this.idCardA_list.push({ - name: imgName[imgName.length - 1], - url: this.temp.idCardA - }) - } - if (this.temp.idCardB !== '') { - const imgName = this.temp.idCardB.split('/') - this.idCardB_list.push({ - name: imgName[imgName.length - 1], - url: this.temp.idCardB - }) - } - if (this.temp.diploma !== '') { - const imgName = this.temp.diploma.split('/') - this.diploma_list.push({ - name: imgName[imgName.length - 1], - url: this.temp.diploma - }) - } - if (this.temp.degreeCertificate !== '') { - const imgName = this.temp.degreeCertificate.split('/') - this.degree_list.push({ - name: imgName[imgName.length - 1], - url: this.temp.degreeCertificate - }) - } - if (this.temp.leaveCertificate !== '') { - const imgName = this.temp.leaveCertificate.split('/') - this.leave_list.push({ - name: imgName[imgName.length - 1], - url: this.temp.leaveCertificate - }) } }) - .catch((e) => { - this.temp = row - }) + this.temp.postName = bb.name + // if (this.temp.photo !== '') { + // const imgName = this.temp.photo.split('/') + // this.photo_list.push({ + // name: imgName[imgName.length - 1], + // url: this.temp.photo + // }) + // } + if (this.temp.idCardA !== '') { + const imgName = this.temp.idCardA.split('/') + this.idCardA_list.push({ + name: imgName[imgName.length - 1], + url: this.temp.idCardA + }) + } + if (this.temp.idCardB !== '') { + const imgName = this.temp.idCardB.split('/') + this.idCardB_list.push({ + name: imgName[imgName.length - 1], + url: this.temp.idCardB + }) + } + if (this.temp.diploma !== '') { + const imgName = this.temp.diploma.split('/') + this.diploma_list.push({ + name: imgName[imgName.length - 1], + url: this.temp.diploma + }) + } + if (this.temp.degreeCertificate !== '') { + const imgName = this.temp.degreeCertificate.split('/') + this.degree_list.push({ + name: imgName[imgName.length - 1], + url: this.temp.degreeCertificate + }) + } + if (this.temp.leaveCertificate !== '') { + const imgName = this.temp.leaveCertificate.split('/') + this.leave_list.push({ + name: imgName[imgName.length - 1], + url: this.temp.leaveCertificate + }) + } + }).catch((e) => { + this.temp = row + }) }, saveAdd() { const _this = this + this.getUrl() this.$refs['dataForm'].validate((valid) => { this.getGenderKey() this.getUrl() if (valid) { this.submitdisabled = true - req - .saveAdd(this.temp) - .then((resp) => { - this.submitdisabled = false - console.log(resp) - if (resp.success) { - _this.$message({ - showClose: true, - type: 'success', - message: resp.msg - }) - _this.handleReturn('true') - // _this.handleReturn("true"); - console.log('保存成功') - } else { - _this.$message({ - showClose: true, - type: 'success', - message: resp.msg - }) - // resp.code - } - }) - .catch(() => { - this.submitdisabled = false - }) + req.saveAdd(this.temp).then((resp) => { + this.submitdisabled = false + console.log(resp) + if (resp.success) { + _this.$message({ + showClose: true, + type: 'success', + message: resp.msg + }) + _this.handleReturn('true') + console.log('保存成功') + } else { + _this.$message({ + showClose: true, + type: 'success', + message: resp.msg + }) + } + }).catch(() => { + this.submitdisabled = false + }) } else { return false } @@ -1693,40 +1203,20 @@ export default { saveEdit() { const _this = this - // Start - // var orgName_Sid = ""; - // if (this.orgName_list.length > 0) { - // console.log('114477885522',this.orgName_list) - // this.orgName_list.forEach((item) => { - // var last_id = item[item.length - 1]; - // this.select_temp_Sid = ""; //临时遍历,用来保存选中结果(组织Sid) - // this.findOrgId(last_id, this.options); - // orgName_Sid = orgName_Sid + this.select_temp_Sid + ","; - // }); - // } - // if (orgName_Sid !== "") { - // orgName_Sid = orgName_Sid.substring(0, orgName_Sid.length - 1); - // } - // this.temp.sysStaffOrgDto.orgSid = orgName_Sid; - // console.log("重新赋值后的组织结构", this.temp.sysStaffOrgDto.orgSid); - // End this.$refs['dataForm'].validate((valid) => { if (valid) { this.submitdisabled = true - req - .saveEdit(this.temp, this.sid) - .then((resp) => { - this.submitdisabled = false - _this.$message({ - showClose: true, - type: 'success', - message: resp.msg - }) - _this.handleReturn('true') - }) - .catch(() => { - this.submitdisabled = false + req.saveEdit(this.temp, this.sid).then((resp) => { + this.submitdisabled = false + _this.$message({ + showClose: true, + type: 'success', + message: resp.msg }) + _this.handleReturn('true') + }).catch(() => { + this.submitdisabled = false + }) } else { return false } @@ -1740,7 +1230,9 @@ export default { /deep/ .el-main { padding: 0; } - +.formadd { + margin: 0 15%; +} /deep/ .el-form-item__content { margin-left: 0 !important; } diff --git a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue index 1dba3b3c21..294810e6cc 100644 --- a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue +++ b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue @@ -1,283 +1,253 @@ - diff --git a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue index a10113cc09..3a2cc6c20f 100644 --- a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue +++ b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue @@ -1,218 +1,94 @@