xtz hace 4 años
padre
commit
8b13e16709

+ 1 - 1
src/common/api/axios.js

@@ -29,7 +29,7 @@ service.interceptors.request.use(
       'from': 0,
       'page': 1,
       'rows': 10,
-      'companyId': 2 || localStorage.getItem('managerid') - 0,
+      'companyId': localStorage.getItem('managerid') - 0,
       'sidx': '',
       'sord': '',
       'token': localStorage.getItem('token'),

+ 121 - 132
src/components/vNav/vNav.vue

@@ -1,33 +1,21 @@
 <template>
-  <div class="vNavCom">
+<div class="vNavCom">
     <div class="logo">
-      <!-- <img src="../../../public/img/logo.png" alt=""> -->
-      优创面试后台管理
+        <!-- <img src="../../../public/img/logo.png" alt=""> -->
+        优创面试后台管理
     </div>
-    <el-menu
-      background-color="#1D2088"
-      @select="handleSelect"
-      text-color="#F1F1F1"
-      unique-opened
-      active-text-color="#fff">
-      <el-submenu v-for="(item,index) in route||filterOne" :key="index" :index="`${index}`">
-        <template slot="title" >
-          <span :class="'iconfont '+item.icon"></span>
-          <span class="a_menu">{{item.name}}</span>
-        </template>
-        <el-menu-item
-          v-for="(child,childIndex) in item.child||item.child.filter(j => menuIdList.includes(j.menuid))"
-          @click="jump(child.to)"
-          :class="$route.name===child.to ? 'is-active' : ''"
-          :key="childIndex"
-          :index="`${index}-${childIndex}`"
-          :style="childIndex!==item.child.length-1?'margin-bottom: 15px':''"
-          >
-          <div>{{child.name}}</div>
-        </el-menu-item>
-      </el-submenu>
+    <el-menu background-color="#1D2088" @select="handleSelect" text-color="#F1F1F1" unique-opened active-text-color="#fff">
+        <el-submenu v-for="(item,index) in route||filterOne" :key="index" :index="`${index}`">
+            <template slot="title">
+                <span :class="'iconfont '+item.icon"></span>
+                <span class="a_menu">{{item.name}}</span>
+            </template>
+            <el-menu-item v-for="(child,childIndex) in item.child||item.child.filter(j => menuIdList.includes(j.menuid))" @click="jump(child.to)" :class="$route.name===child.to ? 'is-active' : ''" :key="childIndex" :index="`${index}-${childIndex}`" :style="childIndex!==item.child.length-1?'margin-bottom: 15px':''">
+                <div>{{child.name}}</div>
+            </el-menu-item>
+        </el-submenu>
     </el-menu>
-  </div>
+</div>
 </template>
 
 <script>
@@ -37,96 +25,92 @@ export default {
       list: [],
       number: 0,
       menuIdList: [],
-      route: [
+      route: [{
+        name: '公司设置',
+        // menuid: 100,
+        to: '',
+        icon: 'iconshangpinguanlix f-16',
+        child: [{
+          name: '基本信息设置',
+          menuid: 503,
+          to: 'basicInfo'
+        },
+        {
+          name: '职位信息设置',
+          menuid: 504,
+          to: 'positionInfo'
+        },
+        {
+          name: '简历信息设置',
+          menuid: 505,
+          to: 'formManage'
+        },
+        {
+          name: '面试问题设置',
+          menuid: 506,
+          to: 'procedureManage'
+        },
+        {
+          name: '视频库管理',
+          menuid: 507,
+          to: 'videoManage'
+        },
+        {
+          name: '应用场景管理',
+          menuid: 508,
+          to: 'sceneManage'
+        },
+        {
+          name: '邀约管理',
+          menuid: 509,
+          to: 'templateManage'
+        },
+        {
+          name: '邮箱管理',
+          menuid: 510,
+          to: 'mailManage'
+        }
+        ]
+      },
+      {
+        name: '候选人管理',
+        // menuid: 200,
+        to: '',
+        icon: 'iconshangpinguanlix f-16',
+        child: [{
+          name: '人才库',
+          menuid: 511,
+          to: 'candidateAll'
+        },
         {
-          name: '公司设置',
-          // menuid: 100,
-          to: '',
-          icon: 'iconshangpinguanlix f-16',
-          child: [
-            {
-              name: '基本信息设置',
-              menuid: 503,
-              to: 'basicInfo'
-            },
-            {
-              name: '职位信息设置',
-              menuid: 504,
-              to: 'positionInfo'
-            },
-            {
-              name: '简历信息设置',
-              menuid: 505,
-              to: 'formManage'
-            },
-            {
-              name: '面试问题设置',
-              menuid: 506,
-              to: 'procedureManage'
-            },
-            {
-              name: '视频库管理',
-              menuid: 507,
-              to: 'videoManage'
-            },
-            {
-              name: '应用场景管理',
-              menuid: 508,
-              to: 'sceneManage'
-            },
-            {
-              name: '模板管理',
-              menuid: 509,
-              to: 'templateManage'
-            },
-            {
-              name: '邮箱管理',
-              menuid: 510,
-              to: 'mailManage'
-            }
-          ]
+          name: '简历管理',
+          menuid: 512,
+          to: 'resumeList'
         },
         {
-          name: '候选人管理',
-          // menuid: 200,
-          to: '',
-          icon: 'iconshangpinguanlix f-16',
-          child: [
-            {
-              name: '人才库',
-              menuid: 511,
-              to: 'candidateAll'
-            },
-            {
-              name: '简历管理',
-              menuid: 512,
-              to: 'resumeList'
-            },
-            {
-              name: '面试管理',
-              menuid: 513,
-              to: 'candidateList'
-            }
-          ]
+          name: '面试管理',
+          menuid: 513,
+          to: 'candidateList'
+        }
+        ]
+      },
+      {
+        name: '用户管理',
+        // menuid: 200,
+        to: '',
+        icon: 'iconshangpinguanlix f-16',
+        child: [{
+          name: '密码设置',
+          menuid: 514,
+          to: 'passwordSettings'
         },
         {
-          name: '用户管理',
-          // menuid: 200,
-          to: '',
-          icon: 'iconshangpinguanlix f-16',
-          child: [
-            {
-              name: '密码设置',
-              menuid: 514,
-              to: 'passwordSettings'
-            },
-            {
-              name: '数据统计',
-              menuid: 515,
-              to: 'statistics'
-            }
-          ]
+          name: '数据统计',
+          menuid: 515,
+          to: 'statistics'
         }
+        ]
+      }
       ]
     }
   },
@@ -153,7 +137,9 @@ export default {
   methods: {
     queryNumber () {
       let reqdata = {}
-      this.$api.post('/platform/company/platformNotExamineCompanyCount', { reqdata }).then(res => {
+      this.$api.post('/platform/company/platformNotExamineCompanyCount', {
+        reqdata
+      }).then(res => {
         // this.number = res.object.notExamineCompanyCount
         this.$store.commit('setNumber', res.object.notExamineCompanyCount)
       })
@@ -165,37 +151,40 @@ export default {
       if (this.$route.name === to) {
         return false
       }
-      this.$router.push({ name: to })
+      this.$router.push({
+        name: to
+      })
     }
   }
 }
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 @import './vNav.scss';
-  /deep/.el-submenu__title i{
+
+/deep/.el-submenu__title i {
     color: #ffffff;
-  }
-  .logo{
+}
+
+.logo {
     color: #ffffff;
     font-size: 20px;
     padding: 15% 0 13% 0;
-  }
-  // .vNavCom{
-  //   overflow-y: scroll;
-  // }
-  // .vNavCom::-webkit-scrollbar{
-  //   display:none;
-  // }
-</style>
+}
 
-<style lang="scss">
-  .el-submenu{
-    .el-badge__content{
-      margin-top: 25%!important;
-      position: relative;
-      width: 20px;
-      left: 25px;
+// .vNavCom{
+//   overflow-y: scroll;
+// }
+// .vNavCom::-webkit-scrollbar{
+//   display:none;
+// }
+</style><style lang="scss">
+.el-submenu {
+    .el-badge__content {
+        margin-top: 25% !important;
+        position: relative;
+        width: 20px;
+        left: 25px;
     }
-  }
+}
 </style>

+ 125 - 110
src/views/candidateManage/mailManage.vue

@@ -7,85 +7,85 @@
  * @LastEditTime: 2020-08-10 19:59:58
 -->
 <template>
-  <div class="mailManage">
+<div class="mailManage">
     <el-card class="box-card">
-      <div class="title">收件邮箱</div>
-      <el-form ref="form51" :model="form51" :rules="rules" label-width="140px" label-position="left">
-        <el-form-item label="51job邮箱" prop="cmpMailAccount">
-          <el-input v-model.trim="form51.cmpMailAccount"></el-input>
-        </el-form-item>
-        <el-form-item label="密码" prop="cmpMailPassword">
-          <el-input v-model.trim="form51.cmpMailPassword" show-password></el-input>
-        </el-form-item>
-        <el-form-item label="邮箱类型" prop="cmpMailType">
-          <el-radio-group v-model="form51.cmpMailType">
-            <el-radio :label="0">阿里</el-radio>
-            <el-radio :label="1">网易</el-radio>
-            <el-radio :label="2">QQ</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item class="button-grounp">
-          <el-button type="primary" @click="determine(0)">验证并使用</el-button>
-        </el-form-item>
-      </el-form>
-      <el-form ref="formzl" :model="formzl" :rules="rules" label-width="140px" label-position="left">
-        <el-form-item label="智联邮箱" prop="cmpMailAccount">
-          <el-input v-model.trim="formzl.cmpMailAccount"></el-input>
-        </el-form-item>
-        <el-form-item label="密码" prop="cmpMailPassword">
-          <el-input v-model.trim="formzl.cmpMailPassword" show-password></el-input>
-        </el-form-item>
-        <el-form-item label="邮箱类型" prop="cmpMailType">
-          <el-radio-group v-model="formzl.cmpMailType">
-            <el-radio :label="0">阿里</el-radio>
-            <el-radio :label="1">网易</el-radio>
-            <el-radio :label="2">QQ</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item class="button-grounp">
-          <el-button type="primary" @click="determine(1)">验证并使用</el-button>
-        </el-form-item>
-      </el-form>
-      <el-form ref="form58" :model="form58" :rules="rules" label-width="140px" label-position="left">
-        <el-form-item label="58邮箱" prop="cmpMailAccount">
-          <el-input v-model.trim="form58.cmpMailAccount"></el-input>
-        </el-form-item>
-        <el-form-item label="密码" prop="cmpMailPassword">
-          <el-input v-model.trim="form58.cmpMailPassword" show-password></el-input>
-        </el-form-item>
-        <el-form-item label="邮箱类型" prop="cmpMailType">
-          <el-radio-group v-model="form58.cmpMailType">
-            <el-radio :label="0">阿里</el-radio>
-            <el-radio :label="1">网易</el-radio>
-            <el-radio :label="2">QQ</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item class="button-grounp">
-          <el-button type="primary" @click="determine(2)">验证并使用</el-button>
-        </el-form-item>
-      </el-form>
-      <div class="title">发件邮箱</div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="140px" label-position="left">
-        <el-form-item label="发件邮箱" prop="cmpMailAccount">
-          <el-input v-model.trim="form.cmpMailAccount"></el-input>
-        </el-form-item>
-        <el-form-item label="密码" prop="cmpMailPassword">
-          <el-input v-model.trim="form.cmpMailPassword" show-password></el-input>
-        </el-form-item>
-        <el-form-item label="邮箱类型">
-          <el-radio-group v-model="form.cmpMailType">
-            <el-radio :label="0">阿里</el-radio>
-            <el-radio :label="1">网易</el-radio>
-            <el-radio :label="2">QQ</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item class="button-grounp">
-          <el-button type="primary" @click="submit">验证并使用</el-button>
-        </el-form-item>
-        <div class="info">提示:接受简历的邮箱地址或者密码变更后,需要在本页面修改并点击重新验证,生效时间约30分钟至1小时;如未生效,请联系平台管理员。</div>
-      </el-form>
+        <div class="title">收件邮箱</div>
+        <el-form ref="form51" :model="form51" :rules="rules" label-width="140px" label-position="left">
+            <el-form-item label="51job邮箱" prop="cmpMailAccount">
+                <el-input v-model.trim="form51.cmpMailAccount"></el-input>
+            </el-form-item>
+            <el-form-item label="密码" prop="cmpMailPassword">
+                <el-input v-model.trim="form51.cmpMailPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="邮箱类型" prop="cmpMailType">
+                <el-radio-group v-model="form51.cmpMailType">
+                    <el-radio :label="0">阿里</el-radio>
+                    <el-radio :label="1">网易</el-radio>
+                    <el-radio :label="2">QQ</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item class="button-grounp">
+                <el-button type="primary" @click="determine(0)">验证并使用</el-button>
+            </el-form-item>
+        </el-form>
+        <el-form ref="formzl" :model="formzl" :rules="rules" label-width="140px" label-position="left">
+            <el-form-item label="智联邮箱" prop="cmpMailAccount">
+                <el-input v-model.trim="formzl.cmpMailAccount"></el-input>
+            </el-form-item>
+            <el-form-item label="密码" prop="cmpMailPassword">
+                <el-input v-model.trim="formzl.cmpMailPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="邮箱类型" prop="cmpMailType">
+                <el-radio-group v-model="formzl.cmpMailType">
+                    <el-radio :label="0">阿里</el-radio>
+                    <el-radio :label="1">网易</el-radio>
+                    <el-radio :label="2">QQ</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item class="button-grounp">
+                <el-button type="primary" @click="determine(1)">验证并使用</el-button>
+            </el-form-item>
+        </el-form>
+        <el-form ref="form58" :model="form58" :rules="rules" label-width="140px" label-position="left">
+            <el-form-item label="58邮箱" prop="cmpMailAccount">
+                <el-input v-model.trim="form58.cmpMailAccount"></el-input>
+            </el-form-item>
+            <el-form-item label="密码" prop="cmpMailPassword">
+                <el-input v-model.trim="form58.cmpMailPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="邮箱类型" prop="cmpMailType">
+                <el-radio-group v-model="form58.cmpMailType">
+                    <el-radio :label="0">阿里</el-radio>
+                    <el-radio :label="1">网易</el-radio>
+                    <el-radio :label="2">QQ</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item class="button-grounp">
+                <el-button type="primary" @click="determine(2)">验证并使用</el-button>
+            </el-form-item>
+        </el-form>
+        <div class="title">发件邮箱</div>
+        <el-form ref="form" :model="form" :rules="rules" label-width="140px" label-position="left">
+            <el-form-item label="发件邮箱" prop="cmpMailAccount">
+                <el-input v-model.trim="form.cmpMailAccount"></el-input>
+            </el-form-item>
+            <el-form-item label="密码" prop="cmpMailPassword">
+                <el-input v-model.trim="form.cmpMailPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="邮箱类型">
+                <el-radio-group v-model="form.cmpMailType">
+                    <el-radio :label="0">阿里</el-radio>
+                    <el-radio :label="1">网易</el-radio>
+                    <el-radio :label="2">QQ</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item class="button-grounp">
+                <el-button type="primary" @click="submit">验证并使用</el-button>
+            </el-form-item>
+            <div class="info">提示:接受简历的邮箱地址或者密码变更后,需要在本页面修改并点击重新验证,生效时间约30分钟至1小时;如未生效,请联系平台管理员。</div>
+        </el-form>
     </el-card>
-  </div>
+</div>
 </template>
 
 <script>
@@ -120,14 +120,15 @@ export default {
           reqdata: {}
         })
         .then((res) => {
-          try {
-            res.list.filter(item => item.useType !== 1).forEach((item, index) => {
-              this[index === 0 ? 'form51' : index === 1 ? 'formzl' : 'form58'] = item
-            })
-            this.form = res.list.find(item => item.useType === 1)
-          } catch (error) {
-            console.log(error)
-          }
+          let list = res.list.filter(item => item.useType !== 1)
+          console.log(list[0])
+          // this.$set(this.$data, 'form51', list[0] ? list[0] : this.form51)
+          // this.$set(this.$data, 'formzl', list[1] ? list[1] : this.formzl)
+          // this.$set(this.$data, 'form58', list[2] ? list[2] : this.form58)
+          list[0] && Object.assign(this.form51, list[0])
+          list[1] && Object.assign(this.formzl, list[1])
+          list[2] && Object.assign(this.form58, list[2])
+          this.form = res.list.some(item => item.useType === 1) ? res.list.find(item => item.useType === 1) : {}
         })
     }
     let submit = () => {
@@ -158,27 +159,39 @@ export default {
     }
     return {
       form51: {
+        cmpMailAccount: '',
+        cmpMailPassword: '',
         cmpMailType: 0
       },
       formzl: {
+        cmpMailAccount: '',
+        cmpMailPassword: '',
         cmpMailType: 0
       },
       form58: {
+        cmpMailAccount: '',
+        cmpMailPassword: '',
         cmpMailType: 0
       },
       form: {
+        cmpMailAccount: '',
+        cmpMailPassword: '',
         cmpMailType: 0
       },
       determine,
       queryDate,
       submit,
       rules: {
-        cmpMailAccount: [
-          { required: true, message: '请输入邮箱账号', trigger: 'blur' }
-        ],
-        cmpMailPassword: [
-          { required: true, message: '请输入邮箱密码', trigger: 'blur' }
-        ]
+        cmpMailAccount: [{
+          required: true,
+          message: '请输入邮箱账号',
+          trigger: 'blur'
+        }],
+        cmpMailPassword: [{
+          required: true,
+          message: '请输入邮箱密码',
+          trigger: 'blur'
+        }]
       }
     }
   },
@@ -190,34 +203,36 @@ export default {
 
 <style lang="scss" scoped>
 .mailManage {
-  display: flex;
-  justify-content: center;
-  align-content: center;
+    display: flex;
+    justify-content: center;
+    align-content: center;
 }
+
 .box-card {
-  width: 800rpx;
-  padding: 18px 0;
+    width: 800rpx;
+    padding: 18px 0;
 }
+
 .button-grounp {
-  display: flex;
-  justify-content: flex-end;
+    display: flex;
+    justify-content: flex-end;
 }
+
 .info {
-  width: 540px;
-  color: #bbb;
-  font-size: 12px;
+    width: 540px;
+    color: #bbb;
+    font-size: 12px;
 }
+
 .title {
-  padding: 15px;
-  text-align: center;
-  font-size: 20px;
+    padding: 15px;
+    text-align: center;
+    font-size: 20px;
 }
-</style>
-
-<style lang="scss">
+</style><style lang="scss">
 .mailManage {
-  .el-input__inner {
-    width: 400px !important;
-  }
+    .el-input__inner {
+        width: 400px !important;
+    }
 }
 </style>

+ 5 - 5
src/views/candidateManage/resumeList.vue

@@ -11,8 +11,8 @@
     <v-input :btn="btn" :list="list" @del="delAll" @notice="noticeAll" @through="throughAll" @eliminate="eliminateAll" @undetermined="undeterminedAll" @search="search"></v-input>
     <el-radio-group v-model="isCollapse" size="medium" style="margin-bottom: 20px;">
         <el-radio-button :label="0">未读</el-radio-button>
-        <el-radio-button :label="1">适合</el-radio-button>
-        <el-radio-button :label="2">不适合</el-radio-button>
+        <el-radio-button :label="1">通过</el-radio-button>
+        <el-radio-button :label="2">淘汰</el-radio-button>
         <el-radio-button :label="3">待定</el-radio-button>
         <el-radio-button :label="4">已通知</el-radio-button>
     </el-radio-group>
@@ -206,7 +206,7 @@ export default {
         method: 'through'
       },
       {
-        name: '标淘汰',
+        name: '标淘汰',
         type: 'warning',
         method: 'eliminate'
       },
@@ -776,7 +776,7 @@ export default {
           method: 'through'
         },
         {
-          name: '标淘汰',
+          name: '标淘汰',
           type: 'warning',
           method: 'eliminate'
         },
@@ -797,7 +797,7 @@ export default {
             method: 'notice'
           },
           {
-            name: '标淘汰',
+            name: '标淘汰',
             type: 'warning',
             method: 'eliminate'
           }

+ 98 - 113
src/views/companyManage/procedureManage.vue

@@ -7,74 +7,50 @@
  * @LastEditTime: 2020-08-11 15:48:51
 -->
 <template>
-  <div class="indexPage">
+<div class="indexPage">
     <v-input :btn="btn" :list="list" @add="add"></v-input>
-    <v-table
-      :table="table"
-      :tableList="tableList"
-      :sortType="true"
-      :queryData="queryData"
-      @details="details"
-      @editor="editor"
-      @del="del"
-    ></v-table>
+    <v-table :table="table" :tableList="tableList" :sortType="true" :queryData="queryData" @details="details" @editor="editor" @del="del"></v-table>
     <!-- :prop="'questionList.' + index + '.questionName'" -->
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
     <el-dialog :visible.sync="dialogFormVisible" width="660px" :before-close="close" :close-on-click-modal="false">
-      <el-form :model="form" ref="form" label-width="140px" label-position="left">
-        <el-form-item label="流程名称" prop="processName" :rules="{
-            required: true, message: '问题不能为空', trigger: 'blur'
+        <el-form :model="form" ref="form" label-width="140px" label-position="left">
+            <el-form-item label="岗位名称" prop="processName" :rules="{
+            required: true, message: '请输入岗位名称', trigger: 'blur'
           }">
-          <el-input v-model.trim="form.processName" placeholder="请输入流程名称" v-if="state!=2" autocomplete="off"></el-input>
-          <div v-else>{{form.processName}}</div>
-        </el-form-item>
-        <el-form-item
-          v-for="(item, index) in form.questionList"
-          :label="'面试问题' + (index + 1)"
-          :key="item.key"
-          :prop="'questionList.' + index"
-          :rules="{
+                <el-input v-model.trim="form.processName" placeholder="请输入岗位名称" v-if="state!=2" autocomplete="off"></el-input>
+                <div v-else>{{form.processName}}</div>
+            </el-form-item>
+            <el-form-item v-for="(item, index) in form.questionList" :label="'面试问题' + (index + 1)" :key="item.key" :prop="'questionList.' + index" :rules="{
             required: true, validator: validatePass, trigger: 'change'
-          }"
-        >
-          <div v-if="state!=2">
-            <div class="flex">
-              <el-input v-model.trim="item.questionName" placeholder="请输入面试问题"></el-input>
-              <el-button type="danger" @click.prevent="index === 0 || removeDomain(item)">删除</el-button>
-            </div>
-            <el-select
-              v-model="item.videoIdList"
-              multiple
-              filterable
-              :disabled="state === 2"
-              default-first-option
-              placeholder="请选择面试视频">
-              <el-option
-                v-for="item in downList"
-                :key="item.key || item.id"
-                :label="item.videoName"
-                :value="item.id">
-              </el-option>
-            </el-select>
-          </div>
-          <div v-else>
-            <div>
-              {{item.questionName}}
-            </div>
-            <video width="100%" v-if="item.videoIdList && item.videoIdList.length" :src="downList.some(i => i.id === item.videoIdList[item.active]) ? $img + downList.find(i => i.id === item.videoIdList[item.active]).videoPath : ''" controls></video>
-            <div class="flex">
-               <div v-for="(i, j) in item.videoIdList" :key="i" class="active" @click="updateActive(item, index, j)" :class="item.active === j ? 'is-active' : ''">{{downList.some(k => k.id === i) ? downList.find(k => k.id === i).videoName : '无数据'}}</div>
-            </div>
-          </div>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="close">取 消</el-button>
-        <el-button v-if="state!==2" @click="addDomain" type="success">新增</el-button>
-        <el-button type="primary" v-if="state!==2" @click="branch">确 定</el-button>
-      </div>
+          }">
+                <div v-if="state!=2">
+                    <div class="flex">
+                        <el-input v-model.trim="item.questionName" placeholder="请输入面试问题"></el-input>
+                        <el-button type="danger" @click.prevent="index === 0 || removeDomain(item)">删除</el-button>
+                    </div>
+                    <el-select v-model="item.videoIdList" multiple filterable :disabled="state === 2" default-first-option placeholder="请选择面试视频">
+                        <el-option v-for="item in downList" :key="item.key || item.id" :label="item.videoName" :value="item.id">
+                        </el-option>
+                    </el-select>
+                </div>
+                <div v-else>
+                    <div>
+                        {{item.questionName}}
+                    </div>
+                    <video width="100%" v-if="item.videoIdList && item.videoIdList.length" :src="downList.some(i => i.id === item.videoIdList[item.active]) ? $img + downList.find(i => i.id === item.videoIdList[item.active]).videoPath : ''" controls></video>
+                    <div class="flex">
+                        <div v-for="(i, j) in item.videoIdList" :key="i" class="active" @click="updateActive(item, index, j)" :class="item.active === j ? 'is-active' : ''">{{downList.some(k => k.id === i) ? downList.find(k => k.id === i).videoName : '无数据'}}</div>
+                    </div>
+                </div>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="close">取 消</el-button>
+            <el-button v-if="state!==2" @click="addDomain" type="success">新增</el-button>
+            <el-button type="primary" v-if="state!==2" @click="branch">确 定</el-button>
+        </div>
     </el-dialog>
-  </div>
+</div>
 </template>
 
 <script>
@@ -96,9 +72,9 @@ export default {
       page: 1,
       totalrecords: 0,
       form: {
-        questionList: [
-          { key: 1 }
-        ]
+        questionList: [{
+          key: 1
+        }]
       },
       state: 0,
       active: 0,
@@ -107,40 +83,36 @@ export default {
       pickList: [],
       list: [],
       delId: [],
-      btn: [
+      btn: [{
+        name: '添加',
+        type: 'success',
+        method: 'add'
+      }],
+      table: {
+        column: [{
+          label: '编号',
+          props: 'id'
+        },
         {
-          name: '添加',
-          type: 'success',
-          method: 'add'
+          label: '流程名称',
+          props: 'processName'
         }
-      ],
-      table: {
-        column: [
-          {
-            label: '编号',
-            props: 'id'
-          },
-          {
-            label: '流程名称',
-            props: 'processName'
-          }
         ],
-        handle: [
-          {
-            title: '查看',
-            method: 'details',
-            type: 'info'
-          },
-          {
-            title: '编辑',
-            method: 'editor',
-            type: 'warning'
-          },
-          {
-            title: '删除',
-            method: 'del',
-            type: 'danger'
-          }
+        handle: [{
+          title: '查看',
+          method: 'details',
+          type: 'info'
+        },
+        {
+          title: '编辑',
+          method: 'editor',
+          type: 'warning'
+        },
+        {
+          title: '删除',
+          method: 'del',
+          type: 'danger'
+        }
         ]
       },
       validatePass
@@ -185,7 +157,9 @@ export default {
       this.state = 0
     },
     getDetails (row) {
-      let reqdata = { id: row.id }
+      let reqdata = {
+        id: row.id
+      }
       this.$api
         .post('/process/queryProcessDetail', {
           reqdata
@@ -214,7 +188,9 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        let reqdata = { id: row.id }
+        let reqdata = {
+          id: row.id
+        }
         this.$api
           .post('/process/deleteProcess', {
             reqdata
@@ -308,8 +284,14 @@ export default {
     },
     close () {
       this.dialogFormVisible = false
-      this.form = { processName: '', questionList: [] }
-      this.form.questionList.push({ key: 1, questionName: '' })
+      this.form = {
+        processName: '',
+        questionList: []
+      }
+      this.form.questionList.push({
+        key: 1,
+        questionName: ''
+      })
       this.$forceUpdate()
       console.log(this.form)
     },
@@ -337,21 +319,24 @@ export default {
 
 <style lang="scss" scoped>
 .dialog-footer {
-  display: flex;
-  justify-content: center;
-  align-items: center;
+    display: flex;
+    justify-content: center;
+    align-items: center;
 }
+
 .flex {
-  margin-bottom: 5px;
-  display: flex;
-  .active {
-    cursor: pointer;
-    color: rgb(42, 117, 216);
-    margin: 5px;
-  }
-  .is-active {
-    color: #000;
-    font-size: 16px;
-  }
+    margin-bottom: 5px;
+    display: flex;
+
+    .active {
+        cursor: pointer;
+        color: rgb(42, 117, 216);
+        margin: 5px;
+    }
+
+    .is-active {
+        color: #000;
+        font-size: 16px;
+    }
 }
 </style>

+ 153 - 168
src/views/companyManage/templateManage.vue

@@ -7,112 +7,70 @@
  * @LastEditTime: 2020-08-17 17:38:04
 -->
 <template>
-  <div class="indexPage">
+<div class="indexPage">
     <v-input :btn="btn" :list="list" @add="add"></v-input>
-    <v-table
-      :table="table"
-      :tableList="tableList"
-      :sortType="true"
-      :queryData="queryData"
-      @details="details"
-      @editor="editor"
-      @del="del"
-      @qrCode="qrCode"
-    ></v-table>
+    <v-table :table="table" :tableList="tableList" :sortType="true" :queryData="queryData" @details="details" @editor="editor" @del="del" @qrCode="qrCode"></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
     <el-dialog :visible.sync="dialogFormVisible" :before-close="close" width="650px" :close-on-click-modal="false">
-      <el-form :model="form" ref="form" label-width="140px" :rules="rule" label-position="left">
-        <el-form-item label="模板名称" prop="templateName">
-          <el-input v-if="state !== 2" v-model="form.templateName" placeholder="请输入模板名称" autocomplete="off"></el-input>
-          <div v-else>{{form.templateName}}</div>
-        </el-form-item>
-        <el-form-item label="模板内容" prop="templateIntroduce">
-          <el-input
-            v-if="state !== 2"
-            type="textarea"
-            :rows="4"
-            resize="none"
-            placeholder="请输入模板内容"
-            v-model="form.templateIntroduce"
-          ></el-input>
-          <div v-else>{{form.templateIntroduce}}</div>
-        </el-form-item>
-        <el-form-item label="关联场景" prop="sceneId">
-          <el-select v-if="state !== 2" clearable v-model="form.sceneId" placeholder="请选择关联场景">
-            <el-option
-              v-for="item in downList0"
-              :key="item.id"
-              :label="item.sceneName"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-          <div v-else>{{this.downList0.some(i => i.id === form.sceneId) ? this.downList0.find(i => i.id === form.sceneId).sceneName : ''}}</div>
-        </el-form-item>
-        <el-form-item label="关联流程" prop="processId">
-          <el-select v-if="state !== 2" v-model="form.processId" placeholder="请选择关联流程">
-            <el-option
-              v-for="item in downList1"
-              :key="item.id"
-              :label="item.processName"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-          <div v-else>{{this.downList1.some(i => i.id === form.processId) ? this.downList1.find(i => i.id === form.processId).processName : ''}}</div>
-        </el-form-item>
-        <el-form-item label="关联表单" prop="formId">
-          <el-select v-if="state !== 2" v-model="form.formId" placeholder="请选择关联表单">
-            <el-option
-              v-for="item in downList2"
-              :key="item.id"
-              :label="item.formName"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-           <div v-else>{{this.downList2.some(i => i.id === form.formId) ? this.downList2.find(i => i.id === form.formId).formName : ''}}</div>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="close">取 消</el-button>
-        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
-      </div>
+        <el-form :model="form" ref="form" label-width="140px" :rules="rule" label-position="left">
+            <el-form-item label="模板名称" prop="templateName">
+                <el-input v-if="state !== 2" v-model="form.templateName" placeholder="请输入模板名称" autocomplete="off"></el-input>
+                <div v-else>{{form.templateName}}</div>
+            </el-form-item>
+            <el-form-item label="模板内容" prop="templateIntroduce">
+                <el-input v-if="state !== 2" type="textarea" :rows="4" resize="none" placeholder="请输入模板内容" v-model="form.templateIntroduce"></el-input>
+                <div v-else>{{form.templateIntroduce}}</div>
+            </el-form-item>
+            <el-form-item label="关联场景" prop="sceneId">
+                <el-select v-if="state !== 2" filterable clearable v-model="form.sceneId" placeholder="请选择关联场景">
+                    <el-option v-for="item in downList0" :key="item.id" :label="item.sceneName" :value="item.id"></el-option>
+                </el-select>
+                <div v-else>{{this.downList0.some(i => i.id === form.sceneId) ? this.downList0.find(i => i.id === form.sceneId).sceneName : ''}}</div>
+            </el-form-item>
+            <el-form-item label="关联流程" prop="processId">
+                <el-select v-if="state !== 2" filterable clearable v-model="form.processId" placeholder="请选择关联流程">
+                    <el-option v-for="item in downList1" :key="item.id" :label="item.processName" :value="item.id"></el-option>
+                </el-select>
+                <div v-else>{{this.downList1.some(i => i.id === form.processId) ? this.downList1.find(i => i.id === form.processId).processName : ''}}</div>
+            </el-form-item>
+            <el-form-item label="关联表单" prop="formId">
+                <el-select v-if="state !== 2" filterable clearable v-model="form.formId" placeholder="请选择关联表单">
+                    <el-option v-for="item in downList2" :key="item.id" :label="item.formName" :value="item.id"></el-option>
+                </el-select>
+                <div v-else>{{this.downList2.some(i => i.id === form.formId) ? this.downList2.find(i => i.id === form.formId).formName : ''}}</div>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="close">取 消</el-button>
+            <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
+        </div>
     </el-dialog>
     <el-dialog :visible.sync="dialogVisible" width="650px" :before-close="closeDia" :close-on-click-modal="false">
-      <el-form :model="codeForm" ref="codeForm" label-width="200px" :rules="rules" label-position="left">
-        <el-form-item label="二维码名称" prop="qrcodeName">
-          <el-input v-model="codeForm.qrcodeName" placeholder="请输入二维码名称" autocomplete="off"></el-input>
-        </el-form-item>
-        <el-form-item label="二维码有效期" prop="time">
-          <el-date-picker
-            v-model="codeForm.time"
-            type="daterange"
-            align="right"
-            unlink-panels
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            :picker-options="pickerOptions">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="二维码状态" prop="status">
-          <el-radio-group v-model="codeForm.status">
-            <el-radio :label="0">启用中</el-radio>
-            <el-radio :label="1">禁用中</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <div class="flex">
-          <el-button @click="createQrCoed">{{codeForm.qrcodePath ? '修改二维码' : '生成二维码'}}</el-button>
-        </div>
-        <el-image
-          class="img"
-          :src="codeForm.qrcodePath ? $img + codeForm.qrcodePath : ''"
-          :preview-src-list="[$img + codeForm.qrcodePath]">
-        </el-image>
-        <div class="flex">
-          <el-button @click="downLoad">下载</el-button>
-        </div>
-      </el-form>
+        <el-form :model="codeForm" ref="codeForm" label-width="200px" :rules="rules" label-position="left">
+            <el-form-item label="二维码名称" prop="qrcodeName">
+                <el-input v-model="codeForm.qrcodeName" placeholder="请输入二维码名称" autocomplete="off"></el-input>
+            </el-form-item>
+            <el-form-item label="二维码有效期" prop="time">
+                <el-date-picker v-model="codeForm.time" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item label="二维码状态" prop="status">
+                <el-radio-group v-model="codeForm.status">
+                    <el-radio :label="0">启用中</el-radio>
+                    <el-radio :label="1">禁用中</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <div class="flex">
+                <el-button @click="createQrCoed">{{codeForm.qrcodePath ? '修改二维码' : '生成二维码'}}</el-button>
+            </div>
+            <el-image class="img" :src="codeForm.qrcodePath ? $img + codeForm.qrcodePath : ''" :preview-src-list="[$img + codeForm.qrcodePath]">
+            </el-image>
+            <div class="flex">
+                <el-button @click="downLoad">下载</el-button>
+            </div>
+        </el-form>
     </el-dialog>
-  </div>
+</div>
 </template>
 
 <script>
@@ -133,69 +91,85 @@ export default {
       downList1: [],
       downList2: [],
       rule: {
-        templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
-        templateIntroduce: [{ required: true, message: '请输入模板内容', trigger: 'blur' }]
+        templateName: [{
+          required: true,
+          message: '请输入模板名称',
+          trigger: 'blur'
+        }],
+        templateIntroduce: [{
+          required: true,
+          message: '请输入模板内容',
+          trigger: 'blur'
+        }]
       },
       rules: {
-        qrcodeName: [{ required: true, message: '请输入二维码名称', trigger: 'blur' }],
-        time: [{ required: true, message: '请输入时间区间', trigger: 'blur' }],
-        status: [{ required: true, message: '请选择二维码状态', trigger: 'blur' }]
+        qrcodeName: [{
+          required: true,
+          message: '请输入二维码名称',
+          trigger: 'blur'
+        }],
+        time: [{
+          required: true,
+          message: '请输入时间区间',
+          trigger: 'blur'
+        }],
+        status: [{
+          required: true,
+          message: '请选择二维码状态',
+          trigger: 'blur'
+        }]
       },
       list: [],
-      btn: [
+      btn: [{
+        name: '添加',
+        type: 'success',
+        method: 'add'
+      }],
+      table: {
+        column: [{
+          label: '编号',
+          props: 'id'
+        },
+        {
+          label: '邀约岗位',
+          props: 'templateName'
+        },
+        {
+          label: '关联场景',
+          props: 'sceneName'
+        },
         {
-          name: '添加',
-          type: 'success',
-          method: 'add'
+          label: '关联岗位',
+          props: 'processName'
+        },
+        {
+          label: '关联表单',
+          props: 'formName'
         }
-      ],
-      table: {
-        column: [
-          {
-            label: '编号',
-            props: 'id'
-          },
-          {
-            label: '模板名称',
-            props: 'templateName'
-          },
-          {
-            label: '关联场景',
-            props: 'sceneName'
-          },
-          {
-            label: '关联流程',
-            props: 'processName'
-          },
-          {
-            label: '关联表单',
-            props: 'formName'
-          }
         ],
         width: 400,
-        handle: [
-          {
-            title: '查看',
-            method: 'details',
-            type: 'info'
-          },
-          {
-            title: '修改',
-            method: 'editor',
-            type: 'warning'
-          },
-          {
-            title: '删除',
-            method: 'del',
-            type: 'danger'
-          },
-          {
-            title: '二维码',
-            method: 'qrCode',
-            type: 'info',
-            props: 'type',
-            key: false
-          }
+        handle: [{
+          title: '查看',
+          method: 'details',
+          type: 'info'
+        },
+        {
+          title: '修改',
+          method: 'editor',
+          type: 'warning'
+        },
+        {
+          title: '删除',
+          method: 'del',
+          type: 'danger'
+        },
+        {
+          title: '二维码',
+          method: 'qrCode',
+          type: 'info',
+          props: 'type',
+          key: false
+        }
         ]
       },
       pickerOptions: {
@@ -273,7 +247,9 @@ export default {
       this.state = 0
     },
     getDetails (row) {
-      let reqdata = { id: row.id }
+      let reqdata = {
+        id: row.id
+      }
       this.$api
         .post('/template/queryTemplateDetail', {
           reqdata
@@ -295,7 +271,9 @@ export default {
       this.state = 1
     },
     del (row) {
-      let reqdata = { id: row.id }
+      let reqdata = {
+        id: row.id
+      }
       this.$api
         .post('/template/deleteTemplate', {
           reqdata
@@ -352,7 +330,12 @@ export default {
         a = valid
       })
       if (!a) return
-      let { templateId, time, qrcodeName, id } = this.codeForm
+      let {
+        templateId,
+        time,
+        qrcodeName,
+        id
+      } = this.codeForm
       let url = this.codeForm.qrcodePath ? '/qrCode/updateQrCodeInfo' : '/qrCode/createQrCodeByTemplate'
       this.$api
         .post(url, {
@@ -416,19 +399,21 @@ export default {
 
 <style lang="scss" scoped>
 .dialog-footer {
-  display: flex;
-  justify-content: center;
-  align-items: center;
+    display: flex;
+    justify-content: center;
+    align-items: center;
 }
+
 .flex {
-  display: flex;
-  justify-content: center;
+    display: flex;
+    justify-content: center;
 }
+
 .img {
-  width: 350px;
-  height: 350px;
-  margin-top: 30px;
-  margin-left:150px;
-  margin-bottom: 10px;
+    width: 350px;
+    height: 350px;
+    margin-top: 30px;
+    margin-left: 150px;
+    margin-bottom: 10px;
 }
 </style>

+ 43 - 47
src/views/login.vue

@@ -6,62 +6,42 @@
  * @FilePath     : \ambre-admin-noob\src\views\login.vue
 -->
 <template>
-  <div class="loginPage">
-    <div
-      class="login"
-    >
+<div class="loginPage">
+    <div class="login">
         <!-- login-title -->
         <div class="login-title">
-          <el-button type="text" style="margin-right: 33px" class="select-btn">优创面试后台管理</el-button>
+            <el-button type="text" style="margin-right: 33px" class="select-btn">优创面试后台管理</el-button>
         </div>
         <!-- pwd -->
         <div class="pwd-login">
-          <el-form
-            :model="loginForm"
-            :rules="pwdRules"
-            ref="pwdLogin"
-            label-width="0"
-          >
-            <el-form-item prop="loginname">
-              <el-input
-                v-model="loginForm.loginname"
-                name="loginname"
-                type="tel"
-                autocomplete="new-password"
-                placeholder="请输入账号"
-              >
-                <span slot="prefix" class="iconfont iconshouji"></span>
-              </el-input>
-            </el-form-item>
-            <el-form-item prop="password">
-              <el-input
-                type="password"
-                v-model="loginForm.password"
-                name="password"
-                @keyup.enter.native="login"
-                autocomplete="new-password"
-                placeholder="请输入密码"
-              >
-                <span slot="prefix" class="iconfont iconmima"></span>
-              </el-input>
-            </el-form-item>
-          </el-form>
+            <el-form :model="loginForm" :rules="pwdRules" ref="pwdLogin" label-width="0">
+                <el-form-item prop="loginname">
+                    <el-input v-model="loginForm.loginname" name="loginname" type="tel" autocomplete="new-password" placeholder="请输入账号">
+                        <span slot="prefix" class="iconfont iconshouji"></span>
+                    </el-input>
+                </el-form-item>
+                <el-form-item prop="password">
+                    <el-input type="password" v-model="loginForm.password" name="password" @keyup.enter.native="login" autocomplete="new-password" placeholder="请输入密码">
+                        <span slot="prefix" class="iconfont iconmima"></span>
+                    </el-input>
+                </el-form-item>
+            </el-form>
         </div>
 
         <div class="login-footer">
-          <el-button class="login-btn" @click="login">登录</el-button>
+            <el-button class="login-btn" @click="login">登录</el-button>
         </div>
-      </div>
+    </div>
     <!--</div>-->
-  </div>
+</div>
 </template>
 
 <style lang="scss" scoped>
-  .login-title{
+.login-title {
     display: flex;
     justify-content: center;
     align-items: center;
-  }
+}
 </style>
 
 <script>
@@ -73,19 +53,33 @@ export default {
         password: ''
       },
       pwdRules: {
-        loginname: [{ required: true, trigger: 'blur', message: '请输入账号' }],
-        password: [{ required: true, trigger: 'blur', message: '请输入密码' }, { min: 3, message: '请输入正确的密码', trigger: 'blur' }]
+        loginname: [{
+          required: true,
+          trigger: 'blur',
+          message: '请输入账号'
+        }],
+        password: [{
+          required: true,
+          trigger: 'blur',
+          message: '请输入密码'
+        }, {
+          min: 3,
+          message: '请输入正确的密码',
+          trigger: 'blur'
+        }]
       }
     }
   },
-  mounted () {
-  },
+  mounted () {},
   methods: {
     // 登陆
     login () {
       this.$refs['pwdLogin'].validate(res => {
         if (res) {
-          const { loginname, password } = this.loginForm
+          const {
+            loginname,
+            password
+          } = this.loginForm
           this.$api.post('/companyInfo/login', {
             'reqdata': {
               loginname,
@@ -93,12 +87,14 @@ export default {
             }
           }).then(res => {
             console.log(res)
-            this.$message.success({ message: '登陆成功' })
+            this.$message.success({
+              message: '登陆成功'
+            })
             // this.$cookies.setCookies(res)
             sessionStorage.setItem('info', JSON.stringify(res.object))
             localStorage.setItem('menuId', JSON.stringify(res.object.roleMenuDtoList))
             localStorage.setItem('companyName', res.object.companyName)
-            // localStorage.setItem('managerid', res.object.managerid)
+            localStorage.setItem('managerid', res.object.id)
             localStorage.setItem('token', res.object.token)
             let time = setTimeout(() => {
               location.reload()