Commit 43504592 by yangchao

update

1 parent 4b0f2ddb
......@@ -46,7 +46,7 @@ export function getNoticeList(data) {
url: 'messages/notice/lists',
method: 'post',
data: data,
source : 'cm'
source : 'zp'
})
}
......@@ -64,7 +64,7 @@ export function operationRead(data) {
url: 'messages/notice/operation/read',
method: 'post',
data: data,
source : 'cm'
source : 'zp'
})
}
......@@ -82,7 +82,7 @@ export function operationDelete(data) {
url: 'messages/notice/operation/delete',
method: 'post',
data: data,
source : 'cm'
source : 'zp'
})
}
......@@ -102,4 +102,4 @@ export function detailSimple(data) {
method: 'post',
data: data,
})
}
\ No newline at end of file
}
import router from './router'
import store from './store'
import {getMallToken, getMallRole, clearCookie} from './utils/Cookie';
import {getMallToken, getMallRole, clearCookie, getUserToken} from './utils/Cookie';
import {arrHas} from "./utils/assist";
// progress bar
......@@ -10,7 +10,7 @@ import 'nprogress/nprogress.css'
NProgress.configure({showSpinner: false})
let whiteList = ['/403', '/404', '/password','/login'];
let whiteList = ['/403', '/404', '/password','/login','/update'];
let toIndexPath = ['/', '/index'];
......@@ -26,13 +26,12 @@ router.beforeEach((to, from, next) => {
NProgress.start(); // start progress bar
let token = getMallToken();
let token = getUserToken();
if (whiteList.indexOf(to.path) != -1) {
return next();
} else if (token) {
let platform = store.getters.platform;
if (platform) {
console.log(platform)
if (arrHas(to.meta.role, getMallRole()) || toIndexPath.indexOf(to.path) != -1) {
// 判断路由权限
store.commit('checkRole');
......@@ -79,7 +78,7 @@ router.beforeEach((to, from, next) => {
} else {
clearCookie();
window.location.href = store.state.domainURL + 'login';
window.location.href = window.location.origin + '/login';
// return next('/login');
}
});
......
......@@ -31,6 +31,11 @@ export const constantRouterMap = [
auth: ['basic', 'generally']
}
},
{
path: '/update', name: 'update', component: _import('login/updatePwd'), meta: {
auth: ['basic', 'generally']
}
},
//init
{
path: '/',
......
......@@ -39,7 +39,7 @@ const state = {
platform: 'generally',
//domainURL
domainURL: process.env.NODE_ENV == 'development' ? 'http://www.test.ledianyun.com/' : 'http://sy.pg.ledianyun.com/',
domainURL: process.env.NODE_ENV == 'development' ? 'http://www.test.ledianyun.com/' : 'http://recruit.pg.ledianyun.com/',
//一级路由
firstRouters: firstRouters,
//二级路由
......@@ -70,7 +70,7 @@ const mutations = {
} else {
clearCookie();
window.location.href = store.state.domainURL + 'login';
window.location.href = window.location.origin + '/login';
}
},
......
......@@ -21,7 +21,7 @@ function destroyDialog () {
let dialog = document.getElementById('dialog');
dialog.parentNode.removeChild(dialog);
sessionStorage.removeItem('isExpired');
window.location.href = store.state.domainURL + 'shoplist';
window.location.href = window.location.origin + '/login';
}
......@@ -72,7 +72,7 @@ service.interceptors.response.use(response => {
duration: 1.5 * 1000,
onClose: () => {
clearCookie();
window.location.href = store.state.inviteBaseUrl + 'login';
window.location.href = window.location.origin + '/login';
}
})
} else if (response.data.error !== 0) {
......
......@@ -5,7 +5,10 @@
<!--top-->
<el-menu mode="vertical" :defaultActive="activeIndex" background-color="#273543" text-color="#adbece"
active-text-color="#fff" @select="handleSelect">
<i class="iconfont icon-logo svg-logo"></i>
<!-- <i class="iconfont icon-logo svg-logo"></i>-->
<div class="logo">
<img src="http://static.ledouya.com/Fp8hbApZLw_SfHpUpA-_ummvND6e" alt="">
</div>
<el-menu-item :index="item.index" v-for="(item,index) in firstRouters.subMenu" :key="index"
v-if="item.auth.indexOf(platform) > -1">
<i class="iconfont iconfont-active" :class="item.noAuth?`${item.icon} no-auth`:`${item.icon}`"
......@@ -29,7 +32,7 @@
<div class="user-name">{{ name }}</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="phone" style="font-size: 12px;">{{name}}</el-dropdown-item>
<el-dropdown-item command="modify" style="font-size: 12px;" divided>修改密码</el-dropdown-item>
<!-- <el-dropdown-item command="modify" style="font-size: 12px;" divided>修改密码</el-dropdown-item>-->
<el-dropdown-item command="logoutAdmin" style="font-size: 12px;">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -154,17 +157,17 @@
switch (event) {
case 'logout':
clearCookie();
window.location.href = this.$store.state.domainURL + 'shoplist';
window.location.href = window.location.origin + '/login';
break;
case 'modify':
window.location.href = this.$store.state.domainURL + 'update';
window.location.href = window.location.origin + '/update';
// this.$router.push('/setting/user/password');
break;
case 'logoutAdmin':
logoutClearCookie();
// return
window.location.href = this.$store.state.domainURL + 'account/login';
window.location.href = window.location.origin + '/login';
break;
}
}
......@@ -177,3 +180,16 @@
}
}
</script>
<style>
.logo {
width: 100%;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
}
.logo img {
width: 100px;
height: 26px;
}
</style>
......@@ -9,10 +9,21 @@
<el-button class="login-btn" @click="loginBtn">登录</el-button>
<div class="register">
<el-button type="text" @click="registerFirst">注册新用户</el-button>
<el-button type="text">忘记密码?</el-button>
<el-button type="text" @click="forgetPwdVisible=true">忘记密码?</el-button>
</div>
</div>
<!--忘记密码弹框-->
<el-dialog :visible.sync="forgetPwdVisible" width="540px" :modal="false" :before-close="handleforgetClose">
<div class="register-1">
<div class="title">忘记密码</div>
<el-input class="register-line" prefix-icon="el-icon-mobile-phone" maxLength="11" placeholder="请输入手机号码" v-model="forgetInfo.phone"></el-input>
<el-input class="register-line" prefix-icon="el-icon-key" placeholder="请输入短信验证码" v-model="forgetInfo.code"></el-input>
<el-input class="register-line" prefix-icon="el-icon-view" placeholder="设置6至20位登录密码" v-model="forgetInfo.password_one"></el-input>
<el-input class="register-line" prefix-icon="el-icon-view" placeholder="请再次输入登录密码" v-model="forgetInfo.password_two"></el-input>
<el-button type="text" class="send-code-forgrt" @click="getCodeInfo">{{codeInfo}}</el-button>
<el-button class="next" type="primary" @click="next">确认修改</el-button>
</div>
</el-dialog>
<!--注册弹框 第一步-->
<el-dialog :visible.sync="registerFirstVisible" width="540px" :modal="false" :before-close="handleFirstClose">
<div class="register-1">
......@@ -20,8 +31,8 @@
<el-input class="register-line" prefix-icon="el-icon-s-custom" placeholder="请输入招聘者名称" v-model="registerInfo.name"></el-input>
<el-input class="register-line" prefix-icon="el-icon-mobile-phone" maxLength="11" placeholder="请输入手机号码" v-model="registerInfo.phone"></el-input>
<el-input class="register-line" prefix-icon="el-icon-key" placeholder="请输入短信验证码" v-model="registerInfo.code"></el-input>
<el-input class="register-line" prefix-icon="el-icon-view" placeholder="设置6至20位登录密码" v-model="registerInfo.password"></el-input>
<el-input class="register-line" prefix-icon="el-icon-view" placeholder="请再次输入登录密码" v-model="registerInfo.rePassword"></el-input>
<el-input class="register-line" type="password" prefix-icon="el-icon-view" placeholder="设置6至20位登录密码" v-model="registerInfo.password"></el-input>
<el-input class="register-line" type="password" prefix-icon="el-icon-view" placeholder="请再次输入登录密码" v-model="registerInfo.rePassword"></el-input>
<el-button type="text" class="send-code" @click="getCodeInfo">{{codeInfo}}</el-button>
<div class="agreement">
<el-checkbox v-model="checked" class="">勾选同意</el-checkbox>
......@@ -62,7 +73,11 @@
</div>
<div class="line-style">
<div class="label">企业类型</div>
<el-input class="input" size="small" v-model="registerInfo.enterprise_type" placeholder="请输入企业类型"></el-input>
<!-- <el-input class="input" size="small" v-model="registerInfo.enterprise_type" placeholder="请输入企业类型"></el-input>-->
<el-select v-model="registerInfo.enterprise_type" placeholder="请选择" size="small">
<el-option v-for="item in enterprise" :key="item.level" :label="item.level_name" :value="item.level">
</el-option>
</el-select>
</div>
<div class="line-style">
<div class="label">企业区域</div>
......@@ -125,6 +140,12 @@
uname:'',
upwd:'',
},
forgetInfo: {
phone: '',
code: '',
password_one: '',
password_two: ''
},
registerInfo: {
name: '', //招聘者名称
phone: '', //手机号
......@@ -148,12 +169,46 @@
},
checked: true,
registerFirstVisible: false,
registerSecondVisible: false,
registerSecondVisible: true,
forgetPwdVisible: false,
codeInfo: '发送验证码',
codeTimes: 0,
enterprise: [
{
level: '1',
level_name: '培训机构'
},
{
level: '2',
level_name: '在线教育机构'
},
{
level: '3',
level_name: '幼儿园'
},
{
level: '4',
level_name: '小学'
},
{
level: '5',
level_name: '初中'
},
{
level: '6',
level_name: '高中'
},
{
level: '7',
level_name: '托管所'
},
]
};
},
methods: {
handleforgetClose() {
this.forgetPwdVisible = false;
},
//获取头像
getPortrait(data) {
this.registerInfo.getPortrait = data;
......@@ -517,6 +572,11 @@
top: 166px;
right: 140px;
}
.send-code-forgrt {
position: absolute;
top: 112px;
right: 140px;
}
.register-1 .title {
font-weight: 700;
font-size: 18px;
......
<template>
<div class="md-container">
<el-form class="form" ref="form" label-width="120px">
<el-form-item label="请输入手机号:">
<el-input v-model="origPhone" size="small" placeholder="请输入手机号码" type="password"
maxlength="16"></el-input>
</el-form-item>
<el-form-item label="请输入原密码:">
<el-input v-model="origPassword" size="small" placeholder="请输入原始密码" type="password"
maxlength="16"></el-input>
</el-form-item>
<el-form-item label="请输入新密码:">
<el-input v-model="validatePass" size="small" placeholder="请输入原始密码" type="password"
maxlength="16"></el-input>
<!-- <span class="state">8-16位字符,包含字母和数字</span>-->
</el-form-item>
<el-form-item label="重复新密码:">
<el-input v-model="validatePass2" size="small" placeholder="请再次确认密码" type="password"
maxlength="16" auto-complete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="updatePass">确定修改</el-button>
<el-button size="small" type="primary" @click="back">返回</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
// import {updatePassword} from "@/api/setting";
export default {
data() {
return {
origPhone: '',
origPassword: '',
validatePass: '',
validatePass2: '',
}
},
methods: {
updatePass() {
if (!this.origPassword.trim().length) {
this.$message.warning('请输入原始密码')
return false;
}
if (!this.validatePass.trim().length) {
this.$message.warning('请输入新密码')
return false;
}
if (!this.validatePass2.trim().length) {
this.$message.warning('请再次确认密码')
return false;
}
if (this.validatePass.trim().length < 6) {
this.$message.warning('密码长度不能少于6位')
return false;
}
if (this.validatePass !== this.validatePass2) {
this.$message.warning('两次密码不一致')
return false;
}
let passInfo = {
old_password: this.origPassword,
new_password: this.validatePass
}
// updatePassword(passInfo).then(res => {
// if (res.error == 0) {
// this.$message.success(res.error_reason);
// this.origPassword = '';
// this.validatePass = '';
// this.validatePass2 = '';
// }
// })
},
back() {
}
}
}
</script>
<style scoped>
.md-container {
width: 100%;
background: #fff;
padding: 20px;
/*border-radius: 5px;*/
width: 1000px;
height: 400px;
border: 1px solid #eee;
margin: 50px auto 0;
display: flex;
justify-content: center;
align-items: center;
}
.title {
font-size: 15px;
color: #333;
font-weight: bold;
}
.el-icon-edit {
margin-right: 15px;
}
.form {
text-align: left;
margin-top: 20px;
}
.el-input {
width: 200px;
}
.state {
margin-left: 15px;
color: #666;
font-size: 13px;
}
</style>
......@@ -115,7 +115,7 @@
name: this.registerInfo.enterprise_name,
peoples: Number(this.registerInfo.enterprise_scale),
type: this.registerInfo.enterprise_type,
area_id: this.registerInfo.enterprise_area[2],
area_id: this.registerInfo.enterprise_area[2]?this.registerInfo.enterprise_area[2]:this.registerInfo.enterprise_area[0],
address: this.registerInfo.enterprise_address,
remark: this.registerInfo.enterprise_describe,
business_license_pic: this.registerInfo.get_business_license_pic[0],
......
......@@ -3,16 +3,10 @@
<div class="tabs-nav">
<el-tabs v-model="activeName" type="card" @tab-click="togglePage(activeName)" class="nav-tab">
<el-tab-pane label="全部消息" name="1"></el-tab-pane>
<el-tab-pane label="全部消息" name="0"></el-tab-pane>
<el-tab-pane label="已读消息" name="2"></el-tab-pane>
<el-tab-pane label="未读消息" name="4"></el-tab-pane>
<el-tab-pane label="未读消息" name="1"></el-tab-pane>
</el-tabs>
<!-- <el-select v-model="filter" class="filter-status" size="small" placeholder="请选择" @change="getList(1)">-->
<!-- <el-option label="全部/不限" value="0"></el-option>-->
<!-- <el-option label="已读" value="2"></el-option>-->
<!-- <el-option label="未读" value="1"></el-option>-->
<!-- </el-select>-->
</div>
<div class="box">
......@@ -66,7 +60,7 @@
name: "center",
data() {
return {
activeName: '1',
activeName: '0',
filter: '0',
pageSize: 10,
currentPage: 1,
......@@ -78,20 +72,11 @@
this.getList(1);
// new goAnyWhere(this,{})
},
watch: {
$route: {
handler() {
this.activeName = this.$route.query.to ? this.$route.query.to : '1';
},
immediate: true
}
},
methods: {
toDetail(item) {
// new goAnyWhere(this, item)
},
togglePage(activeName) {
this.$router.push({path: this.$route.path, query: {to: activeName}});
togglePage() {
this.getList(1)
},
handleCurrentChange(val) {
......@@ -122,7 +107,7 @@
let data = {
page: val,
page_size: this.pageSize,
category: this.activeName
is_read: this.activeName
}
if (this.filter != 0) {
......
......@@ -31,11 +31,15 @@
size="small"
:options="regionData"
v-model="positionForm.area"
@change="addressChange">
>
</el-cascader>
</el-form-item>
<el-form-item label="工作地址:">
<el-input v-model="positionForm.address" class="input-style" placeholder="请输入工作地址"
maxlength="10" size="small" style="width: 600px"></el-input>
</el-form-item>
<el-form-item label="定位地址:">
<el-input v-model="positionForm.location_adderss" class="input-style" placeholder="请输入定位地址"
maxlength="10" size="small" id="detailaddress" style="width: 600px"></el-input>
</el-form-item>
<el-form-item label="">
......@@ -61,6 +65,12 @@
<span style="color: #AAAAAA">-</span>
<el-input size="small" class="input-small" v-model="positionForm.max_salary"></el-input>
</el-form-item>
<el-form-item label="薪资范围:">
<el-select v-model="positionForm.experience" placeholder="请选择" size="small">
<el-option v-for="item in salaryLevels" :key="item.level" :label="item.level_name" :value="item.level">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="公司福利:">
<el-tag
:key="tag"
......@@ -82,9 +92,12 @@
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加福利</el-button>
</el-form-item>
<el-form-item label=" " style="margin-top: -20px;color: #999">
<span>注:根据调研,求职者更关注以下福利:五险一金、三险一金、包吃住、双休、零食管够,请根据公司实际情况填写;</span>
</el-form-item>
<div class="line-style">
<div class="label">职位描述:</div>
<UE @callback="getEditorHtml" :width="600" :height="320" :richText="positionForm.get_position_describe"></UE>
<UE @callback="getEditorHtml" :width="800" :height="320" :richText="positionForm.get_position_describe"></UE>
</div>
<el-form-item>
......@@ -98,7 +111,7 @@
<script>
import {provinceAndCityData,regionData, CodeToText, TextToCode} from 'element-china-area-data';
import {positionEdit, positionDetail} from "@/api/position";
import {getAcademicQualifications, getWorkExperience, getJobClassify} from "@/api/common";
import {getAcademicQualifications, getWorkExperience, getJobClassify,getSalaryExpectation} from "@/api/common";
import {positionTtpe} from '@/utils/positionType'
export default {
data() {
......@@ -106,6 +119,7 @@
regionData: regionData,
education: [],
experience: [],
salaryLevels: [],
typep: [],
position_type: [],
positionForm: {
......@@ -125,7 +139,7 @@
min_salary: '', //薪资范围 小
max_salary: '', //薪资范围 大
job_benefits: [], //公司福利
location_adderss: ''
},
id: '',
inputVisible: false,
......@@ -165,7 +179,7 @@
job_name: this.positionForm.position_name,
job_classification_id: this.positionForm.position_type[2]?this.positionForm.position_type[2]:this.positionForm.position_type[1],
job_type: Number(this.positionForm.position_property),
work_area_id: this.positionForm.area[2] || '140311',
work_area_id: this.positionForm.area[2] ?this.positionForm.area[2]:this.positionForm.area[0],
work_address: this.positionForm.address,
job_require_people: Number(this.positionForm.number),
job_require_edu_level: this.positionForm.education ? Number(this.positionForm.education) : 2,
......@@ -173,7 +187,10 @@
job_require_salary_min: this.positionForm.min_salary * 100,
job_require_salary_max: this.positionForm.max_salary * 100,
job_remark: this.positionForm.position_describe,
job_benefits: this.job_benefits
job_benefits: this.job_benefits,
location_lng: this.positionForm.longitude,
location_lat: this.positionForm.latitude,
location_adderss: this.positionForm.location_adderss,
}
let explain = '创建成功';
if(this.id) {
......@@ -198,6 +215,7 @@
this.positionForm.position_property = res.data.job_type;
this.positionForm.number = res.data.job_require_people;
this.positionForm.address = res.data.work_address;
this.positionForm.location_adderss = res.data.location_adderss;
this.positionForm.min_salary = res.data.job_require_salary_min / 100;
this.positionForm.max_salary = res.data.job_require_salary_max / 100;
this.job_benefits = res.data.job_benefits;
......@@ -206,6 +224,16 @@
this.positionForm.experience = res.data.job_require_work_ages;
this.positionForm.area = res.data.work_area_id;
this.positionForm.position_type = res.data.job_classification_id;
this.positionForm.longitude = res.data.location_lng;
this.positionForm.latitude = res.data.location_lat;
this.positionForm.location_adderss = res.data.location_adderss;
if (res.data.location_lng != 0 || res.data.location_lat != 0) {
let position = [res.data.location_lng, res.data.location_lat];
console.log(position,'position');
setTimeout(() => {
this.regeocoder(position)
}, 1000)
}
}
})
}).catch(error => {
......@@ -217,10 +245,6 @@
checkPositionType() {
},
//选择工作区域
addressChange(arr) {
console.log(arr,'====');
},
//取消编辑
goback() {
setTimeout(()=>{
......@@ -325,7 +349,7 @@
_this.positionForm.longitude = res.poi.location.lng;
_this.positionForm.latitude = res.poi.location.lat;
_this.positionForm.address = res.poi.district + res.poi.address + res.poi.name;
_this.positionForm.location_adderss = res.poi.district + res.poi.address + res.poi.name;
var lnglatXY = [res.poi.location.M, res.poi.location.lat];
_this.addRemark(lnglatXY);
......@@ -367,7 +391,7 @@
geocoder_CallBack(data) {
// this.addresInfo = data;
var address = data.regeocode.formattedAddress; //返回地址描述
this.positionForm.address = address;
this.positionForm.location_adderss = address;
},
//获取学历
getEduLevels() {
......@@ -407,14 +431,27 @@
})
},
//获取薪资列表
getSalaryLevels() {
return new Promise(resolve => {
getSalaryExpectation().then(res => {
if(res.error == 0) {
this.salaryLevels = res.data;
}
})
}).catch(error =>{
})
}
},
async mounted() {
this.getUserLocation();
await this.getEduLevels();
await this.getWorkAges();
await this.JobClassify();
await this.getSalaryLevels();
if (this.$route.params.id && this.$route.params.id != 0) {
console.log(9);
this.id = this.$route.params.id;
......@@ -481,7 +518,7 @@
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
/*margin-left: 10px;*/
height: 32px;
line-height: 30px;
padding-top: 0;
......
......@@ -29,7 +29,7 @@
</el-form>
<div class="partner-supervise-table">
<el-table :data="list" stripe size="small" tooltip-effect="dark" :header-cell-class-name="headerName">
<el-table-column align="center" prop="truename" label="职位信息" width="300">
<el-table-column align="center" prop="truename" label="职位信息" width="400">
<template slot-scope="scope">
<div class="position-info">
<div class="position"><span>{{scope.row.job_type == 1 ? "全":"兼"}}</span>{{scope.row.job_name}}</div>
......@@ -349,7 +349,7 @@
color: #A0A0A0;
}
.position-info .info div {
margin-right: 30px;
margin-right: 15px;
}
.compensation {
color: red;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!