Commit 4ad49cf3 authored by FE-安焕焕's avatar FE-安焕焕 👣

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

Conflicts:
	src/page/resume/allResume.vue
	src/service/util.js
parents d870cce8 5beb8907
...@@ -121,3 +121,13 @@ export function sendEmail(parmars) { ...@@ -121,3 +121,13 @@ export function sendEmail(parmars) {
// 'Content-Type':'application/json' // 'Content-Type':'application/json'
}}) }})
} }
export function findCompanyEmailByKey(key) { //公司通讯录
return axios.get(`${sapi}/api/companyEmail/findCompanyEmailByKey?key=${key}`)
}
// 转发邮箱通知
export function forwardResume(params) {
return axios.post(`${sapi}/api/resume/forwardResume`,params, {headers: {
'Content-Type':'application/json'
}})
}
<template> <template>
<div> <div>
<textarea id="editor" rows="10" cols="80" v-model="editorValue"></textarea> <textarea id="editor" rows="10" cols="80"></textarea>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
...@@ -31,20 +31,23 @@ ...@@ -31,20 +31,23 @@
}, },
data() { data() {
return { return {
editorValue : this.value isInit: false
}; };
}, },
watch: {
value:{
deep: true,
immediate:true,
handler(value) {
this.isInit&&this.editor.setData(value.value)
}
}
},
mounted() { mounted() {
this.init() this.init()
}, },
beforeDestroy() { beforeDestroy() {
}, },
computed: {},
watch: {
value:function (value) {
this.editor.setData()
},
},
methods: { methods: {
init () { init () {
CKEDITOR.replace('editor', { CKEDITOR.replace('editor', {
...@@ -55,16 +58,13 @@ ...@@ -55,16 +58,13 @@
filebrowserImageUploadUrl: this.uploadUrl, filebrowserImageUploadUrl: this.uploadUrl,
filebrowserUploadMethod: 'form' filebrowserUploadMethod: 'form'
}); });
this.editor = CKEDITOR.instances.editor; this.editor = CKEDITOR.instances.editor;
this.editor.on( 'change', ( evt ) =>{ setTimeout(()=> {
// getData() returns CKEditor's HTML content. this.isInit = true
this.$emit('getValue', evt.editor.getData()) }, 1000)
});
}, },
}, getValue(){
watch:{ return this.editor.getData()
value: function(value) {
this.editor.setData(value)
} }
}, },
components: {} components: {}
......
...@@ -8,6 +8,7 @@ import router from './router'; ...@@ -8,6 +8,7 @@ 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 {Notice} from 'iview'
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;
...@@ -16,6 +17,7 @@ initRouter.init(router) ...@@ -16,6 +17,7 @@ initRouter.init(router)
new Vue({ new Vue({
el: '#app', el: '#app',
router, router,
store,
components: { App }, components: { App },
template: '<App/>', template: '<App/>',
}); });
This diff is collapsed.
This diff is collapsed.
...@@ -4,7 +4,6 @@ export function _debounce (fn, delay) { ...@@ -4,7 +4,6 @@ export function _debounce (fn, delay) {
return function () { return function () {
let args = arguments let args = arguments
if (timer) { if (timer) {
clearTimeout(timer) clearTimeout(timer)
...@@ -12,7 +11,6 @@ export function _debounce (fn, delay) { ...@@ -12,7 +11,6 @@ export function _debounce (fn, delay) {
timer = setTimeout(function () { timer = setTimeout(function () {
timer = null timer = null
// console.log(this)
fn.apply(this, args) fn.apply(this, args)
}.bind(this), delay) }.bind(this), delay)
} }
......
...@@ -4,8 +4,14 @@ let action = { ...@@ -4,8 +4,14 @@ let action = {
cookieTipsShow({commit}, value) { cookieTipsShow({commit}, value) {
commit(types.COOKIE_SHOW, value) commit(types.COOKIE_SHOW, value)
}, },
cookieTipsHide ({commit}, value) { addInterviewee ({commit}, value) {
commit(types.COOKIE_HIDE, value) commit(types.ADD_INTERVIEWEE, value)
},
removeInterviewee ({commit}, value) {
commit(types.REMOVE_INTERVIEWEE, value)
},
clearInterviewee ({commit}, value) {
commit(types.CLEAR_INTERVIEWEE, value)
} }
} }
export default action export default action
\ No newline at end of file
...@@ -6,7 +6,9 @@ import actions from './actions.js' ...@@ -6,7 +6,9 @@ import actions from './actions.js'
Vue.use(Vuex) Vue.use(Vuex)
const state = { const state = {
cookieTips: false cookieTips: false,
interviewee: [],
channelInterviewee: [],
} }
export default new Vuex.Store({ export default new Vuex.Store({
mutations, mutations,
......
export const COOKIE_SHOW = 'COOKIE_SHOW' export const COOKIE_SHOW = 'COOKIE_SHOW'
export const COOKIE_HIDE = 'COOKIE_HIDE' export const COOKIE_HIDE = 'COOKIE_HIDE'
export const ADD_INTERVIEWEE = 'ADD_INTERVIEWEE'
export const REMOVE_INTERVIEWEE = 'REMOVE_INTERVIEWEE'
export const CLEAR_INTERVIEWEE = 'CLEAR_INTERVIEWEE'
import {COOKIE_SHOW, COOKIE_HIDE} from './muationsType' import {COOKIE_SHOW, COOKIE_HIDE,ADD_INTERVIEWEE,REMOVE_INTERVIEWEE, CLEAR_INTERVIEWEE} from './muationsType'
export default { export default {
[COOKIE_SHOW] (state, value) { [COOKIE_SHOW] (state, value) {
state.cookieTips = value || true state.cookieTips = value || true
}, },
[COOKIE_HIDE](state, value) { [COOKIE_HIDE](state, value) {
state.cookieTips = value || false state.cookieTips = value || false
},
[ADD_INTERVIEWEE] (state, object) {
let flag = false
let data = object.data
if (object.type=='channel') {
console.log(data)
state.channelInterviewee.map(item => {
if (data&&item.id == data.id) {
flag = true
return
}
})
if (!flag) {
state.channelInterviewee.push(data)
}
} else {
state.interviewee.map(item => {
if (data&&item.id == data.id) {
flag = true
return
}
})
if (!flag) {
state.interviewee.push(data)
}
}
},
[REMOVE_INTERVIEWEE](state, object) {
let data = object.data
if (object.type=='channel') {
state.channelInterviewee.map((item, index) => {
if (data&&item.id == data.id) {
state.channelInterviewee.splice(index, 1)
}
})
} else {
state.interviewee.map((item, index) => {
if (data&&item.id == data.id) {
state.interviewee.splice(index, 1)
}
})
}
},
[CLEAR_INTERVIEWEE](state, object) {
let type = object.type
if (type == 'channel') {
state.channelInterviewee = []
console.log('===')
} else {
state.interviewee = []
}
} }
} }
\ No newline at end of file
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