Commit 40e9a080 authored by zhangderong's avatar zhangderong

Merge branch 'ckeditor' of git.quantgroup.cn:ui/recruiting-management into Ztext1

Conflicts:
	src/router/index.js
parents 0885ecd6 888f1316
...@@ -10461,6 +10461,11 @@ ...@@ -10461,6 +10461,11 @@
"resolved": "https://registry.npmjs.org/vue-upload-component/-/vue-upload-component-2.8.20.tgz", "resolved": "https://registry.npmjs.org/vue-upload-component/-/vue-upload-component-2.8.20.tgz",
"integrity": "sha512-zrnJvULu4rnZe36Ib2/AZrI/h/mmNbUJZ+acZD652PyumzbvjCOQeYHe00sGifTdYjzzS66CwhTT+ubZ2D0Aow==" "integrity": "sha512-zrnJvULu4rnZe36Ib2/AZrI/h/mmNbUJZ+acZD652PyumzbvjCOQeYHe00sGifTdYjzzS66CwhTT+ubZ2D0Aow=="
}, },
"vuex": {
"version": "3.1.1",
"resolved": "http://npmprivate.quantgroups.com/vuex/-/vuex-3.1.1.tgz",
"integrity": "sha512-ER5moSbLZuNSMBFnEBVGhQ1uCBNJslH9W/Dw2W7GZN23UQA69uapP5GTT9Vm8Trc0PzBSVt6LzF3hGjmv41xcg=="
},
"watchpack": { "watchpack": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "http://npmprivate.quantgroups.com/watchpack/-/watchpack-1.6.0.tgz", "resolved": "http://npmprivate.quantgroups.com/watchpack/-/watchpack-1.6.0.tgz",
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
"qs": "^6.7.0", "qs": "^6.7.0",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"vue-upload-component": "^2.8.20" "vue-upload-component": "^2.8.20",
"vuex": "^3.1.1"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<Row id="home" class="home"> <Row id="home" class="home">
<Col span="3" class="aside" style="width:17%;height:100%"> <Col span="3" class="aside" style="width:17%;height:100%">
<img src="https://o7oe0d6qz.qnssl.com/image/homelogo.png" alt="" style="height:60px"> <img src="https://o7oe0d6qz.qnssl.com/image/homelogo.png" alt="" style="height:60px">
<Menu style="width: 100%;" ref='subMenu' :active-name="vSubName" :open-names="vName" @on-select="go"> <Menu style="width: 100%;" ref='subMenu' :active-name="levelThreeName" :open-names="levelTwoName" @on-select="go">
<template v-for="(menu) in childMenu" > <template v-for="(menu) in childMenu" >
<Submenu :name="menu.name" :key="menu.name" v-show='!(isAdmin==false&&menu.item=="账户管理")'> <Submenu :name="menu.name" :key="menu.name" v-show='!(isAdmin==false&&menu.item=="账户管理")'>
<template slot="title"> <template slot="title">
<Icon :type="menu.icon" style="font-size:20px;font-weight:bold"/> <Icon :type="menu.icon" style="font-size:20px;font-weight:bold"/>
{{menu.item}} {{menu.item}}
</template> </template>
<MenuItem v-for="child in menu.child" :key="child.name" :name="child.name" @click="go" :active-name="vSubName">{{child.item}}</MenuItem> <MenuItem v-for="child in menu.child" :key="child.name" :name="child.name" @click="go" :active-name="levelThreeName">{{child.item}}</MenuItem>
</Submenu> </Submenu>
</template> </template>
</Menu> </Menu>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<Col span="21" class="content" style="width:83%;height:100%"> <Col span="21" class="content" style="width:83%;height:100%">
<Row class="header" style="height:6%"> <Row class="header" style="height:6%">
<Col span="20"> <Col span="20">
<Menu mode="horizontal" :active-name="hName" @on-select="selectMenu"> <Menu mode="horizontal" :active-name="levelOneName" @on-select="selectMenu">
<MenuItem v-for="menu in menuList" :name="menu.name" :key="menu.name" > <MenuItem v-for="menu in menuList" :name="menu.name" :key="menu.name" >
{{menu.item}} {{menu.item}}
</MenuItem> </MenuItem>
...@@ -54,12 +54,13 @@ import localstorage from '../service/localstorage.service.js' ...@@ -54,12 +54,13 @@ import localstorage from '../service/localstorage.service.js'
xiabiao:'', xiabiao:'',
itemSelect:'', itemSelect:'',
type:'', type:'',
hName: '', levelOneName: '',
vName: ['1-1', '2-1', '3-1', '4-1'], levelTwoName: ['1-1', '2-1', '3-1', '4-1'],
vSubName: '1-1-1', levelThreeName: '1-1-1',
menuList: [ menuList: [
{ name: '1', { name: '1',
item: '简历管理', item: '简历管理',
loadMenu: true,
child: [ child: [
{ {
name: '1-1', name: '1-1',
...@@ -106,15 +107,17 @@ import localstorage from '../service/localstorage.service.js' ...@@ -106,15 +107,17 @@ import localstorage from '../service/localstorage.service.js'
}] }]
}, },
{ name: '4', { name: '4',
item: '系统管理', item: '系统管理',
isAdmin: true,
child: [{ child: [{
name: '4-1', name: '4-1',
item: '账户管理', item: '账户管理',
icon: 'ios-contact-outline', icon: 'ios-contact-outline',
show: true,
child: [{ child: [{
name: '4-1-1', name: '4-1-1',
item:'账户管理', item:'账户管理',
route: '/account' route: '/account'
}] }]
}, },
{ name: '4-2', { name: '4-2',
...@@ -136,8 +139,7 @@ import localstorage from '../service/localstorage.service.js' ...@@ -136,8 +139,7 @@ import localstorage from '../service/localstorage.service.js'
] }, ] },
], ],
childMenu: [{ name: '1-1', item: '全部管理', child: [{ name: '1-1-1', item:'全部简历', route: '/allResume' }] }, childMenu: []
{ name: '1-2', item: '渠道简历', child: [] }]
} }
}, },
watch:{ watch:{
...@@ -150,7 +152,7 @@ import localstorage from '../service/localstorage.service.js' ...@@ -150,7 +152,7 @@ import localstorage from '../service/localstorage.service.js'
}, },
methods: { methods: {
go(name) { go(name) {
this.vSubName = name this.levelThreeName = name
this.childMenu.map(par => { this.childMenu.map(par => {
par.child.map(child => { par.child.map(child => {
if (child.name == name) { if (child.name == name) {
...@@ -159,32 +161,33 @@ import localstorage from '../service/localstorage.service.js' ...@@ -159,32 +161,33 @@ import localstorage from '../service/localstorage.service.js'
}) })
}) })
}, },
selectMenu(name, type) { selectMenu(name, refesh) {
// type是否为刷新页面 // // refesh是否为刷新页面
this.hName = name this.levelOneName = name
const menus = this.menuList.filter(v => name === v.name) const menus = this.menuList.filter(v => name === v.name)[0]
this.childMenu = menus.length > 0 ? menus[0].child : [{ name: '1-1', item: '全部管理', child: [{ name: '1-1-1', item:'全部简历', route: '/allResume' }] },{ name: '1-2', item: '渠道简历', child: [] }] this.childMenu = menus.child ? menus.child : this.menuList[0].child
if (!type) { // 点击菜单默认展示第一个菜单 if (!refesh) { // 点击菜单默认展示第一个菜单
this.vName = [] this.levelTwoName = []
this.vName[0] = ((name == '4') && this.isAdmin && this.childMenu[0].name) || ((name == '4') && !this.isAdmin && this.childMenu[1].name) || this.childMenu[0].name let initName = this.getInitName(name, menus)
this.vSubName = ((name == '4') && this.isAdmin && this.childMenu[0].child[0].name) || ((name == '4') && !this.isAdmin && this.childMenu[1].child[0].name) || this.childMenu[0].child[0].name this.levelTwoName.push(initName.levelTwoName)
this.levelThreeName = initName.levelThreeName
} }
if (name == '1') { // 简历管理模块需要加载渠道简历 if (menus.loadMenu) { // 简历管理模块需要加载渠道简历
this.getChannelMenu() this.getChannelMenu()
} }
if (type&&this.$route.path.indexOf('channel') > -1) { if (refesh&&this.$route.path.indexOf('channel') > -1) {
this.vSubName = this.$route.path.split('/')[2] this.levelThreeName = this.$route.path.split('/')[2]
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.subMenu.updateOpened(); this.$refs.subMenu.updateOpened();
this.$refs.subMenu.updateActiveName(); this.$refs.subMenu.updateActiveName();
}) })
this.go(this.vSubName) this.go(this.levelThreeName)
}, },
// 获取个人信息 // 获取个人信息
getmassage(){ getmassage(){
getpersonMassage().then(res=>{ getpersonMassage().then(res=>{
this.massage=res.data.body.userName this.massage=res.data.body&&res.data.body.userName || ''
}) })
}, },
// 用户退出 // 用户退出
...@@ -193,19 +196,22 @@ import localstorage from '../service/localstorage.service.js' ...@@ -193,19 +196,22 @@ import localstorage from '../service/localstorage.service.js'
if(res.data.success==true){ if(res.data.success==true){
localstorage.remove('token') localstorage.remove('token')
localstorage.remove('isADMIN') localstorage.remove('isADMIN')
this.$router.push('/login') this.$router.replace('/login')
} }
}) })
}, },
getChannelMenu(){ getChannelMenu(){
this.menuList[0].child[1].child = [] this.menuList[0].child[1].child = []
getChannelMassage().then(res=>{ getChannelMassage().then(res=>{
this.channelARR=res.data.body if (!res.data.status) {
return
}
this.channelARR=res.data.body || []
this.channelARR.map((item,index) => { this.channelARR.map((item,index) => {
var obj = { var obj = {
name: `${item.sourceName}`, name: `${item.sourceName}`,
item: item.sourceName, item: item.sourceName,
route: `/channel/${item.sourceCode}` route: `/channel/${item.sourceCode}`
} }
this.menuList[0].child[1].child.push(obj) this.menuList[0].child[1].child.push(obj)
}) })
...@@ -214,39 +220,66 @@ import localstorage from '../service/localstorage.service.js' ...@@ -214,39 +220,66 @@ import localstorage from '../service/localstorage.service.js'
getActiveName (change) { getActiveName (change) {
let pathName = this.$route.path let pathName = this.$route.path
if (pathName.indexOf('channel') > -1) { if (pathName.indexOf('channel') > -1) {
this.hName = '1' this.levelOneName = '1'
this.vSubName = pathName.split('/')[2] this.levelThreeName = pathName.split('/')[2]
this.vName = [] this.levelTwoName = []
this.vName.push('1-2') this.levelTwoName.push('1-2')
this.selectMenu(this.hName, 'refresh') this.selectMenu(this.levelOneName, 'refresh')
return return
} }
this.menuList.map(parent => { this.menuList.map(parent => {
parent.child.map(child => { parent.child.map(child => {
child.child.map(grandson => { child.child.map(grandson => {
if (grandson.route == pathName) { if (grandson.route == pathName) {
this.vSubName = grandson.name this.levelThreeName = grandson.name
this.hName = parent.name this.levelOneName = parent.name
this.vName = [] this.levelTwoName = []
this.vName.push(child.name) this.levelTwoName.push(child.name)
} }
}) })
}) })
}) })
this.selectMenu(this.hName, 'refresh') this.selectMenu(this.levelOneName, 'refresh')
},
getInitName (name, menu, child) {
// 超级管理员
let isAdmin = menu.isAdmin
let hightMenu = {
levelTwoName: '',
levelThreeName: ''
}
if (isAdmin || isAdmin == undefined) { // 默认展示一级菜单
hightMenu.levelTwoName = menu.child[0].name
hightMenu.levelThreeName = menu.child[0].child[0].name
} else if(isAdmin == false){ //展示二级菜单
hightMenu.levelTwoName = menu.child[1].name
hightMenu.levelThreeName = menu.child[1].child[0].name
}
return hightMenu
}, },
// 判断是否为超级管理员 // 判断是否为超级管理员
judgeadmin(){ judgeadmin(){
judeAdmin().then(res=>{ judeAdmin().then(res=>{
this.isAdmin=res.data.body this.isAdmin = res.data.body
this.menuList[3].isAdmin = this.isAdmin
}) })
},
goBack () {
this.getActiveName()
} }
}, },
mounted() { mounted() {
this.getmassage() this.getmassage()
this.getActiveName() this.getActiveName()
this.judgeadmin() this.judgeadmin()
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
window.addEventListener('popstate', this.goBack, false);
}
},
destroyed(){
window.removeEventListener('popstate', this.goBack, false);
} }
} }
</script> </script>
......
...@@ -444,6 +444,9 @@ export default { ...@@ -444,6 +444,9 @@ export default {
// 面试官查询 // 面试官查询
Serchlistinterview(){ Serchlistinterview(){
Serchinterviewor().then(res=>{ Serchinterviewor().then(res=>{
if (!res.data.status) {
return
}
this.Interviewer=res.data.body this.Interviewer=res.data.body
this.Interviewer.unshift('不限') this.Interviewer.unshift('不限')
}) })
...@@ -451,6 +454,9 @@ export default { ...@@ -451,6 +454,9 @@ export default {
// 邀约人查询 // 邀约人查询
SerchInvitation(){ SerchInvitation(){
SerchInvitationOwer().then(res=>{ SerchInvitationOwer().then(res=>{
if (!res.data.status) {
return
}
this.Inviter=res.data.body this.Inviter=res.data.body
this.Inviter.unshift('不限') this.Inviter.unshift('不限')
}) })
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<FormItem label="邀约人" prop="Inviter" style="margin-top:0.4rem;font-size:15px"> <FormItem label="邀约人" prop="Inviter" style="margin-top:0.4rem;font-size:15px">
<Input placeholder="请输入" style="width:85%;" v-model="formInline.Inviter" size="large"/> <Input placeholder="请输入" style="width:85%;" v-model="formInline.Inviter" size="large"/>
</FormItem> </FormItem>
<FormItem label="邀约人手机" style="" class="phone"> <FormItem label="邀约人手机" style="" class="phone" prop="InviterPhoneNumber">
<Input placeholder="请输入" style="width:85%;" v-model="formInline.InviterPhoneNumber" size="large" @on-blur='jedugePhone' /><br> <Input placeholder="请输入" style="width:85%;" v-model="formInline.InviterPhoneNumber" size="large" /><br>
<span style="position: absolute;top: 100%;left: 0;line-height: 1;padding-top: 6px;color:#ed4014;display:inline-block;height:30px;" v-show="isV==true">请输入正确的手机号码</span> <!-- <span style="position: absolute;top: 100%;left: 0;line-height: 1;padding-top: 6px;color:#ed4014;display:inline-block;height:30px;" v-show="isV==true">请输入正确的手机号码</span> -->
</FormItem> </FormItem>
<FormItem label="面试时间" prop="time" style="margin-top:0px" class="dateTime"> <FormItem label="面试时间" prop="time" style="margin-top:0px" class="dateTime">
<Input placeholder="请输入" style="width:40%;" v-model="formInline.date" :readonly="true" size="large" /> <Input placeholder="请输入" style="width:40%;" v-model="formInline.date" :readonly="true" size="large" />
...@@ -83,7 +83,11 @@ export default { ...@@ -83,7 +83,11 @@ export default {
{ required: true, message: '请输入邀约人', trigger: 'blur' } { required: true, message: '请输入邀约人', trigger: 'blur' }
], ],
time: [ time: [
{ required: true,message: '面试时间不能为空', trigger: 'date' } { required: true,message: '面试时间不能为空', trigger: 'date' },
],
InviterPhoneNumber: [
{ required: false, pattern:/^[1][3,4,5,7,8,6,9][0-9]{9}$/, message: '请输入正确的手机号', trigger: 'blur' }
], ],
position: [ position: [
{ required: true,message: '请输入应聘职位', trigger: 'blur' } { required: true,message: '请输入应聘职位', trigger: 'blur' }
......
...@@ -30,12 +30,17 @@ export default new Router({ ...@@ -30,12 +30,17 @@ export default new Router({
}, { }, {
path: '/login', path: '/login',
name: 'login', name: 'login',
component: login,}, component: login,
{ meta: {
path: '/sweepCode', allowBack: false
name: 'sweepCode', }
component: sweepCode,}, },
{ {
path:'/sweepCode',
name:'sweepCode',
component:sweepCode
},
{
path:'/update', path:'/update',
name:'update', name:'update',
component:update component:update
......
...@@ -3,7 +3,8 @@ import Promise from './promise.service.js' ...@@ -3,7 +3,8 @@ import Promise from './promise.service.js'
import {Notice} from 'iview' import {Notice} from 'iview'
import Vue from 'vue' import Vue from 'vue'
import router from '../router/index.js' import router from '../router/index.js'
// axios.defaults.withCredentials = true import store from '../store'
var instance = axios.create({}); var instance = axios.create({});
instance.defaults.timeout = 3600000; instance.defaults.timeout = 3600000;
instance.defaults.withCredentials = true; instance.defaults.withCredentials = true;
...@@ -22,27 +23,31 @@ instance.interceptors.request.use(function (config) { ...@@ -22,27 +23,31 @@ instance.interceptors.request.use(function (config) {
}); });
instance.interceptors.response.use(function (response) { instance.interceptors.response.use(function (response) {
// 在发送请求之前做些什么 // 在发送请求之前做些什么
let errorInfo = {
'900': '您的账号已在其他地方登录,如不是您个人操作,请及时修改密码',
'901': '',
'902': 'cookie已失效,请重新登录'
}
if(response.status >= 200 && response.status < 300){ if(response.status >= 200 && response.status < 300){
if (response.data.body.code == '900'){ let code = response.data&&response.data.body&&response.data.body.code || ''
Notice.error({render:(h) => {return h('div', {style: { if (code == '900' || code == '901' || code == '902'){
paddingRight: '10px', if (!store.state.cookieTips && code != '901') {
fontSize: '14px', store.dispatch('cookieTipsShow', true)
color: '#17233d' Notice.error({render:(h) => {return h('div', {style: {
}}, '您的账号已在其他地方登录,如不是您个人操作,请及时修改密码')}}) paddingRight: '5px',
router.replace({name: 'login'}) fontSize: '14px',
} lineHeight: '20px',
if (response.data.body.code == '901'){ color: '#17233d'
router.replace({name: 'login'}) }}, errorInfo[code])}})
} setTimeout(() => {
if (response.data.body.code == '902'){ store.dispatch('cookieTipsHide', false)
Notice.error({title:'cookie已失效,请重新登录'}) }, 2000)
router.replace({name: 'login'}) }
// router.replace({name: 'login'})
} }
if(response.data.success){ if(response.data.success){
return Promise.resolve(response) return Promise.resolve(response)
} }
else { else {
return Promise.resolve(response); return Promise.resolve(response);
} }
......
...@@ -3,14 +3,17 @@ export default{ ...@@ -3,14 +3,17 @@ export default{
init: function (router) { init: function (router) {
router.beforeEach((to, form, next) => { router.beforeEach((to, form, next) => {
let token = localstorage.get('token') let token = localstorage.get('token')
// if (to.name =='login' || to.name =='update' || to.name =='sweepCode'){ if (to.meta && !to.meta.allowBack && window.history && window.history.pushState) { //登录页面不能后退
// next() history.pushState(null, null, document.URL)
// return }
// } if (to.name =='login' || to.name =='update' || to.name =='sweepCode'){
// if(!token){ next()
// window.location.href = `${window.location.origin}/login` return
// return }
// } if(!token){
window.location.href = `${window.location.origin}/login`
return
}
next() next()
}) })
} }
......
action.js // // action.js
\ No newline at end of file import * as types from './muationsType'
let action = {
cookieTipsShow({commit}, value) {
commit(types.COOKIE_SHOW, value)
},
cookieTipsHide ({commit}, value) {
commit(types.COOKIE_HIDE, value)
}
}
export default action
\ No newline at end of file
index.js import Vuex from 'vuex'
\ No newline at end of file import Vue from 'vue'
import mutations from './mutations.js'
import actions from './actions.js'
Vue.use(Vuex)
const state = {
cookieTips: false
}
export default new Vuex.Store({
mutations,
actions,
state
})
\ No newline at end of file
export const COOKIE_SHOW = 'COOKIE_SHOW'
export const COOKIE_HIDE = 'COOKIE_HIDE'
mutations.js import {COOKIE_SHOW, COOKIE_HIDE} from './muationsType'
\ No newline at end of file export default {
[COOKIE_SHOW] (state, value) {
state.cookieTips = value || true
},
[COOKIE_HIDE](state, value) {
state.cookieTips = value || false
}
}
\ No newline at end of file
This diff is collapsed.
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'styles', groups: [ 'styles' ] },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'forms', groups: [ 'forms' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
{ name: 'links', groups: [ 'links' ] },
{ name: 'insert', groups: [ 'insert' ] },
{ name: 'colors', groups: [ 'colors' ] },
{ name: 'tools', groups: [ 'tools' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
{ name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] }
];
config.removeDialogTabs = 'image:advanced;link:advanced';
config.removePlugins = 'elementspath,resize'; // 移除编辑器底部状态栏显示的元素路径和调整编辑器大小的按钮
config.image_previewText = ' '; // 图片信息面板预览区内容的文字内容,默认显示CKEditor自带的内容
config.removeDialogTabs = 'image:advanced;image:Link'; // 移除图片上传页面的'高级','链接'页签
config.removeButtons = 'Cut,Copy,Paste,PasteText,PasteFromWord,Source,Save,Templates,NewPage,Preview,Print,About,ShowBlocks,Flash,PageBreak,Iframe,Anchor,SelectAll,BidiLtr,BidiRtl,Language,CreateDiv,Superscript,Subscript,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Find,Replace';
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment