|
|
@@ -0,0 +1,444 @@
|
|
|
+<template>
|
|
|
+ <div class="education">
|
|
|
+ <div class="title">最高学历认证</div>
|
|
|
+ <div class="workList">
|
|
|
+ <div class="cell" v-for="item in dataInfo.meta" :key="item.id">
|
|
|
+ <div class="left">
|
|
|
+ <div class="cellTitle">
|
|
|
+ {{item.university}}
|
|
|
+ </div>
|
|
|
+ <div class="cellSubTitle">
|
|
|
+ {{item.start_time}} - {{item.end_time}} {{item.major}} | {{item.education_background}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="right" @click="openDialog(item)" :class="calcClass(item)">
|
|
|
+ <p>{{item.status_name}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ title="工作经历认证"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="657px"
|
|
|
+ :append-to-body="true"
|
|
|
+ :center="true"
|
|
|
+ >
|
|
|
+ <div class="diaContentWork">
|
|
|
+ <div class="leftInfo">
|
|
|
+ <div
|
|
|
+ class="leftTitle">{{itemData.start_time}} - {{itemData.end_time}} {{itemData.university}} {{itemData.education_background}}
|
|
|
+ </div>
|
|
|
+ <div class="leftInput">
|
|
|
+ <input type="text" placeholder="请输入学信网在线验证报告地址" v-model="word">
|
|
|
+ </div>
|
|
|
+ <div class="leftTips">
|
|
|
+ <p>学信网在线验证报告,例如:https://www.poginn.com</p>
|
|
|
+ <p>注:学历证明可以是毕业证图片或学信网在线验证报告(二选一即可)</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="rightInfo">
|
|
|
+ <el-upload
|
|
|
+ class="avatar-uploader"
|
|
|
+ action="#"
|
|
|
+ :show-file-list="false"
|
|
|
+ :multiple="false"
|
|
|
+ accept="image/png, image/jpeg"
|
|
|
+ :before-upload="handleFileChange"
|
|
|
+ >
|
|
|
+ <i v-if="imageUrl" class="el-icon-delete avatar-uploader-icon" @click.stop="handleDeleteFile"></i>
|
|
|
+ <img v-if="imageUrl" :src="imageUrl" class="avatar"/>
|
|
|
+ <div v-else class="noneImage">
|
|
|
+ <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ <span class="title">上传照片</span>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <p class="rightTips">只支持JPG格式</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <div class="submit"><p @click="submitChange">确定</p></div>
|
|
|
+ <div class="cancle"><p @click="dialogVisible=false">取消</p></div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'workHistory',
|
|
|
+ props: {
|
|
|
+ dataInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: function () {
|
|
|
+ return {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submitRefresh: {
|
|
|
+ type: Function,
|
|
|
+ default: function () {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogVisible: false,
|
|
|
+ itemData: {},
|
|
|
+ imageUrl: '',
|
|
|
+ word: '',
|
|
|
+ handleAvatarSuccess: '',
|
|
|
+ beforeAvatarUpload: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 打开弹窗 **/
|
|
|
+ openDialog(item) {
|
|
|
+ if (Number(item.status) === 1 || Number(item.status) === 2) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.itemData = item
|
|
|
+ this.word = item.diploma_url
|
|
|
+ this.imageUrl = item.diploma_photo
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ /** 计算样式 **/
|
|
|
+ calcClass(item) {
|
|
|
+ let className = {}
|
|
|
+ if (Number(item.status) === 1) { //审核中
|
|
|
+ className.noClick = true
|
|
|
+ className.none = true
|
|
|
+ } else if ( Number(item.status) === 2) { //已认证
|
|
|
+ className.noClick = true
|
|
|
+ className.ok = true
|
|
|
+ } else {
|
|
|
+ className.click = true
|
|
|
+ className.none = false
|
|
|
+ }
|
|
|
+ return className
|
|
|
+ },
|
|
|
+ /** 删除问及爱你 **/
|
|
|
+ handleDeleteFile() {
|
|
|
+ this.imageUrl = ''
|
|
|
+ },
|
|
|
+ handleFileChange(file) {
|
|
|
+ const formData = new FormData();
|
|
|
+ formData.append("file", file);
|
|
|
+ formData.append("original_filename", file.name);
|
|
|
+ this.uploading = true;
|
|
|
+ this.$axios
|
|
|
+ .$post(`/upload_image`, formData, {
|
|
|
+ headers: { "Content-Type": "multipart/form-data" }
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.imageUrl = res.filename
|
|
|
+ this.itemData.diploma_photo = res.filename || ''
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.uploading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ submitChange() {
|
|
|
+ const {id, diploma_photo} = this.itemData
|
|
|
+ let p = {
|
|
|
+ id,
|
|
|
+ diploma_photo: diploma_photo || '',
|
|
|
+ diploma_url: this.word || '',
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!p.diploma_photo && !p.diploma_url) {
|
|
|
+ this.$message.warning('至少填写一个!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$axios.$post(`/api/user_education/update`, p).then(res=>{
|
|
|
+ if (Number(res.status) === 1) {
|
|
|
+ this.$message.closeAll()
|
|
|
+ this.$message.success(res.info || '提交成功!')
|
|
|
+ this.submitRefresh('openEducation')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.dialogVisible = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+<style lang="scss">
|
|
|
+ .el-dialog {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ margin: 0 !important;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ border-radius: 11px;
|
|
|
+ padding: 43px 37px 39px 30px;
|
|
|
+
|
|
|
+ .el-dialog__header {
|
|
|
+ padding: 0;
|
|
|
+ .el-dialog__title {
|
|
|
+ font-size: 21px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(34, 34, 34, 1);
|
|
|
+ line-height: 29px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__close {
|
|
|
+ color: #666666;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 600;
|
|
|
+ transform: scale(1.2);
|
|
|
+ transform-origin: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 54px 0 30px 0;
|
|
|
+
|
|
|
+ .diaContentWork {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .leftInfo {
|
|
|
+ width: 450px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ overflow: hidden;
|
|
|
+ .leftTitle {
|
|
|
+ height: 27px;
|
|
|
+ font-size: 15px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ line-height: 27px;
|
|
|
+ }
|
|
|
+ .leftInput {
|
|
|
+ margin-top: 29px;
|
|
|
+ input {
|
|
|
+ margin-top:5px;
|
|
|
+ width: 450px;
|
|
|
+ height: 44px;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ border-radius: 3px;
|
|
|
+ border: 1px solid rgba(221, 225, 230, 1);
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .leftTips {
|
|
|
+ margin-top: 5px;
|
|
|
+ width: 450px;
|
|
|
+ height: 96px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(153, 153, 153, 1);
|
|
|
+ line-height: 19px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .rightInfo {
|
|
|
+ width: 126px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ position: relative;
|
|
|
+ background: #fff;
|
|
|
+ .el-icon-delete {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .avatar-uploader .el-upload {
|
|
|
+ width: 126px;
|
|
|
+ height: 155px;
|
|
|
+ border: 1px dashed #409eff;
|
|
|
+ border-radius: 6px;
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ object-fit: contain;
|
|
|
+ object-position: top left;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .avatar-uploader .el-upload:hover {
|
|
|
+ border-color: #409eff;
|
|
|
+ .el-icon-delete {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .avatar-uploader-icon {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ font-size: 44px;
|
|
|
+ color: #409eff;;
|
|
|
+ width: 126px;
|
|
|
+ height: 155px;
|
|
|
+ line-height: 120px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .avatar {
|
|
|
+ width: 126px;
|
|
|
+ height: 155px;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: 40px;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #409eff;
|
|
|
+ line-height: 18px;
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rightTips {
|
|
|
+ height: 19px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(153, 153, 153, 1);
|
|
|
+ line-height: 19px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .dialog-footer {
|
|
|
+ text-align: left;
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .submit {
|
|
|
+ width: 129px;
|
|
|
+ height: 50px;
|
|
|
+ background: rgba(48, 142, 255, 1);
|
|
|
+ box-shadow: 0 2px 7px 0 rgba(48, 142, 255, 0.3);
|
|
|
+ border-radius: 2px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+ p {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ line-height: 23px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .cancle {
|
|
|
+ margin-left: 11px;
|
|
|
+ width: 129px;
|
|
|
+ height: 50px;
|
|
|
+ background: rgba(236, 236, 236, 1);
|
|
|
+ border-radius: 2px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+ p {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(102, 102, 102, 1);
|
|
|
+ line-height: 23px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+ .education {
|
|
|
+ width: 657px;
|
|
|
+ min-height: 100px;
|
|
|
+ padding: 43px 47px 63px 57px;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ height: 29px;
|
|
|
+ font-size: 21px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(34, 34, 34, 1);
|
|
|
+ line-height: 29px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .workList {
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .cell {
|
|
|
+ margin-top: 18px;
|
|
|
+ width: 100%;
|
|
|
+ height: 44px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ &:first-child {
|
|
|
+ margin-top: 46px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .left {
|
|
|
+ width: calc(100% - 130px);
|
|
|
+ flex-shrink: 0;
|
|
|
+ .cellTitle {
|
|
|
+ height: 27px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ line-height: 27px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ word-break: keep-all;
|
|
|
+ }
|
|
|
+ .cellSubTitle {
|
|
|
+ height: 19px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(153, 153, 153, 1);
|
|
|
+ line-height: 19px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ word-break: keep-all;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 96px;
|
|
|
+ height: 38px;
|
|
|
+ background: rgba(236, 236, 236, 1);
|
|
|
+ border-radius: 2px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ p {
|
|
|
+ font-size: 16px;
|
|
|
+ color: rgba(102, 102, 102, 1);
|
|
|
+ font-weight: 500;
|
|
|
+ line-height: 23px;
|
|
|
+ }
|
|
|
+ &.none {
|
|
|
+ background: rgba(236, 236, 236, 1);
|
|
|
+ & p {
|
|
|
+ color: rgba(102, 102, 102, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.ok {
|
|
|
+ background: rgba(48, 142, 255, 1);
|
|
|
+ box-shadow: 0px 2px 7px 0px rgba(48, 142, 255, 0.3);
|
|
|
+ & p {
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.click {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ &.noClick {
|
|
|
+ cursor: not-allowed;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|