Commit 680dfdeb authored by 郝聪敏's avatar 郝聪敏

添加eslint

parent c4c3cb8f
/build/ node_modules/*
/config/ build/*
/dist/ config/*
/*.js dist/*
lib/*
static/*
\ No newline at end of file
// https://eslint.org/docs/user-guide/configuring
module.exports = { module.exports = {
root: true, root: true,
parserOptions: { parserOptions: {
parser: 'babel-eslint' parser: 'babel-eslint',
}, },
env: { env: {
browser: true, browser: true,
}, },
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention extends: [
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 'plugin:vue/essential',
extends: ['plugin:vue/essential', 'airbnb-base'], 'standard',
// required to lint *.vue files ],
plugins: [ plugins: [
'vue' 'vue',
], ],
// check if imports actually resolve
settings: {
'import/resolver': {
webpack: {
config: 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
rules: { rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['test/unit/index.js']
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'global-require': 'off',
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 防止iview的标签报错 // 防止iview的标签报错
"vue/no-parsing-error": [1, { "x-invalid-end-tag": false }], "vue/no-parsing-error": [2, { "x-invalid-end-tag": false }],
"linebreak-style": 0, },
'indent': [0, 2],
"comma-dangle": 0,
"semi": 0,
"max-len": 0,
"no-tabs": 0,
"no-mixed-spaces-and-tabs": 0,
"eol-last": 0,
"key-spacing": 0
}
} }
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev", "start": "npm run dev",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --fix --cache --ext .js,.vue src",
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
"babel-core": "^6.22.1", "babel-core": "^6.22.1",
"babel-eslint": "^8.2.1", "babel-eslint": "^8.2.6",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-jsx": "^6.18.0",
...@@ -39,13 +39,17 @@ ...@@ -39,13 +39,17 @@
"chalk": "^2.0.1", "chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"eslint": "^4.15.0", "eslint": "^5.16.0",
"eslint-config-airbnb-base": "^11.3.0", "eslint-config-airbnb-base": "^11.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-friendly-formatter": "^3.0.0", "eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-webpack": "^0.8.3", "eslint-import-resolver-webpack": "^0.8.3",
"eslint-loader": "^1.7.1", "eslint-loader": "^1.9.0",
"eslint-plugin-import": "^2.7.0", "eslint-plugin-import": "^2.19.1",
"eslint-plugin-vue": "^4.0.0", "eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.0.1",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1", "friendly-errors-webpack-plugin": "^1.6.1",
...@@ -69,7 +73,8 @@ ...@@ -69,7 +73,8 @@
"webpack": "^3.6.0", "webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0", "webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1", "webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0" "webpack-merge": "^4.1.0",
"husky": "^3.1.0"
}, },
"engines": { "engines": {
"node": ">= 6.0.0", "node": ">= 6.0.0",
...@@ -79,5 +84,10 @@ ...@@ -79,5 +84,10 @@
"> 1%", "> 1%",
"last 2 versions", "last 2 versions",
"not ie <= 8" "not ie <= 8"
] ],
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
}
} }
\ No newline at end of file
...@@ -5,21 +5,21 @@ ...@@ -5,21 +5,21 @@
</template> </template>
<script> <script>
window.onload = function() { window.onload = function () {
  document.addEventListener('touchstart', function(event) { document.addEventListener('touchstart', function (event) {
    if (event.touches.length > 1) { if (event.touches.length > 1) {
      event.preventDefault() event.preventDefault()
    } }
  }) })
  document.addEventListener('gesturestart', function(event) { document.addEventListener('gesturestart', function (event) {
    event.preventDefault() event.preventDefault()
  }) })
} }
export default { export default {
name: 'App', name: 'App',
data() { data () {
return { return {
appClass: 'pc', appClass: 'pc'
} }
}, },
created: function () { created: function () {
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
this.appClass = 'mobile' this.appClass = 'mobile'
} }
} }
}; }
</script> </script>
<style> <style>
...@@ -48,7 +48,6 @@ export default { ...@@ -48,7 +48,6 @@ export default {
-ms-user-select: text !important; /*IE10*/ -ms-user-select: text !important; /*IE10*/
user-select: text !important; user-select: text !important;
} }
.pc { .pc {
height: 100%; height: 100%;
......
...@@ -4,34 +4,44 @@ import { ...@@ -4,34 +4,44 @@ import {
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 获取个人信息 // 获取个人信息
export function getpersonMassage(params) { export function getpersonMassage (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/login/me`,params,{headers: { return axios.get(`${sapi}/api/login/me`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 用户退出 // 用户退出
export function loginOUT() { export function loginOUT () {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/login/logout`,{headers: { return axios.get(`${sapi}/api/login/logout`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//通过某一来源查询简历信息 // 通过某一来源查询简历信息
export function adoptOneSeeResumeList(parmars) { export function adoptOneSeeResumeList (parmars) {
return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListBySource`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//通过渠道机简历信息 // 通过渠道机简历信息
export function getChannelMassage() { export function getChannelMassage () {
return axios.get(`${sapi}/api/resume/getSourceList`,{headers: { return axios.get(`${sapi}/api/resume/getSourceList`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 判断是否为超级管理员 // 判断是否为超级管理员
export function judeAdmin() { export function judeAdmin () {
return axios.get(`${sapi}/api/user/isAdmin`,{headers: { return axios.get(`${sapi}/api/user/isAdmin`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
...@@ -4,69 +4,89 @@ import { ...@@ -4,69 +4,89 @@ import {
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 更改约面信息 // 更改约面信息
export function changeinterviewMassage(parmars) { export function changeinterviewMassage (parmars) {
return axios.post(`${sapi}/api/resumeInterview/update`,parmars,{headers: { return axios.post(`${sapi}/api/resumeInterview/update`, parmars, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 重启面试 // 重启面试
export function oppenInterview(tid,tstatus) { export function oppenInterview (tid, tstatus) {
console.log(tid,tstatus) console.log(tid, tstatus)
return axios.post(`${sapi}/api/resumeFlow/reset/${tid}/${tstatus}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/reset/${tid}/${tstatus}`, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 终止面试 // 终止面试
export function SInterview(tid) { export function SInterview (tid) {
return axios.post(`${sapi}/api/resumeFlow/end/${tid}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/end/${tid}`, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 面试管理查询 // 面试管理查询
export function SerchList(parmars, status) { export function SerchList (parmars, status) {
return axios.post(`${sapi}/api/interview/findListByQueryVO`,parmars,{headers: { return axios.post(`${sapi}/api/interview/findListByQueryVO`, parmars, {
'Content-Type':'application/json;', headers: {
'X-Requested-With':'XMLHttpRequest', 'Content-Type': 'application/json;',
'X-Requested-With': 'XMLHttpRequest',
status status
}}) }
})
} }
//查看简历详情页 // 查看简历详情页
export function seedetail (parmars) { export function seedetail (parmars) {
return axios.get(`${sapi}/api/html/get/${parmars.uid}`,{headers: { return axios.get(`${sapi}/api/html/get/${parmars.uid}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//面试官查询 // 面试官查询
export function Serchinterviewor() { export function Serchinterviewor () {
return axios.get(`${sapi}/api/interview/findInterviewerList`) return axios.get(`${sapi}/api/interview/findInterviewerList`)
} }
//邀约人查询 // 邀约人查询
export function SerchInvitationOwer() { export function SerchInvitationOwer () {
return axios.post(`${sapi}/api/interview/findInviterList`,{headers: { return axios.post(`${sapi}/api/interview/findInviterList`, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
//新增约面信息 // 新增约面信息
export function NewAddInterview(parmars) { export function NewAddInterview (parmars) {
return axios.post(`${sapi}/api/resumeInterview/add`,parmars,{headers: { return axios.post(`${sapi}/api/resumeInterview/add`, parmars, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 查询记录 // 查询记录
export function recodeLIST (parmars) { export function recodeLIST (parmars) {
return axios.post(`${sapi}/api/resumeFlow/history/${parmars.resumeId}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/history/${parmars.resumeId}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 变更状态 // 变更状态
export function changestatus (tid,tstatus) { export function changestatus (tid, tstatus) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${tid}/${tstatus}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${tid}/${tstatus}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 获取终止面试前的前一个状态 // 获取终止面试前的前一个状态
export function formstatus (parmars) { export function formstatus (parmars) {
return axios.post(`${sapi}/api/resumeFlow/getPreReset/${parmars.resumeId}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/getPreReset/${parmars.resumeId}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
...@@ -3,17 +3,21 @@ import { ...@@ -3,17 +3,21 @@ import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
//登录 // 登录
export function login(params) { export function login (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.post(`${sapi}/api/login/doLogin`,params,{headers: { return axios.post(`${sapi}/api/login/doLogin`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//修改密码 // 修改密码
export function updatePsd(params) { export function updatePsd (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.post(`${sapi}/api/login/modifyPassword`,params,{headers: { return axios.post(`${sapi}/api/login/modifyPassword`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
...@@ -4,156 +4,201 @@ import { ...@@ -4,156 +4,201 @@ import {
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 查询简历列表 // 查询简历列表
export function serchList(parmars){ export function serchList (parmars) {
return axios.post(`${sapi}/api/resume/findList`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findList`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 下载简历(单条) // 下载简历(单条)
export function downloadone (parmars) { export function downloadone (parmars) {
parmars=qs.stringify(parmars) parmars = qs.stringify(parmars)
return axios.post(`${sapi}/api/resumeFile/download/formatted/one`,parmars,{headers: { return axios.post(`${sapi}/api/resumeFile/download/formatted/one`, parmars, {
'Content-Type':'application/x-www-form-urlencoded' headers: {
}}) 'Content-Type': 'application/x-www-form-urlencoded'
}
})
} }
// 搜索 // 搜索
export function sousuoList (parmars, status) { export function sousuoList (parmars, status) {
return axios.post(`${sapi}/api/resume/findListByQueryVO`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListByQueryVO`, parmars, {
'Content-Type':'application/json', headers: {
'Content-Type': 'application/json',
status status
}}) }
})
} }
//查看简历详情页 // 查看简历详情页
export function seedetail (parmars) { export function seedetail (parmars) {
return axios.get(`${sapi}/api/html/get/${parmars.uid}`,{headers: { return axios.get(`${sapi}/api/html/get/${parmars.uid}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 简历pass // 简历pass
export function PASS (parmars) { export function PASS (parmars) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`,'',{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`, '', {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//待处理 // 待处理
export function TODORes (parmars) { export function TODORes (parmars) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`,'',{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`, '', {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 备选 // 备选
export function OPTION (parmars) { export function OPTION (parmars) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`,'',{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`, '', {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 删除简历 // 删除简历
export function deleteREsume (deleteallArr) { export function deleteREsume (deleteallArr) {
return axios.post(`${sapi}/api/resume/delete`,JSON.stringify(deleteallArr),{headers: { return axios.post(`${sapi}/api/resume/delete`, JSON.stringify(deleteallArr), {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 单条下载简历 // 单条下载简历
export function downloadOne (parmars) { export function downloadOne (parmars) {
return axios.get(`${sapi}/api/resume/download/formatted/one?resumeId=${parmars.resumeId}`,{headers: { return axios.get(`${sapi}/api/resume/download/formatted/one?resumeId=${parmars.resumeId}`, {
headers: {
// 'Content-Type':'application/x-www-form-urlencoded' // 'Content-Type':'application/x-www-form-urlencoded'
}}) }
})
} }
// 批量下载简历 // 批量下载简历
export function downloadALL () { export function downloadALL () {
return axios.get(`${sapi}/api/resumeFile/download/formatted/compress`,{headers: { return axios.get(`${sapi}/api/resumeFile/download/formatted/compress`, {
'Content-Type':'application/x-www-form-urlencoded' headers: {
}}) 'Content-Type': 'application/x-www-form-urlencoded'
}
})
} }
// 导出列表 // 导出列表
export function exportLIST (parmars) { export function exportLIST (parmars) {
return axios.get(`${sapi}/api/excel/output?optSource=${parmars.optSource}&keywordString=${parmars.keywordString}&company=${parmars.company}&ownerSex=${parmars.ownerSex}&highestDegreeNum=${parmars.highestDegreeNum}&flowStatusList=${parmars.flowStatusList}&ownerWorkYears1=${parmars.ownerWorkYears1}&ownerWorkYears2=${parmars.ownerWorkYears2}`, return axios.get(`${sapi}/api/excel/output?optSource=${parmars.optSource}&keywordString=${parmars.keywordString}&company=${parmars.company}&ownerSex=${parmars.ownerSex}&highestDegreeNum=${parmars.highestDegreeNum}&flowStatusList=${parmars.flowStatusList}&ownerWorkYears1=${parmars.ownerWorkYears1}&ownerWorkYears2=${parmars.ownerWorkYears2}`,
{headers: { {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 操作记录 // 操作记录
export function recodeLIST (parmars) { export function recodeLIST (parmars) {
return axios.post(`${sapi}/api/resumeFlow/history/${parmars.resumeId}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/history/${parmars.resumeId}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//通过某一来源查询简历信息 // 通过某一来源查询简历信息
export function adoptOneSeeResumeList(parmars) { export function adoptOneSeeResumeList (parmars) {
return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListBySource`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 新增约面信息 // 新增约面信息
export function addinterview(parmars) { export function addinterview (parmars) {
return axios.post(`${sapi}/api/resumeInterview/add`,parmars,{headers: { return axios.post(`${sapi}/api/resumeInterview/add`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 修改流程状态 // 修改流程状态
export function updatastatus(parmars) { export function updatastatus (parmars) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
} }
//获取邮件模板 })
export function getEmailMoo() { }
return axios.post(`${sapi}/api/emailTemplate/getAllTemplateList`,{headers: { // 获取邮件模板
'Content-Type':'application/json' export function getEmailMoo () {
}}) return axios.post(`${sapi}/api/emailTemplate/getAllTemplateList`, {
} headers: {
//根据获取id邮件模板内容 'Content-Type': 'application/json'
export function getEmailContent(parmars) { }
return axios.post(`${sapi}/api/emailTemplate/loadTemplate`,parmars,{headers: { })
'Content-Type':'application/json' }
}}) // 根据获取id邮件模板内容
} export function getEmailContent (parmars) {
//上传图片 return axios.post(`${sapi}/api/emailTemplate/loadTemplate`, parmars, {
export function uploadimage() { headers: {
return axios.get(`${sapi}/api/ckeditor/uploadImage`,{headers: { 'Content-Type': 'application/json'
'Content-Type':'application/json' }
}}) })
}
// 上传图片
export function uploadimage () {
return axios.get(`${sapi}/api/ckeditor/uploadImage`, {
headers: {
'Content-Type': 'application/json'
}
})
} }
// 发送邮件 // 发送邮件
export function sendEmail(parmars) { export function sendEmail (parmars) {
return axios.post(`${sapi}/api/sendMail/sendEmailTemplate`,parmars,{headers: { return axios.post(`${sapi}/api/sendMail/sendEmailTemplate`, parmars, {
'Content-Type':'multipart/form-data', headers: {
'Content-Type': 'multipart/form-data'
// 'Content-Disposition':'multipart/form-data' // 'Content-Disposition':'multipart/form-data'
// 'Content-Type':'application/json' // 'Content-Type':'application/json'
}}) }
})
} }
export function findCompanyEmailByKey(key) { //公司通讯录 export function findCompanyEmailByKey (key) { // 公司通讯录
return axios.get(`${sapi}/api/companyEmail/findCompanyEmailByKey?key=${key}`) return axios.get(`${sapi}/api/companyEmail/findCompanyEmailByKey?key=${key}`)
} }
// 转发邮箱通知 // 转发邮箱通知
export function forwardResume(params) { export function forwardResume (params) {
return axios.post(`${sapi}/api/resume/forwardResume`,params, {headers: { return axios.post(`${sapi}/api/resume/forwardResume`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
export function getPdf(parmars) { export function getPdf (parmars) {
return axios.get(`${sapi}/api/resume/getResumePdfByResumeId/${parmars.uid}`,{ return axios.get(`${sapi}/api/resume/getResumePdfByResumeId/${parmars.uid}`, {
responseType: 'arraybuffer', responseType: 'arraybuffer',
headers: { headers: {
'Content-Type':'application/json' 'Content-Type': 'application/json'
} }
}) })
} }
// 是否展示原件的PDF // 是否展示原件的PDF
export function isShowPDF(parmars) { export function isShowPDF (parmars) {
return axios.get(`${sapi}/api/resume/isShowOriPdf/${parmars.uid}`, {headers: { return axios.get(`${sapi}/api/resume/isShowOriPdf/${parmars.uid}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
} }
export function getpdfUrl(parmars) { })
return axios.get(`${sapi}/api/resume/getResumePdfUrl/${parmars.uid}`, {headers: { }
'Content-Type':'application/json' export function getpdfUrl (parmars) {
}}) return axios.get(`${sapi}/api/resume/getResumePdfUrl/${parmars.uid}`, {
} headers: {
//获取职位列表 'Content-Type': 'application/json'
export function getlist(parmars) { }
return axios.get(`${sapi}/api/resume/findPositionList?optSourceCode=${parmars.optSourceCode}`, {headers: { })
'Content-Type':'application/json' }
}}) // 获取职位列表
} export function getlist (parmars) {
return axios.get(`${sapi}/api/resume/findPositionList?optSourceCode=${parmars.optSourceCode}`, {
headers: {
'Content-Type': 'application/json'
}
})
}
...@@ -3,75 +3,99 @@ import { ...@@ -3,75 +3,99 @@ import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
//账号列表查询 // 账号列表查询
export function queryaccountList(params) { export function queryaccountList (params) {
return axios.post(`${sapi}/api/user/findList`,params,{headers: { return axios.post(`${sapi}/api/user/findList`, params, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
//添加账户 // 添加账户
export function addAccount (params) { export function addAccount (params) {
return axios.post(`${sapi}/api/user/add`,params,{headers: { return axios.post(`${sapi}/api/user/add`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//删除单条账户 // 删除单条账户
export function Delateaccount(parmars){ export function Delateaccount (parmars) {
return axios.get(`${sapi}/api/user/delete/${parmars.id}`,{headers: { return axios.get(`${sapi}/api/user/delete/${parmars.id}`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//批量删除 // 批量删除
export function delateAllAccount(DelateARR){ export function delateAllAccount (DelateARR) {
return axios.post(`${sapi}//api/user/delete`,JSON.stringify(DelateARR),{headers: { return axios.post(`${sapi}//api/user/delete`, JSON.stringify(DelateARR), {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//恢复初始密码 // 恢复初始密码
export function recoveryPassword(parmars){ export function recoveryPassword (parmars) {
return axios.post(`${sapi}/api/user/initial/${parmars.id}`,{headers: { return axios.post(`${sapi}/api/user/initial/${parmars.id}`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//查询邮箱列表 // 查询邮箱列表
export function queryemailList(parmars){ export function queryemailList (parmars) {
return axios.post(`${sapi}/api/email/list`,parmars,{headers: { return axios.post(`${sapi}/api/email/list`, parmars, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 同步邮箱 // 同步邮箱
export function Synchronization(parmars){ export function Synchronization (parmars) {
return axios.post(`${sapi}/api/email/bindAndSync`,parmars,{headers: { return axios.post(`${sapi}/api/email/bindAndSync`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 解绑邮箱 // 解绑邮箱
export function jiebangEmail(id){ export function jiebangEmail (id) {
return axios.post(`${sapi}/api/email/unbind/${id}`,{headers: { return axios.post(`${sapi}/api/email/unbind/${id}`, {
'Content-Type':'application/x-www-form-urlencoded' headers: {
}}) 'Content-Type': 'application/x-www-form-urlencoded'
}
})
} }
// 修改邮箱并重新绑定 // 修改邮箱并重新绑定
export function updateemailTWO(parmars){ export function updateemailTWO (parmars) {
return axios.post(`${sapi}/api/email/modify`,parmars,{headers: { return axios.post(`${sapi}/api/email/modify`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
} }
})
}
// 批量解绑邮箱 // 批量解绑邮箱
export function UntyingAll(UntyingAllARR){ export function UntyingAll (UntyingAllARR) {
return axios.post(`${sapi}/api/email/unbind/batch`,JSON.stringify(UntyingAllARR),{headers: { return axios.post(`${sapi}/api/email/unbind/batch`, JSON.stringify(UntyingAllARR), {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 获取二维码 // 获取二维码
export function getErcode(){ export function getErcode () {
return axios.get(`${sapi}/api/qrCode/getInterviewQrcode`,{headers: { return axios.get(`${sapi}/api/qrCode/getInterviewQrcode`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// //修改账户 // //修改账户
export function updateAccount(parmars){ export function updateAccount (parmars) {
return axios.post(`${sapi}/api/user/modify/${parmars.id}`,parmars,{headers: { return axios.post(`${sapi}/api/user/modify/${parmars.id}`, parmars, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
...@@ -4,8 +4,9 @@ import { ...@@ -4,8 +4,9 @@ import {
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 提交应聘登记表 // 提交应聘登记表
export function submitMassage(params) { export function submitMassage (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.post(`${sapi}/api/interview/arrive`,params,{headers: { return axios.post(`${sapi}/api/interview/arrive`, params, {
'Content-Type':'application/json' }}) headers: { 'Content-Type': 'application/json' }
})
} }
...@@ -4,36 +4,46 @@ import { ...@@ -4,36 +4,46 @@ import {
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 获取上传批次号 // 获取上传批次号
export function getuploadNumber() { export function getuploadNumber () {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/resume/upload/batchNum`,{headers: { return axios.get(`${sapi}/api/resume/upload/batchNum`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//上传文件 // 上传文件
export function uploadfile(parmars) { export function uploadfile (parmars) {
return axios.post(`${sapi}/api/resume/upload`,parmars,{headers: { return axios.post(`${sapi}/api/resume/upload`, parmars, {
headers: {
// 'Content-Type':'multipart/form-data', // 'Content-Type':'multipart/form-data',
processData : false, processData: false,
contentType : false, contentType: false,
async: false, async: false
}}) }
})
} }
// 查询上传列表记录 // 查询上传列表记录
export function serchList(parmars) { export function serchList (parmars) {
return axios.post(`${sapi}/api/resume/upload/history`,parmars,{headers: { return axios.post(`${sapi}/api/resume/upload/history`, parmars, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 查询简历详情 // 查询简历详情
export function serchRESUMEdetail(parmars) { export function serchRESUMEdetail (parmars) {
return axios.get(`${sapi}/api/html/get/${parmars.uid}`,{headers: { return axios.get(`${sapi}/api/html/get/${parmars.uid}`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 查询简历详情 // 查询简历详情
export function deleteREsumeUPLOad(deleteallArr) { export function deleteREsumeUPLOad (deleteallArr) {
return axios.post(`${sapi}/api/resume/delete`,JSON.stringify(deleteallArr),{headers: { return axios.post(`${sapi}/api/resume/delete`, JSON.stringify(deleteallArr), {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import CKEDITOR from 'CKEDITOR'; import CKEDITOR from 'CKEDITOR'
export default { export default {
name: 'ckeditor', name: 'ckeditor',
props: { props: {
height: { height: {
...@@ -29,24 +29,24 @@ ...@@ -29,24 +29,24 @@
default: '' default: ''
} }
}, },
data() { data () {
return { return {
isInit: false isInit: false
}; }
}, },
watch: { watch: {
value:{ value: {
deep: true, deep: true,
immediate:true, immediate: true,
handler(value) { handler (value) {
this.isInit&&this.editor.setData(value.value) this.isInit && this.editor.setData(value.value)
} }
} }
}, },
mounted() { mounted () {
this.init() this.init()
}, },
beforeDestroy() { beforeDestroy () {
}, },
methods: { methods: {
init () { init () {
...@@ -57,18 +57,18 @@ ...@@ -57,18 +57,18 @@
lang: 'zh-cn', lang: 'zh-cn',
filebrowserImageUploadUrl: this.uploadUrl, filebrowserImageUploadUrl: this.uploadUrl,
filebrowserUploadMethod: 'form' filebrowserUploadMethod: 'form'
}); })
this.editor = CKEDITOR.instances.editor; this.editor = CKEDITOR.instances.editor
setTimeout(()=> { setTimeout(() => {
this.isInit = true this.isInit = true
}, 1000) }, 1000)
}, },
getValue(){ getValue () {
return this.editor.getData() return this.editor.getData()
} }
}, },
components: {} components: {}
}; }
</script> </script>
<style lang="less" rel="stylesheet/less" scoped> <style lang="less" rel="stylesheet/less" scoped>
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
</div> </div>
</template> </template>
<script> <script>
import editor from './ckeditor.vue' import editor from './ckeditor.vue'
import {sapi} from '../config/index.js' import { sapi } from '../config/index.js'
import localStorage from '../service/localstorage.service.js' import localStorage from '../service/localstorage.service.js'
export default { export default {
data () { data () {
return { return {
modal: true, modal: true,
...@@ -49,9 +49,16 @@ ...@@ -49,9 +49,16 @@
}, },
ruleInline: { ruleInline: {
user: [ user: [
{ required: false, message: 'Please fill in the user name', trigger: 'blur', pattern:/^1[3456789]\d{9}$/, validator: function(rule, value, call){ {
required: false,
message: 'Please fill in the user name',
trigger: 'blur',
pattern: /^1[3456789]\d{9}$/,
validator: function (rule, value, call) {
console.log(rule, value) console.log(rule, value)
return call(new Error()) } } return call(new Error())
}
}
], ],
password: [ password: [
{ required: true, message: 'Please fill in the password.', trigger: 'blur' }, { required: true, message: 'Please fill in the password.', trigger: 'blur' },
...@@ -60,17 +67,17 @@ ...@@ -60,17 +67,17 @@
} }
} }
}, },
watch:{}, watch: {},
components: { components: {
editor editor
}, },
// manually control the data synchronization // manually control the data synchronization
// 如果需要手动控制数据同步,父组件需要显式地处理changed事件 // 如果需要手动控制数据同步,父组件需要显式地处理changed事件
methods: { methods: {
getInfo(value) { getInfo (value) {
console.log(value) console.log(value)
}, },
handleSubmit(name) { handleSubmit (name) {
// this.$refs[name].validate((valid) => { // this.$refs[name].validate((valid) => {
// if (valid) { // if (valid) {
// this.$Message.success('Success!'); // this.$Message.success('Success!');
...@@ -86,7 +93,7 @@ ...@@ -86,7 +93,7 @@
}, },
computed: { computed: {
}, },
mounted() { mounted () {
}
} }
</script> }
\ No newline at end of file </script>
...@@ -3,24 +3,23 @@ ...@@ -3,24 +3,23 @@
</template> </template>
<script> <script>
function GetQueryString(name) { function GetQueryString (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配 var r = window.location.search.substr(1).match(reg) // 获取url中"?"符后的字符串并正则匹配
var context = ""; var context = ''
if (r != null) if (r != null) { context = r[2] }
context = r[2]; reg = null
reg = null; r = null
r = null; return context == null || context == '' || context == 'undefined' ? '' : decodeURIComponent(context)
return context == null || context == "" || context == "undefined" ? "" : decodeURIComponent(context); }
} export default {
export default{
data () { data () {
return {} return {}
}, },
mounted() { mounted () {
console.log(777) console.log(777)
window.parent.CKEDITOR.tools.callFunction(GetQueryString("CKEditorFuncNum"),GetQueryString("ImageUrl"),GetQueryString("Message")) window.parent.CKEDITOR.tools.callFunction(GetQueryString('CKEditorFuncNum'), GetQueryString('ImageUrl'), GetQueryString('Message'))
}
} }
}
</script> </script>
...@@ -38,30 +38,31 @@ ...@@ -38,30 +38,31 @@
</Row> </Row>
</template> </template>
<script> <script>
import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage,judeAdmin} from '../api/home.server.js' import { getpersonMassage, loginOUT, adoptOneSeeResumeList, getChannelMassage, judeAdmin } from '../api/home.server.js'
import localstorage from '../service/localstorage.service.js' import localstorage from '../service/localstorage.service.js'
import loading from '../components/loading.vue' import loading from '../components/loading.vue'
import {mapState} from 'vuex' import { mapState } from 'vuex'
export default{ export default {
data() { data () {
return { return {
massage:'', massage: '',
isAdmin: false, isAdmin: false,
arr:[], arr: [],
biaoshi:'', biaoshi: '',
channelARR:[], channelARR: [],
isadmin:'', isadmin: '',
pageindex:0, pageindex: 0,
pageSize:10, pageSize: 10,
condition:'', condition: '',
xiabiao:'', xiabiao: '',
itemSelect:'', itemSelect: '',
type:'', type: '',
levelOneName: '1', levelOneName: '1',
levelTwoName: ['1-1', '2-1', '3-1', '4-1'], levelTwoName: ['1-1', '2-1', '3-1', '4-1'],
levelThreeName: '1-1-1', levelThreeName: '1-1-1',
menuList: [ menuList: [
{ name: '1', {
name: '1',
item: '简历管理', item: '简历管理',
loadMenu: true, loadMenu: true,
child: [ child: [
...@@ -72,44 +73,51 @@ import {mapState} from 'vuex' ...@@ -72,44 +73,51 @@ import {mapState} from 'vuex'
child: [ child: [
{ {
name: '1-1-1', name: '1-1-1',
item:'全部简历', item: '全部简历',
route: '/allResume' route: '/allResume'
} }
] ]
}, },
{ name: '1-2', {
name: '1-2',
item: '渠道简历', item: '渠道简历',
icon: 'ios-list', icon: 'ios-list',
child: [] child: []
}] }]
}, },
{ name: '2', {
name: '2',
item: '面试管理', item: '面试管理',
child: [ child: [
{ name: '2-1', {
name: '2-1',
item: '面试管理', item: '面试管理',
icon: 'ios-paper-outline', icon: 'ios-paper-outline',
child: [ child: [
{ name: '2-1-1', {
item:'全部简历', name: '2-1-1',
item: '全部简历',
route: '/interview' route: '/interview'
}] }]
}] }]
}, },
{ name: '3', {
name: '3',
item: '上传简历', item: '上传简历',
child: [{ child: [{
name: '3-1', name: '3-1',
item: '上传简历', item: '上传简历',
icon: 'ios-cloud-upload-outline', icon: 'ios-cloud-upload-outline',
child: [ child: [
{ name: '3-1-1', {
item:'上传简历', name: '3-1-1',
item: '上传简历',
route: '/upload' route: '/upload'
}] }]
}] }]
}, },
{ name: '4', {
name: '4',
item: '系统管理', item: '系统管理',
isAdmin: true, isAdmin: true,
child: [{ child: [{
...@@ -119,38 +127,43 @@ import {mapState} from 'vuex' ...@@ -119,38 +127,43 @@ import {mapState} from 'vuex'
show: true, show: true,
child: [{ child: [{
name: '4-1-1', name: '4-1-1',
item:'账户管理', item: '账户管理',
route: '/account' route: '/account'
}] }]
}, },
{ name: '4-2', {
name: '4-2',
item: '邮箱管理', item: '邮箱管理',
icon:'ios-mail-outline', icon: 'ios-mail-outline',
child: [{ child: [{
name: '4-2-1', name: '4-2-1',
item:'邮箱管理', item: '邮箱管理',
route: '/emailMange' route: '/emailMange'
}]}, }]
{ name: '4-3', },
{
name: '4-3',
item: '二维码管理', item: '二维码管理',
icon: 'ios-qr-scanner', icon: 'ios-qr-scanner',
child: [ child: [
{ name: '4-3-1', {
item:'二维码管理', name: '4-3-1',
item: '二维码管理',
route: '/QRcode' route: '/QRcode'
}]} }]
}
] }, ]
}
], ],
childMenu: [] childMenu: []
} }
}, },
watch:{ watch: {
$route(to,from){ $route (to, from) {
if (to.params.fromInterview){ if (to.params.fromInterview) {
this.getActiveName() this.getActiveName()
} }
} }
}, },
computed: { computed: {
...@@ -162,7 +175,7 @@ import {mapState} from 'vuex' ...@@ -162,7 +175,7 @@ import {mapState} from 'vuex'
loading loading
}, },
methods: { methods: {
go(name) { go (name) {
this.levelThreeName = name this.levelThreeName = name
this.childMenu.map(par => { this.childMenu.map(par => {
par.child.map(child => { par.child.map(child => {
...@@ -172,64 +185,64 @@ import {mapState} from 'vuex' ...@@ -172,64 +185,64 @@ import {mapState} from 'vuex'
}) })
}) })
}, },
async selectMenu(name, refesh) { async selectMenu (name, refesh) {
// // refesh是否为刷新页面 // // refesh是否为刷新页面
this.levelOneName = name this.levelOneName = name
const menus = this.menuList.filter(v => name === v.name) const menus = this.menuList.filter(v => name === v.name)
this.childMenu = menus.length >0? menus[0].child : this.menuList[0].child this.childMenu = menus.length > 0 ? menus[0].child : this.menuList[0].child
if (!refesh) { // 点击菜单默认展示第一个菜单 if (!refesh) { // 点击菜单默认展示第一个菜单
this.levelTwoName = [] this.levelTwoName = []
let initName = this.getInitName(name, menus[0]) const initName = this.getInitName(name, menus[0])
this.levelTwoName.push(initName.levelTwoName) this.levelTwoName.push(initName.levelTwoName)
this.levelThreeName = initName.levelThreeName this.levelThreeName = initName.levelThreeName
} }
if (menus[0].loadMenu) { // 简历管理模块需要加载渠道简历 if (menus[0].loadMenu) { // 简历管理模块需要加载渠道简历
await this.getChannelMenu() await this.getChannelMenu()
} }
if (refesh&&this.$route.path.indexOf('channel') > -1) { if (refesh && this.$route.path.indexOf('channel') > -1) {
this.levelThreeName = 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.levelThreeName) this.go(this.levelThreeName)
}, },
// 获取个人信息 // 获取个人信息
getmassage(){ getmassage () {
getpersonMassage().then(res=>{ getpersonMassage().then(res => {
this.massage=res.data.body&&res.data.body.userName || '' this.massage = res.data.body && res.data.body.userName || ''
}) })
}, },
// 用户退出 // 用户退出
loginOut(){ loginOut () {
loginOUT().then(res=>{ loginOUT().then(res => {
if(res.data.success==true){ if (res.data.success == true) {
localstorage.remove('token') localstorage.remove('token')
localstorage.remove('isADMIN') localstorage.remove('isADMIN')
this.$router.replace('/login') this.$router.replace('/login')
} }
}) })
}, },
getChannelMenu(){ getChannelMenu () {
this.menuList[0].child[1].child = [] this.menuList[0].child[1].child = []
return getChannelMassage().then(res=>{ return getChannelMassage().then(res => {
if (res.data.status == false || !res.data.success) { if (res.data.status == false || !res.data.success) {
return return
} }
this.channelARR=res.data.body || [] 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}?handUpload=${item.handUpload==null?'':item.handUpload}` route: `/channel/${item.sourceCode}?handUpload=${item.handUpload == null ? '' : item.handUpload}`
} }
this.menuList[0].child[1].child.push(obj) this.menuList[0].child[1].child.push(obj)
}) })
}) })
}, },
getActiveName (change) { getActiveName (change) {
let pathName = this.$route.path const pathName = this.$route.path
if (pathName.indexOf('channel') > -1) { if (pathName.indexOf('channel') > -1) {
this.levelOneName = '1' this.levelOneName = '1'
this.levelThreeName = pathName.split('/')[2] this.levelThreeName = pathName.split('/')[2]
...@@ -248,30 +261,29 @@ import {mapState} from 'vuex' ...@@ -248,30 +261,29 @@ import {mapState} from 'vuex'
this.levelTwoName.push(child.name) this.levelTwoName.push(child.name)
} }
}) })
}) })
}) })
this.selectMenu(this.levelOneName, 'refresh') this.selectMenu(this.levelOneName, 'refresh')
}, },
getInitName (name, menu, child) { getInitName (name, menu, child) {
// 超级管理员 // 超级管理员
let isAdmin = menu.isAdmin const isAdmin = menu.isAdmin
let hightMenu = { const hightMenu = {
levelTwoName: '', levelTwoName: '',
levelThreeName: '' levelThreeName: ''
} }
if (isAdmin || isAdmin == undefined) { // 默认展示一级菜单 if (isAdmin || isAdmin == undefined) { // 默认展示一级菜单
hightMenu.levelTwoName = menu.child[0].name hightMenu.levelTwoName = menu.child[0].name
hightMenu.levelThreeName = menu.child[0].child[0].name hightMenu.levelThreeName = menu.child[0].child[0].name
} else if(isAdmin == false){ //展示二级菜单 } else if (isAdmin == false) { // 展示二级菜单
hightMenu.levelTwoName = menu.child[1].name hightMenu.levelTwoName = menu.child[1].name
hightMenu.levelThreeName = menu.child[1].child[0].name hightMenu.levelThreeName = menu.child[1].child[0].name
} }
return hightMenu 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 this.menuList[3].isAdmin = this.isAdmin
}) })
...@@ -280,19 +292,19 @@ import {mapState} from 'vuex' ...@@ -280,19 +292,19 @@ import {mapState} from 'vuex'
this.getActiveName() this.getActiveName()
} }
}, },
mounted() { mounted () {
this.getmassage() this.getmassage()
this.getActiveName() this.getActiveName()
this.judgeadmin() this.judgeadmin()
if (window.history && window.history.pushState) { if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL); history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.goBack, false); window.addEventListener('popstate', this.goBack, false)
} }
}, },
destroyed(){ destroyed () {
window.removeEventListener('popstate', this.goBack, false); window.removeEventListener('popstate', this.goBack, false)
}
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
</template> </template>
<script> <script>
export default{ export default {
name: 'loading', name: 'loading',
props: { props: {
width: { width: {
......
const sapi = "http://recruitapi-ai3.liangkebang.net" const sapi = 'http://recruitapi-ai3.liangkebang.net'
export { export {
sapi sapi
} }
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'; import Vue from 'vue'
import iView from 'iview'; import { Notice } from iView from 'iview'
import 'iview/dist/styles/iview.css'; import 'iview/dist/styles/iview.css'
import App from './App'; import App from './App'
import router from './router'; import router from './router'
import initRouter from './service/init.service.js' import initRouter from './service/init.service.js'
import 'vue-happy-scroll/docs/happy-scroll.css' import 'vue-happy-scroll/docs/happy-scroll.css'
import {Notice} from 'iview'
import store from '../src/store' import store from '../src/store'
Vue.use(iView); Vue.use(iView)
Vue.use(Notice) Vue.use(Notice)
Vue.config.productionTip = false; Vue.config.productionTip = false
initRouter.init(router) initRouter.init(router)
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
...@@ -19,5 +19,5 @@ new Vue({ ...@@ -19,5 +19,5 @@ new Vue({
router, router,
store, store,
components: { App }, components: { App },
template: '<App/>', template: '<App/>'
}); })
This diff is collapsed.
...@@ -38,72 +38,71 @@ ...@@ -38,72 +38,71 @@
</template> </template>
<script> <script>
import { login} from '../../api/login.server.js' import { login } from '../../api/login.server.js'
import localstorage from '../../service/localstorage.service.js' import localstorage from '../../service/localstorage.service.js'
export default { export default {
data () { data () {
return { return {
channelarr:[], channelarr: [],
notecontent:'', notecontent: '',
noteconTime:false, noteconTime: false,
ISIDMIN:'', ISIDMIN: '',
formInline: { formInline: {
user: '', user: '',
password: '' password: ''
}, },
ruleInline: { ruleInline: {
user: [ user: [
{ required: true, pattern:/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱账号', trigger: 'blur' } { required: true, pattern: /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱账号', trigger: 'blur' }
], ],
password: [ password: [
{ required: true, message: '请输入正确的密码', trigger: 'blur' }, { required: true, message: '请输入正确的密码', trigger: 'blur' }
// { type: 'string', min: 4, message: '请输入正确的密码', trigger: 'blur' } // { type: 'string', min: 4, message: '请输入正确的密码', trigger: 'blur' }
] ]
} }
} }
}, },
methods: { methods: {
handleSubmit(name) { handleSubmit (name) {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
this.$Message.success('Success!'); this.$Message.success('Success!')
} else { } else {
this.$Message.error('Fail!'); this.$Message.error('Fail!')
} }
}) })
}, },
login(){ login () {
let params={ const params = {
userCode:this.formInline.user, userCode: this.formInline.user,
password:this.formInline.password password: this.formInline.password
} }
if(this.formInline.user==''||this.formInline.password==''){ if (this.formInline.user == '' || this.formInline.password == '') {
return return
} }
login(params).then(res=>{ login(params).then(res => {
if(res.data.body.code=='100'){ if (res.data.body.code == '100') {
this.$router.push({name:'update',params:{userCode:this.formInline.user}}) this.$router.push({ name: 'update', params: { userCode: this.formInline.user } })
return return
} }
if(res.data.success==true){ if (res.data.success == true) {
this.ISIDMIN=res.data.body this.ISIDMIN = res.data.body
localstorage.set('token', res.data.body.token) localstorage.set('token', res.data.body.token)
this.$router.push({name:"allResume"}) this.$router.push({ name: 'allResume' })
localstorage.set('isADMIN',JSON.stringify(this.ISIDMIN)) localstorage.set('isADMIN', JSON.stringify(this.ISIDMIN))
return return
} }
if(res.data.success==false){ if (res.data.success == false) {
this.noteconTime=true this.noteconTime = true
this.notecontent=res.data.body.message this.notecontent = res.data.body.message
setTimeout(() => { setTimeout(() => {
this.noteconTime=false this.noteconTime = false
}, 3000) }, 3000)
return
} }
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.login{ .login{
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</template> </template>
<script> <script>
import { updatePsd} from '../../api/login.server.js' import { updatePsd } from '../../api/login.server.js'
export default { export default {
data () { data () {
return { return {
...@@ -46,122 +46,116 @@ export default { ...@@ -46,122 +46,116 @@ export default {
passwordTwo: '', passwordTwo: '',
password: '' password: ''
}, },
fistcontent:true, fistcontent: true,
twocontent:false, twocontent: false,
twocontentmessage:'', twocontentmessage: '',
channelarr:[], channelarr: [],
Massage:'', Massage: '',
ISIDMIN:'', ISIDMIN: ''
} }
}, },
methods: { methods: {
handleSubmit(name) { handleSubmit (name) {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
this.$Message.success('Success!'); this.$Message.success('Success!')
} else { } else {
this.$Message.error('Fail!'); this.$Message.error('Fail!')
} }
}) })
}, },
loginT(){ loginT () {
let params={ const params = {
userCode:this.$route.params.userCode, userCode: this.$route.params.userCode,
password:this.formInline.password, password: this.formInline.password,
confirmPassWord:this.formInline.passwordTwo confirmPassWord: this.formInline.passwordTwo
} }
if(this.formInline.passwordTwo!==this.formInline.password){ if (this.formInline.passwordTwo !== this.formInline.password) {
this.twocontentmessage='输入密码不一致,请重新输入' this.twocontentmessage = '输入密码不一致,请重新输入'
this.twocontent=true this.twocontent = true
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.passwordTwo.length<4||this.formInline.password.length<4){ if (this.formInline.passwordTwo.length < 4 || this.formInline.password.length < 4) {
this.twocontentmessage='请输入4-20位密码' this.twocontentmessage = '请输入4-20位密码'
this.twocontent=true this.twocontent = true
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.password.length>20){ if (this.formInline.password.length > 20) {
this.twocontentmessage='请输入4-20位密码' this.twocontentmessage = '请输入4-20位密码'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.password.length<4){ if (this.formInline.password.length < 4) {
this.twocontentmessage='请输入4-20位密码' this.twocontentmessage = '请输入4-20位密码'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.password.length==0){ if (this.formInline.password.length == 0) {
this.twocontentmessage='密码不能为空' this.twocontentmessage = '密码不能为空'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.passwordTwo.length==0){ if (this.formInline.passwordTwo.length == 0) {
this.twocontentmessage='请输入相同的确认密码' this.twocontentmessage = '请输入相同的确认密码'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
updatePsd(params).then(res=>{ updatePsd(params).then(res => {
if(res.data.success==true){ if (res.data.success == true) {
this.ISIDMIN=res.data.body this.ISIDMIN = res.data.body
localStorage.setItem('isADMIN',JSON.stringify(this.ISIDMIN)) localStorage.setItem('isADMIN', JSON.stringify(this.ISIDMIN))
localStorage.setItem('token',res.data.body.token) localStorage.setItem('token', res.data.body.token)
this.$router.replace({name:'allResume'}) this.$router.replace({ name: 'allResume' })
} }
if(res.data.success==false){ if (res.data.success == false) {
this.Massage=res.data.body.message this.Massage = res.data.body.message
this.twocontent=true this.twocontent = true
this.twocontentmessage=this.Massage this.twocontentmessage = this.Massage
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
} }
}) })
}, },
verification(){ verification () {
if(this.formInline.password==123456){ if (this.formInline.password == 123456) {
this.twocontentmessage='输入密码与初始密码相同,请重新输入' this.twocontentmessage = '输入密码与初始密码相同,请重新输入'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
} }
if(this.formInline.password.length==0){ if (this.formInline.password.length == 0) {
this.fistcontent=true this.fistcontent = true
} }
if(this.formInline.password==''){ if (this.formInline.password == '') {
this.fistcontent=true this.fistcontent = true
} }
if(this.formInline.password.length<4){ if (this.formInline.password.length < 4) {
this.fistcontent=true this.fistcontent = true
} }
if(this.formInline.password.length>4){ if (this.formInline.password.length > 4) {
this.fistcontent=false this.fistcontent = false
} }
if(this.formInline.password.length>20){ if (this.formInline.password.length > 20) {
this.fistcontent=true this.fistcontent = true
} }
},
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.updatePsd{ .updatePsd{
......
This diff is collapsed.
This diff is collapsed.
...@@ -135,43 +135,43 @@ ...@@ -135,43 +135,43 @@
</div> </div>
</template> </template>
<script> <script>
import {seedetail} from '../../api/resume.server' import { seedetail } from '../../api/resume.server'
import localStorage from '../../service/localstorage.service.js' import localStorage from '../../service/localstorage.service.js'
import { import {
sapi sapi
}from '../../config' } from '../../config'
export default { export default {
data(){ data () {
return { return {
resume:{}, resume: {},
riList:[], riList: [],
roList:[], roList: [],
rpList:[], rpList: [],
reList:[], reList: [],
downresume:'', downresume: '',
detialID:'', detialID: '',
showBtn:'', showBtn: ''
} }
}, },
methods: { methods: {
getDETAIL(){ getDETAIL () {
this.detialID=this.$route.query.ID this.detialID = this.$route.query.ID
this.showBtn=this.$route.query.noShowBtn this.showBtn = this.$route.query.noShowBtn
let token = this.$route.query.token || '' const token = this.$route.query.token || ''
let parmars={ const parmars = {
uid:this.$route.query.id uid: this.$route.query.id
// uid:"0646215721cc43ccb51ff3e979959e35" // uid:"0646215721cc43ccb51ff3e979959e35"
} }
seedetail(parmars).then(res=>{ seedetail(parmars).then(res => {
this.resume=res.data.body.resume this.resume = res.data.body.resume
this.riList=res.data.body.riList this.riList = res.data.body.riList
this.roList=res.data.body.roList this.roList = res.data.body.roList
this.rpList=res.data.body.rpList this.rpList = res.data.body.rpList
this.reList=res.data.body.reList this.reList = res.data.body.reList
}) })
}
}, },
}, mounted () {
mounted(){
this.getDETAIL() this.getDETAIL()
} }
} }
...@@ -329,4 +329,3 @@ export default { ...@@ -329,4 +329,3 @@ export default {
/* border: 1px solid red */ /* border: 1px solid red */
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -16,32 +16,32 @@ ...@@ -16,32 +16,32 @@
</div> </div>
</template> </template>
<script> <script>
import {getErcode,downloadErcode} from '../../api/stystem.server.js' import { getErcode, downloadErcode } from '../../api/stystem.server.js'
import { import {
sapi sapi
} from '../../config' } from '../../config'
export default { export default {
data(){ data () {
return { return {
url:'', url: '',
url2:'' url2: ''
} }
}, },
methods:{ methods: {
//取到二维码 // 取到二维码
getercode(){ getercode () {
getErcode().then(res=>{ getErcode().then(res => {
if(res.data.success==true){ if (res.data.success == true) {
this.url=res.data.body this.url = res.data.body
} }
}) })
}, },
downPic (img) { downPic (img) {
window.location.href=`${sapi}/api/qrCode/downQrCode` window.location.href = `${sapi}/api/qrCode/downQrCode`
} }
}, },
mounted(){ mounted () {
this.getercode() this.getercode()
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import Vue from 'vue'; import Vue from 'vue'
import Router from 'vue-router'; import Router from 'vue-router'
const home = r => require.ensure([], () => r(require('@/components/home.vue')), 'home'); const home = r => require.ensure([], () => r(require('@/components/home.vue')), 'home')
// const changepsd = r => require.ensure([], () => r(require('@/components/changepsd.vue')), 'changepsd'); // const changepsd = r => require.ensure([], () => r(require('@/components/changepsd.vue')), 'changepsd');
const login = r => require.ensure([], () => r(require('@/page/login/login.vue')), 'login'); const login = r => require.ensure([], () => r(require('@/page/login/login.vue')), 'login')
const update = r => require.ensure([], () => r(require('@/page/login/update.vue')), 'update'); const update = r => require.ensure([], () => r(require('@/page/login/update.vue')), 'update')
const pdfdetail = r =>require.ensure([], () => r(require('@/page/resume/pdfdetail.vue')),'pdfdetail') const pdfdetail = r => require.ensure([], () => r(require('@/page/resume/pdfdetail.vue')), 'pdfdetail')
const resumeDetail = r =>require.ensure([], () => r(require('@/page/resume/resumeDetail.vue')),'resumeDetail') const resumeDetail = r => require.ensure([], () => r(require('@/page/resume/resumeDetail.vue')), 'resumeDetail')
const interview = r => require.ensure([], () => r(require('@/page/interview/interview.vue')), 'interview'); const interview = r => require.ensure([], () => r(require('@/page/interview/interview.vue')), 'interview')
const allResume = r => require.ensure([], () => r(require('@/page/resume/allResume.vue')), 'allResume'); const allResume = r => require.ensure([], () => r(require('@/page/resume/allResume.vue')), 'allResume')
const channel = r => require.ensure([], () => r(require('@/page/resume/channel.vue')), 'channel'); const channel = r => require.ensure([], () => r(require('@/page/resume/channel.vue')), 'channel')
const account = r => require.ensure([], () => r(require('@/page/system/account.vue')), 'account'); const account = r => require.ensure([], () => r(require('@/page/system/account.vue')), 'account')
const emailMange = r => require.ensure([], () => r(require('@/page/system/emailMange.vue')), 'emailMange'); const emailMange = r => require.ensure([], () => r(require('@/page/system/emailMange.vue')), 'emailMange')
const QRcode = r => require.ensure([], () => r(require('@/page/system/QRcode.vue')), 'QRcode'); const QRcode = r => require.ensure([], () => r(require('@/page/system/QRcode.vue')), 'QRcode')
const upload = r => require.ensure([], () => r(require('@/page/upload/upload.vue')), 'upload'); const upload = r => require.ensure([], () => r(require('@/page/upload/upload.vue')), 'upload')
const sweepCode = r => require.ensure([], () => r(require('@/page/sweepCode/sweepCode.vue')), 'sweepCode'); const sweepCode = r => require.ensure([], () => r(require('@/page/sweepCode/sweepCode.vue')), 'sweepCode')
const editor = r => require.ensure([], () => r(require('@/components/editor.vue')), 'editor'); const editor = r => require.ensure([], () => r(require('@/components/editor.vue')), 'editor')
const getimage = r => require.ensure([], () => r(require('@/components/getimage.vue')), 'getimage'); const getimage = r => require.ensure([], () => r(require('@/components/getimage.vue')), 'getimage')
//z注释 // z注释
Vue.use(Router); Vue.use(Router)
export default new Router({ export default new Router({
mode: 'history', mode: 'history',
routes: [ routes: [
{ {
path: '/', path: '/',
redirect: '/home', redirect: '/home'
}, { }, {
path: '/login', path: '/login',
name: 'login', name: 'login',
...@@ -36,19 +36,19 @@ export default new Router({ ...@@ -36,19 +36,19 @@ export default new Router({
} }
}, },
{ {
path:'/sweepCode', path: '/sweepCode',
name:'sweepCode', name: 'sweepCode',
component:sweepCode component: sweepCode
}, },
{ {
path:'/update', path: '/update',
name:'update', name: 'update',
component:update component: update
}, },
{ {
path:'/getimage', path: '/getimage',
name:'getimage', name: 'getimage',
component:getimage component: getimage
}, },
{ {
path: '/resumeDetail', path: '/resumeDetail',
...@@ -106,6 +106,6 @@ export default new Router({ ...@@ -106,6 +106,6 @@ export default new Router({
component: upload component: upload
} }
] ]
}, }
], ]
}); })
This diff is collapsed.
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
export default{ export default {
set: function (name, value) {Cookie.set(name, value)}, set: function (name, value) { Cookie.set(name, value) },
get: function (name) { get: function (name) {
return Cookie.get(name) return Cookie.get(name)
}, },
remove: function (name) {Cookie.remove(name)} remove: function (name) { Cookie.remove(name) }
} }
This diff is collapsed.
import localstorage from './localstorage.service.js' import localstorage from './localstorage.service.js'
export default{ export default {
init: function (router) { init: function (router) {
router.beforeEach((to, form, next) => { router.beforeEach((to, form, next) => {
let token = localstorage.get('token') const token = localstorage.get('token')
if (to.meta && !to.meta.allowBack && window.history && window.history.pushState) { //登录页面不能后退 if (to.meta && !to.meta.allowBack && window.history && window.history.pushState) { // 登录页面不能后退
history.pushState(null, null, document.URL) history.pushState(null, null, document.URL)
} }
if (to.name =='login' || to.name =='update' || to.name =='sweepCode'|| to.name== 'resumeDetail'|| to.name== 'pdfdetail'){ if (to.name == 'login' || to.name == 'update' || to.name == 'sweepCode' || to.name == 'resumeDetail' || to.name == 'pdfdetail') {
next() next()
return return
} }
if(!token){ if (!token) {
window.location.href = `${window.location.origin}/login` window.location.href = `${window.location.origin}/login`
return return
} }
......
export default{ export default {
set: function (name, value) {window.localStorage.setItem(name, value)}, set: function (name, value) { window.localStorage.setItem(name, value) },
get: function (name) { get: function (name) {
return window.localStorage.getItem(name) return window.localStorage.getItem(name)
}, },
remove: function (name) {window.localStorage.removeItem(name)} remove: function (name) { window.localStorage.removeItem(name) }
} }
module.exports = require('es6-promise'); module.exports = require('es6-promise')
\ No newline at end of file
This diff is collapsed.
// // action.js // // action.js
import * as types from './muationsType' import * as types from './muationsType'
let action = { const action = {
cookieTipsShow({commit}, value) { cookieTipsShow ({ commit }, value) {
commit(types.COOKIE_SHOW, value) commit(types.COOKIE_SHOW, value)
}, },
addInterviewee ({commit}, value) { addInterviewee ({ commit }, value) {
commit(types.ADD_INTERVIEWEE, value) commit(types.ADD_INTERVIEWEE, value)
}, },
removeInterviewee ({commit}, value) { removeInterviewee ({ commit }, value) {
commit(types.REMOVE_INTERVIEWEE, value) commit(types.REMOVE_INTERVIEWEE, value)
}, },
clearInterviewee ({commit}, value) { clearInterviewee ({ commit }, value) {
commit(types.CLEAR_INTERVIEWEE, value) commit(types.CLEAR_INTERVIEWEE, value)
} }
} }
......
...@@ -3,5 +3,3 @@ export const COOKIE_HIDE = 'COOKIE_HIDE' ...@@ -3,5 +3,3 @@ export const COOKIE_HIDE = 'COOKIE_HIDE'
export const ADD_INTERVIEWEE = 'ADD_INTERVIEWEE' export const ADD_INTERVIEWEE = 'ADD_INTERVIEWEE'
export const REMOVE_INTERVIEWEE = 'REMOVE_INTERVIEWEE' export const REMOVE_INTERVIEWEE = 'REMOVE_INTERVIEWEE'
export const CLEAR_INTERVIEWEE = 'CLEAR_INTERVIEWEE' export const CLEAR_INTERVIEWEE = 'CLEAR_INTERVIEWEE'
This diff is collapsed.
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