sunlupeng 1 gadu atpakaļ
vecāks
revīzija
1dfe833b39
8 mainītis faili ar 147 papildinājumiem un 266 dzēšanām
  1. 1 1
      public/index.html
  2. 10 93
      src/App.vue
  3. 11 8
      src/api/allApi.js
  4. 2 8
      src/main.js
  5. 3 124
      src/router/index.js
  6. 9 30
      src/utils/request.js
  7. 1 2
      src/views/HomeView.vue
  8. 110 0
      src/views/Index.vue

+ 1 - 1
public/index.html

@@ -6,7 +6,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
-    <title>誉商城</title>
+    <title>智能简历</title>
   </head>
   <body>
     <noscript>

+ 10 - 93
src/App.vue

@@ -1,119 +1,36 @@
 <template>
   <div id="app">
     <div class="view-container">
-      <AppHeader :visible="visible"></AppHeader>
-      <transition :name="transitionName">
-        <router-view />
-      </transition>
-      <AppBackTop></AppBackTop>
+      <router-view />
     </div>
   </div>
 </template>
 <script>
-import AppHeader from '@/components/AppHeader.vue';
-import AppBackTop from '@/components/AppBackTop.vue';
+
 export default {
   name: 'app',
-  components: {
-    AppHeader,
-    AppBackTop
-  },
   data() {
     return {
-      transitionName: "",
-      isGray: false,
-      visible:true,
+     
     };
   },
   created(){
-    this.$store.dispatch('GetUserInfo');
+   
   },
   methods:{
-    // 保存滚动值,这是兼容的写法
-    handleScroll () {
-      var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
-          //变量scrollTop是滚动条滚动时,距离顶部的距离
-      // var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
-    //   //变量windowHeight是可视区的高度
-    //   var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
-    //   //变量windowHeight是可视区的高度
-    //   var scrollHeight =document.documentElement.scrollHeight || document.body.scrollHeight;
-    //       //滚动条到底部的条件
-    //    if(scrollTop + windowHeight == scrollHeight){
-    //         //你要触发的方法
-    //     }
-        if(scrollTop >= 80){
-            this.visible = false;
-        }else{
-          this.visible = true;
-        }
-    },
+   
   },
   mounted () {
-    window.addEventListener('scroll', this.handleScroll)
+    
   },
 
-  destroyed () {
-    // 离开该页面需要移除这个监听的事件,不然会报错
-    window.removeEventListener('scroll', this.handleScroll)
-  },
-  watch: {
-    //使用watch 监听$router的变化
-    $route(to, from) {
-      //如果to索引大于from索引,判断为前进状态,反之则为后退状态
-      console.log(to, "to");
-      console.log(from, "from");
-      if (to.meta.index > from.meta.index) {
-        //设置动画名称
-        this.transitionName = "slide-left";
-      } else {
-        this.transitionName = "slide-right";
-      }
-    },
-  },
+
 }
 </script>
 <style>
-.el-card__body{
-    padding: 0 10px !important;
-}
-.el-dialog__body{
-  padding-top: 0px !important;
-}
 .view-container{
-  position: relative;
-  margin: 0 auto;
-  width: 100%;
-  max-width: 1200px;
-}
-
-
-.slide-right-enter-active,
-.slide-right-leave-active,
-.slide-left-enter-active,
-.slide-left-leave-active {
-  will-change: transform;
-  transition: all 80ms;
-  position: fixed;
-}
-​
-.slide-right-enter {
-  opacity: 0;
-  transform: translate3d(-100%, 0, 0);
-}
-​
-.slide-right-leave-active {
-  opacity: 0;
-  transform: translate3d(100%, 0, 0);
-}
-​
-.slide-left-enter {
-  opacity: 0;
-  transform: translate3d(100%, 0, 0);
-}
-​
-.slide-left-leave-active {
-  opacity: 0;
-  transform: translate3d(-100%, 0, 0);
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 </style>

+ 11 - 8
src/api/allApi.js

@@ -1,5 +1,15 @@
 import request from '@/utils/request'
 
+
+//上传解析简历
+export function upLoadFile(data) {
+  return request({
+    url: '/moonshot/file/upload',
+    method: 'post',
+    data
+  })
+}
+
 //获取培训上传备注
 export function remarkHtml(query) {
   return request({
@@ -18,14 +28,7 @@ export function postList(query) {
   })
 }
 
-//员工互动提交
-export function postInteractSave(data) {
-  return request({
-    url: '/mall-post/add/comment',
-    method: 'post',
-    data
-  })
-}
+
 
 //员工互动列表
 export function postInteractList(query) {

+ 2 - 8
src/main.js

@@ -1,13 +1,13 @@
 import Vue from 'vue'
 import App from './App.vue'
-// import { msgTips } from "@/api/allApi";
+
 import router from './router'
 import store from './store'
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 import './assets/css/global.css';
 import './assets/icon/iconfont.css';
-import './permission' // permission control
+// import './permission' // permission control
 
 const prodUrl = 'https://xiaoyou.dgtis.com/admin/storage/create';//正式地址
 
@@ -19,12 +19,6 @@ const baseUrl = process.env.NODE_ENV === 'production' ? prodUrl : devUrl;
 Vue.prototype.baseUrl = baseUrl;
 Vue.config.productionTip = false;
 
-// Vue.prototype.getMsgTips = function (){
-//   msgTips().then(response => {
-//     return response.data.data
-//   })
-// }
-// this.getMsgTips();
 Vue.use(ElementUI);
 new Vue({
   router,

+ 3 - 124
src/router/index.js

@@ -1,135 +1,14 @@
 import Vue from 'vue'
 import VueRouter from 'vue-router'
-import HomeView from '../views/HomeView.vue'
-import PointsRank from '../views/PointsRank.vue'
 
 Vue.use(VueRouter)
 
 const routes = [
   {
-    path:'/',
-    redirect:'/home',
+    path: '/',
+    component: () => import('@/views/Index.vue'),
   },
-  {
-    path: '/home',
-    component: HomeView,
-    redirect:'/home/pointsMall',
-    children: [
-      {
-        path: '/home/index',
-        component: () => import('@/views/HomeView/Index.vue'),
-        meta: {
-          index: 1
-        }
-      },
-      {
-        path: '/home/index/msgDetail',
-        component: () => import('@/views/HomeView/MsgDetail.vue')
-      },
-      {
-        path: '/home/signIn',
-        component: () => import('@/views/HomeView/SignIn.vue')
-      },
-      {
-        path: '/home/myMedal',
-        component: () => import('@/views/HomeView/MyMedal.vue')
-      },
-      {
-        path: '/home/commend',
-        component: () => import('@/views/HomeView/Commend.vue')
-      },
-      {
-        path: '/home/commend/commendDetail',
-        component: () => import('@/views/HomeView/CommendDetail.vue')
-      },
-      {
-        path: '/home/earnPoints',
-        component: () => import('@/views/HomeView/EarnPoints.vue')
-      },
-      {
-        path: '/home/citeList',
-        component: () => import('@/views/HomeView/CiteList.vue')
-      },
-      {
-        path: '/home/pointsMall',
-        component: () => import('@/views/HomeView/PointsMall.vue')
-      },
-      {
-        path: '/home/pointsMall/redeem',
-        component: () => import('@/views/HomeView/RedeemView.vue')
-      },
-      {
-        path: '/home/myCenter/goodsDetail',
-        component: () => import('@/views/HomeView/GoodsDetail.vue')
-      },
-      {
-        path: '/home/pointsMall/goodDetail',
-        component: () => import('@/views/HomeView/GoodDetail.vue')
-      },
-      {
-        path: '/home/welfareList',
-        component: () => import('@/views/HomeView/WelfareList.vue')
-      },
-      {
-        path: '/home/myCenter',
-        component: () => import('@/views/HomeView/MyCenter.vue')
-      },
-      {
-        path: '/home/festiveEvents',
-        component: () => import('@/views/HomeView/FestiveEvents.vue')
-      },
-      {
-        path: '/home/festiveEvents/game',
-        component: () => import('@/views/HomeView/Game.vue')
-      },
-      {
-        path: '/home/festiveEvents/answerGame',
-        component: () => import('@/views/HomeView/AnswerGame/AnswerGame.vue')
-      },
-      {
-        path: '/home/festiveEvents/qiXiGame',
-        component: () => import('@/views/HomeView/AnswerGame/QiXiAnswerGame.vue')
-      },
-      {
-        path: '/home/festiveEvents/lanternFestival',
-        component: () => import('@/views/HomeView/AnswerGame/LanternFestival.vue')
-      },
-      {
-        path: '/home/festiveEvents/drawCarouselGame',
-        component: () => import('@/views/HomeView/DrawCarouselGame/DrawCarouselGame.vue')
-      },
-      {
-        path: '/home/postInteract',
-        component: () => import('@/views/HomeView/postInteract/list.vue')
-      },
-      {
-        path: '/home/postInteract/detail',
-        component: () => import('@/views/HomeView/postInteract/detail.vue')
-      },
-    ]
-  },
-  {
-    path: '/noticeCenter',
-    component: () => import('../views/NoticeCenter.vue'),
-    meta: {
-      index: 2
-    }
-  },
-  {
-    path: '/pointsRank',
-    component: PointsRank,
-    redirect:'/pointsRank/present',
-    children: [
-      {
-        path: '/pointsRank/present',
-        component: () => import('@/views/PointsRank/Present.vue')
-      },
-      {
-        path: '/pointsRank/history',
-        component: () => import('@/views/PointsRank/History.vue')
-      },
-    ]
-  }
+
 ]
 
 const router = new VueRouter({

+ 9 - 30
src/utils/request.js

@@ -3,16 +3,11 @@ import { Message, MessageBox } from 'element-ui'
 import { getToken } from '@/utils/auth'
 
 let prodBaseURL = 'https://xiaoyou.dgtis.com/admin';//正式地址
-
-// let prodBaseURL = 'http://47.103.79.143:9085/admin';//阿里云地址
-
-let devBaseURL = 'http://192.168.100.208:9083/admin';//测试地址
-
-// let devBaseURL = 'http://47.103.79.143:9085/admin';//阿里云地址
+let devBaseURL = 'http://192.168.100.234:8093';//本地地址
 // create an axios instance
 const service = axios.create({
   baseURL: process.env.NODE_ENV === 'production' ? prodBaseURL : devBaseURL,// api 的 base_url
-  timeout: 10000 // request timeout
+  timeout: 120000 // request timeout
 })
 
 // request interceptor
@@ -32,29 +27,13 @@ service.interceptors.request.use(config => {
 service.interceptors.response.use(
   response => {
     const res = response.data
-    let errmsg = res.errmsg;
-    if (res.errno !== 0) {
-      if(res.errno==503){
-        MessageBox.alert('超时自动退出系统,请重新登录', '已退出', {
-          confirmButtonText: '重新登录',
-          type: 'error'
-        }).then(() => {
-            
-            const prodHref = 'http://dgt.dgtis.com/oneportal/login';//正式地址
-
-            // const prodHref = 'http://dgtcloud.dgtis.com/oneportal/login';//阿里云地址
-          
-            const devHref = 'http://192.168.100.208:8080/oneportal/login'; //测试地址
-
-            location.href = process.env.NODE_ENV === 'production' ? prodHref : devHref;
-        })
-      }else{
-        Message({
-          message: errmsg,
-          type: 'error',
-          duration: 2 * 1000
-        })
-      }
+    let errmsg = res.msg;
+    if (res.code !== 200) {
+      Message({
+        message: errmsg,
+        type: 'error',
+        duration: 2 * 1000
+      })
       return Promise.reject('error')
     } else {
       return response

+ 1 - 2
src/views/HomeView.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="main-container">
-    <AppSidebar></AppSidebar>
-    <router-view />
+    lalal
   </div>
 </template>
 

+ 110 - 0
src/views/Index.vue

@@ -0,0 +1,110 @@
+<template>
+    <el-card class="box-card">
+        <div class="box">
+            <input type="file" @change="getFile($event)" style="margin: 20px 0;">
+            <el-button type="primary" size="small">智能评估</el-button>
+            <el-descriptions title="基本信息">
+                <el-descriptions-item label="姓名">{{ resume.userName }}</el-descriptions-item>
+                <el-descriptions-item label="性别">{{ resume.gender }}</el-descriptions-item>
+                <el-descriptions-item label="年龄">{{ resume.age }}</el-descriptions-item>
+                <el-descriptions-item label="学历">{{ resume.degree }}</el-descriptions-item>
+                <el-descriptions-item label="电话">{{ resume.mobile }}</el-descriptions-item>
+
+                <el-descriptions-item label="邮箱">{{ resume.email }}</el-descriptions-item>
+                <el-descriptions-item label="居住地">{{ resume.address }}</el-descriptions-item>
+                <el-descriptions-item label="自我评价">{{ resume.selfIntroduce }}</el-descriptions-item>
+            </el-descriptions>
+
+            <h4>教育经历</h4>
+            <div v-for="(item,index) in resume.eduList" :key="index" style="margin-bottom: 15px;">
+                <el-descriptions>
+                    <el-descriptions-item label="学位名称">{{ item.degree }}</el-descriptions-item>
+                    <el-descriptions-item label="专业名称">{{ item.major }}</el-descriptions-item>
+                    <el-descriptions-item label="学校名称">{{ item.schoolName }}</el-descriptions-item>
+                    <el-descriptions-item label="毕业年份">{{ item.graduationYear }}</el-descriptions-item>
+                </el-descriptions>
+            </div>
+
+            <h4>工作经验</h4>
+            <div v-for="(item,index) in resume.workList" :key="index" style="margin-bottom: 15px;">
+                <el-descriptions>
+                    <el-descriptions-item label="公司名称">{{ item.companyName }}</el-descriptions-item>
+                    <el-descriptions-item label="职位名称">{{ item.postionName }}</el-descriptions-item>
+                    <el-descriptions-item label="开始时间">{{ item.iinductionStartDate }}</el-descriptions-item>
+                    <el-descriptions-item label="结束时间">{{ item.iinductionEndDate }}</el-descriptions-item>
+                    <el-descriptions-item label="职责">{{ item.workDetail }}</el-descriptions-item>
+                </el-descriptions>
+            </div>  
+        
+            <h4>项目经验</h4>
+            <div v-for="(item,index) in resume.projectList" :key="index" style="margin-bottom: 15px;">
+                <el-descriptions>
+                    <el-descriptions-item label="项目名称">{{ item.projectName }}</el-descriptions-item>
+                    <el-descriptions-item label="项目简介">{{ item.projectDetail }}</el-descriptions-item>
+                    <el-descriptions-item label="角色">{{ item.partIn }}</el-descriptions-item>
+                    <el-descriptions-item label="主要贡献">{{ item.contributions }}</el-descriptions-item>
+                    <el-descriptions-item label="技术或工具">{{ item.developTools }}</el-descriptions-item>
+                </el-descriptions>
+            </div>
+
+            <h4>专业技能</h4>
+            {{ resume.keyWords }}
+
+            <h4>证书</h4>
+            {{ resume.certificate }}
+
+            <h4>语言能力</h4>
+            {{ resume.languageAbility }}
+
+            <h4>兴趣或爱好</h4>
+            {{ resume.selfEvaluation }}
+        </div>
+    </el-card>
+</template>
+<script scoped>
+import { upLoadFile } from "@/api/allApi";
+import { Loading } from 'element-ui';
+export default{
+  data() {
+    return {
+        resume:{},
+    };
+  },
+ created(){
+    
+  },
+  methods:{
+    getFile(event){
+        console.log(event);
+        let options =  {
+            lock:true,    //是否锁定
+            text:"正在解析简历请稍后。。。",   //显示在加载图标下方的加载文案
+            background:'rgba(0,0,0,.7)',   //遮罩背景色
+        };
+        let loadingInstance = Loading.service(options);
+        var file = event.target.files[0];
+        var formData = new FormData();
+        formData.append('file', file);
+        upLoadFile(formData).then(response=>{
+          loadingInstance.close();
+          console.log(response.data);
+          let data = response.data
+          if(data.code==200){
+            this.resume = data.resume;
+          }else{
+            this.$message.error(data.msg);
+          }
+        })
+    },
+  },
+}
+</script>
+<style scoped>
+.box-card{
+    margin-top: 50px;
+}
+.box{
+   
+    width: 1200px;
+}
+</style>