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 @@
"resolved": "https://registry.npmjs.org/vue-upload-component/-/vue-upload-component-2.8.20.tgz",
"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": {
"version": "1.6.0",
"resolved": "http://npmprivate.quantgroups.com/watchpack/-/watchpack-1.6.0.tgz",
......
......@@ -21,7 +21,8 @@
"qs": "^6.7.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vue-upload-component": "^2.8.20"
"vue-upload-component": "^2.8.20",
"vuex": "^3.1.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
......
......@@ -2,14 +2,14 @@
<Row id="home" class="home">
<Col span="3" class="aside" style="width:17%;height:100%">
<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" >
<Submenu :name="menu.name" :key="menu.name" v-show='!(isAdmin==false&&menu.item=="账户管理")'>
<template slot="title">
<Icon :type="menu.icon" style="font-size:20px;font-weight:bold"/>
{{menu.item}}
</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>
</template>
</Menu>
......@@ -17,7 +17,7 @@
<Col span="21" class="content" style="width:83%;height:100%">
<Row class="header" style="height:6%">
<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" >
{{menu.item}}
</MenuItem>
......@@ -54,12 +54,13 @@ import localstorage from '../service/localstorage.service.js'
xiabiao:'',
itemSelect:'',
type:'',
hName: '',
vName: ['1-1', '2-1', '3-1', '4-1'],
vSubName: '1-1-1',
levelOneName: '',
levelTwoName: ['1-1', '2-1', '3-1', '4-1'],
levelThreeName: '1-1-1',
menuList: [
{ name: '1',
item: '简历管理',
loadMenu: true,
child: [
{
name: '1-1',
......@@ -106,15 +107,17 @@ import localstorage from '../service/localstorage.service.js'
}]
},
{ name: '4',
item: '系统管理',
item: '系统管理',
isAdmin: true,
child: [{
name: '4-1',
item: '账户管理',
icon: 'ios-contact-outline',
show: true,
child: [{
name: '4-1-1',
item:'账户管理',
route: '/account'
route: '/account'
}]
},
{ name: '4-2',
......@@ -136,8 +139,7 @@ import localstorage from '../service/localstorage.service.js'
] },
],
childMenu: [{ name: '1-1', item: '全部管理', child: [{ name: '1-1-1', item:'全部简历', route: '/allResume' }] },
{ name: '1-2', item: '渠道简历', child: [] }]
childMenu: []
}
},
watch:{
......@@ -150,7 +152,7 @@ import localstorage from '../service/localstorage.service.js'
},
methods: {
go(name) {
this.vSubName = name
this.levelThreeName = name
this.childMenu.map(par => {
par.child.map(child => {
if (child.name == name) {
......@@ -159,32 +161,33 @@ import localstorage from '../service/localstorage.service.js'
})
})
},
selectMenu(name, type) {
// type是否为刷新页面
this.hName = name
const menus = this.menuList.filter(v => name === v.name)
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: [] }]
if (!type) { // 点击菜单默认展示第一个菜单
this.vName = []
this.vName[0] = ((name == '4') && this.isAdmin && this.childMenu[0].name) || ((name == '4') && !this.isAdmin && this.childMenu[1].name) || this.childMenu[0].name
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
selectMenu(name, refesh) {
// // refesh是否为刷新页面
this.levelOneName = name
const menus = this.menuList.filter(v => name === v.name)[0]
this.childMenu = menus.child ? menus.child : this.menuList[0].child
if (!refesh) { // 点击菜单默认展示第一个菜单
this.levelTwoName = []
let initName = this.getInitName(name, menus)
this.levelTwoName.push(initName.levelTwoName)
this.levelThreeName = initName.levelThreeName
}
if (name == '1') { // 简历管理模块需要加载渠道简历
if (menus.loadMenu) { // 简历管理模块需要加载渠道简历
this.getChannelMenu()
}
if (type&&this.$route.path.indexOf('channel') > -1) {
this.vSubName = this.$route.path.split('/')[2]
if (refesh&&this.$route.path.indexOf('channel') > -1) {
this.levelThreeName = this.$route.path.split('/')[2]
}
this.$nextTick(() => {
this.$refs.subMenu.updateOpened();
this.$refs.subMenu.updateActiveName();
})
this.go(this.vSubName)
this.go(this.levelThreeName)
},
// 获取个人信息
getmassage(){
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'
if(res.data.success==true){
localstorage.remove('token')
localstorage.remove('isADMIN')
this.$router.push('/login')
this.$router.replace('/login')
}
})
},
getChannelMenu(){
this.menuList[0].child[1].child = []
getChannelMassage().then(res=>{
this.channelARR=res.data.body
if (!res.data.status) {
return
}
this.channelARR=res.data.body || []
this.channelARR.map((item,index) => {
var obj = {
name: `${item.sourceName}`,
item: item.sourceName,
route: `/channel/${item.sourceCode}`
name: `${item.sourceName}`,
item: item.sourceName,
route: `/channel/${item.sourceCode}`
}
this.menuList[0].child[1].child.push(obj)
})
......@@ -214,39 +220,66 @@ import localstorage from '../service/localstorage.service.js'
getActiveName (change) {
let pathName = this.$route.path
if (pathName.indexOf('channel') > -1) {
this.hName = '1'
this.vSubName = pathName.split('/')[2]
this.vName = []
this.vName.push('1-2')
this.selectMenu(this.hName, 'refresh')
this.levelOneName = '1'
this.levelThreeName = pathName.split('/')[2]
this.levelTwoName = []
this.levelTwoName.push('1-2')
this.selectMenu(this.levelOneName, 'refresh')
return
}
this.menuList.map(parent => {
parent.child.map(child => {
child.child.map(grandson => {
if (grandson.route == pathName) {
this.vSubName = grandson.name
this.hName = parent.name
this.vName = []
this.vName.push(child.name)
this.levelThreeName = grandson.name
this.levelOneName = parent.name
this.levelTwoName = []
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(){
judeAdmin().then(res=>{
this.isAdmin=res.data.body
this.isAdmin = res.data.body
this.menuList[3].isAdmin = this.isAdmin
})
},
goBack () {
this.getActiveName()
}
},
mounted() {
this.getmassage()
this.getActiveName()
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>
......
......@@ -444,6 +444,9 @@ export default {
// 面试官查询
Serchlistinterview(){
Serchinterviewor().then(res=>{
if (!res.data.status) {
return
}
this.Interviewer=res.data.body
this.Interviewer.unshift('不限')
})
......@@ -451,6 +454,9 @@ export default {
// 邀约人查询
SerchInvitation(){
SerchInvitationOwer().then(res=>{
if (!res.data.status) {
return
}
this.Inviter=res.data.body
this.Inviter.unshift('不限')
})
......
......@@ -8,9 +8,9 @@
<FormItem label="邀约人" prop="Inviter" style="margin-top:0.4rem;font-size:15px">
<Input placeholder="请输入" style="width:85%;" v-model="formInline.Inviter" size="large"/>
</FormItem>
<FormItem label="邀约人手机" style="" class="phone">
<Input placeholder="请输入" style="width:85%;" v-model="formInline.InviterPhoneNumber" size="large" @on-blur='jedugePhone' /><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>
<FormItem label="邀约人手机" style="" class="phone" prop="InviterPhoneNumber">
<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> -->
</FormItem>
<FormItem label="面试时间" prop="time" style="margin-top:0px" class="dateTime">
<Input placeholder="请输入" style="width:40%;" v-model="formInline.date" :readonly="true" size="large" />
......@@ -83,7 +83,11 @@ export default {
{ required: true, message: '请输入邀约人', trigger: 'blur' }
],
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: [
{ required: true,message: '请输入应聘职位', trigger: 'blur' }
......
......@@ -30,12 +30,17 @@ export default new Router({
}, {
path: '/login',
name: 'login',
component: login,},
{
path: '/sweepCode',
name: 'sweepCode',
component: sweepCode,},
component: login,
meta: {
allowBack: false
}
},
{
path:'/sweepCode',
name:'sweepCode',
component:sweepCode
},
{
path:'/update',
name:'update',
component:update
......
......@@ -3,7 +3,8 @@ import Promise from './promise.service.js'
import {Notice} from 'iview'
import Vue from 'vue'
import router from '../router/index.js'
// axios.defaults.withCredentials = true
import store from '../store'
var instance = axios.create({});
instance.defaults.timeout = 3600000;
instance.defaults.withCredentials = true;
......@@ -22,27 +23,31 @@ instance.interceptors.request.use(function (config) {
});
instance.interceptors.response.use(function (response) {
// 在发送请求之前做些什么
let errorInfo = {
'900': '您的账号已在其他地方登录,如不是您个人操作,请及时修改密码',
'901': '',
'902': 'cookie已失效,请重新登录'
}
if(response.status >= 200 && response.status < 300){
if (response.data.body.code == '900'){
Notice.error({render:(h) => {return h('div', {style: {
paddingRight: '10px',
fontSize: '14px',
color: '#17233d'
}}, '您的账号已在其他地方登录,如不是您个人操作,请及时修改密码')}})
router.replace({name: 'login'})
}
if (response.data.body.code == '901'){
router.replace({name: 'login'})
}
if (response.data.body.code == '902'){
Notice.error({title:'cookie已失效,请重新登录'})
router.replace({name: 'login'})
let code = response.data&&response.data.body&&response.data.body.code || ''
if (code == '900' || code == '901' || code == '902'){
if (!store.state.cookieTips && code != '901') {
store.dispatch('cookieTipsShow', true)
Notice.error({render:(h) => {return h('div', {style: {
paddingRight: '5px',
fontSize: '14px',
lineHeight: '20px',
color: '#17233d'
}}, errorInfo[code])}})
setTimeout(() => {
store.dispatch('cookieTipsHide', false)
}, 2000)
}
// router.replace({name: 'login'})
}
if(response.data.success){
return Promise.resolve(response)
}
else {
return Promise.resolve(response);
}
......
......@@ -3,14 +3,17 @@ export default{
init: function (router) {
router.beforeEach((to, form, next) => {
let token = localstorage.get('token')
// if (to.name =='login' || to.name =='update' || to.name =='sweepCode'){
// next()
// return
// }
// if(!token){
// window.location.href = `${window.location.origin}/login`
// return
// }
if (to.meta && !to.meta.allowBack && window.history && window.history.pushState) { //登录页面不能后退
history.pushState(null, null, document.URL)
}
if (to.name =='login' || to.name =='update' || to.name =='sweepCode'){
next()
return
}
if(!token){
window.location.href = `${window.location.origin}/login`
return
}
next()
})
}
......
action.js
\ No newline at end of file
// // action.js
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
\ No newline at end of file
import Vuex from 'vuex'
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
\ No newline at end of file
import {COOKIE_SHOW, COOKIE_HIDE} from './muationsType'
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 source diff could not be displayed because it is too large. You can view the blob instead.
/**
* @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