提交 4518cf5f authored 作者: 赵世杰's avatar 赵世杰

1

上级 c1e5d578
No preview for this file type
......@@ -24,7 +24,6 @@
mounted() {
const that = this
uni.login({
scope: 'zhima.auth.workcert.verify',
success(e) {
that.$http.get('/public/ali/getopenId', {
code: e.code,
......@@ -60,7 +59,8 @@
},
login(){
uni.request({
url: 'https://jyzp.365jft.com/jfb-recruit/loginform',
url: 'http://192.168.0.6:8000/loginform',
// url: 'https://jyzp.365jft.com/jfb-recruit/loginform',
method: 'POST',
data: {
account: this.openId,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div class="well-dialog" :class="{'well-dialog--show':showDialog }">
<div class="well-dialog__mask" @click="closeDialog"></div>
<div class="well-dialog__container">
<div class="tree-select-contain">
<div class="header">
<div class="caption">
{{titleText}}
</div>
<div class="action" @click="confirm()">
确定
</div>
</div>
<scroll-view scroll-x style="width: 100%;height: 100%;"
:scroll-left="scrollLeft" :scroll-with-animation="true">
<div class="con" :class="{'width-per150': colItems3.length}">
<div class="col">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in data" :key="index"
@click="clickNavItem(index)"
:class="{'active': activedNavIndex == index,'selected':item.selected}">
{{item.label}}
</li>
</ul>
</scroll-view>
</div>
<div class="col">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in colItems2" :key="index"
@click="clickSubItem(index)"
:class="{'active': activedSubIndex === index,'selected':item.selected}">
{{item.label}}
</li>
</ul>
</scroll-view>
</div>
<div class="col" v-show="colItems3.length">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in colItems3" :key="index"
@click="clickThirdItem(item,index)"
:class="{'active': item.selected}">
<div class="label-font">{{item.label}}</div>
<icon type="success_no_circle" size="20" v-if="item.selected" color="#0083FF"/>
</li>
</ul>
</scroll-view>
</div>
</div>
</scroll-view>
</div>
</div>
</div>
</template>
<script>
/**
* “分类选择器”组件
* 参数:
* @param showDialog 是否显示组件,true为打开
* @param titleText 组件标题
* @param maxSelected 最多选中几项
* @param selectedValues 选中的值的value,如:[060ef5006a504697a7d642d7e7d199cc', '060ef5006a504697a7d642d7e7d199cc']
* @param data 所要展示的数据,例子:
* [{
* "label": "技术",
* "children": [
* {
* "label": "后端开发"
* "children": [
* {
* value: '060ef5006a504697a7d642d7e7d199cc',
* label: 'Java'
* },
* {
* value: '060ef5006a504697a7d642d7e7d199cc',
* label: 'Java'
* }]
* }]
* }]
*
* 事件:
* @clickNav 点击一级标签时触发的事件
* @clickSub 点击二级标签时触发的事件
* @clickThird 点击三级标签时触发的事件
* @doConfirm 点击确定时触发的事件
*
*
* 例子:
* <well-tree-select @doConfirm="doConfirmCategorys"
* :showDialog.sync="showDialog"
* :data="categorysList"
* :title-text="'选择职位'"
* :max-selected="2"
* :selected-ids="selectedValues"></well-tree-select>
* **/
export default {
props: {
showDialog: { type: Boolean, default: false },
titleText: { type: String, default: '请选择' },
data: { type: Array, default: [] },
maxSelected: { type: Number, default: 3 },
selectedValues: { type: Array, default: [] }
},
data () {
return {
scrollLeft: 0,
activedNavIndex: 0,//第一列选中第几个
activedSubIndex: null,//第二列选中第几个
colItems2: [],//第二列数据
colItems3: [],//第三列数据
selectedItems: []//选中的数据
};
},
watch: {
selectedValues: {
handler: function (newValue, oldValue) {
console.log('selectedValues change', newValue);
this.initChange();
},
immediate: true
},
data (newData, oldData) {
console.log('newData');
this.initChange();
}
},
methods: {
/**
* 点击遮罩层关闭弹窗
* **/
closeDialog () {
this.$emit('update:showDialog', false);
},
/**
* 点击第一列
* **/
clickNavItem (index) {
//console.log("clickNavItem");
this.activedNavIndex = index;
this.activedSubIndex = null;
//更新第二列及第三列数据
this.setColItems();
this.$emit('clickNav', index);
},
/**
* 点击第二列
* **/
clickSubItem (index) {
this.activedSubIndex = index;
console.log('clickSubItem', index);
//更新第二列及第三列数据
this.setColItems();
this.scrollLeft = this.scrollLeft + wx.getSystemInfoSync().windowWidth / 2;
this.$emit('clickSub', index);
},
/**
* 点击第三列
* **/
clickThirdItem (item, index) {
this.selectedItems.push({
navIndex: this.activedNavIndex,
subIndex: this.activedSubIndex,
thirdIndex: index,
value: item.value,
label: item.label
});
//最多选择maxSelected项
let delectCount = this.selectedItems.length - this.maxSelected;
if (delectCount > 0) {
this.selectedItems.splice(0, delectCount);
}
//selectedItems发生了变化,需要更新选中状态
this.updateSelectedStyle();
this.$emit('clickThird', item);
},
/**
* 点击确认
* **/
confirm () {
this.$emit('doConfirm', this.selectedItems);
this.closeDialog();
},
/**
* 初始化选中状态
* **/
initChange () {
//根据外部出入的ids,找出每个选中值的上级下标
let col1 = this.data || [];
let flag = false;
for (let i = 0; i < col1.length; i++) {
let col2 = col1[i].children || [];
for (let j = 0; j < col2.length; j++) {
let col3 = col2[j].children || [];
for (let k = 0; k < col3.length; k++) {
if (this.selectedValues.indexOf(col3[k].value) > -1) {
this.selectedItems.push({
navIndex: i,
subIndex: j,
thirdIndex: k,
value: col3[k].value,
label: col3[k].label
});
if (!flag) {
this.activedNavIndex = i;
this.activedSubIndex = j;
flag = true;
}
}
}
}
}
//根据选中值展示每列数据
this.setColItems();
//根据选中值,设置选中状态
this.updateSelectedStyle();
},
/**
* 更新选中样式
* **/
updateSelectedStyle () {
//先取消所有选中状态
let col1 = this.data || [];
for (let i = 0; i < col1.length; i++) {
col1[i].selected = false;
let col2 = col1[i].children || [];
for (let j = 0; j < col2.length; j++) {
col2[j].selected = false;
let col3 = col2[j].children || [];
for (let k = 0; k < col3.length; k++) {
col3[k].selected = false;
}
}
}
let _selects = this.selectedItems || [];
for (let i = 0; i < _selects.length; i++) {
let item = _selects[i];
let col1 = this.data[item.navIndex];
let col2 = col1.children[item.subIndex];
let col3 = col2.children[item.thirdIndex];
col1.selected = true;
col2.selected = true;
col3.selected = true;
}
},
/**
* activedNavIndex、activedSubIndex发生变化时,
* 设置第二列和第三列数据
* **/
setColItems: function () {
let vm = this;
let res2 = {};
if (vm.activedNavIndex || vm.activedNavIndex === 0) {
res2 = vm.data[vm.activedNavIndex] || {};
}
this.colItems2 = res2.children || [];
let res3 = {};
if (vm.activedSubIndex || vm.activedSubIndex === 0) {
res3 = vm.colItems2[vm.activedSubIndex] || {};
}
this.colItems3 = res3.children || [];
}
},
components: {},
onShow () {
},
created () {
}
};
</script>
<style lang="less" scoped>
@import './well-treeSelect.less';
</style>
.well-dialog {
.well-dialog__mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0.4);
display: none;
}
.well-dialog__container {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
/*height: 30%;*/
background: white;
transform: translateY(100%);
transition: all 0.4s ease;
z-index: 12;
}
&.well-dialog--show {
.well-dialog__mask {
display: block;
}
.well-dialog__container {
transform: translateY(0);
}
}
}
.tree-select-contain {
height: 100vh;
overflow: hidden;
.header {
height: 45px;
line-height: 45px;
font-size: 15px;
border-bottom: 1px solid #E9E9E9;
padding: 0 16px;
.caption {
color: #1D1B33;
float: left;
font-weight: 600;
}
.action {
color: #0083FF;
float: right;
}
}
.con {
height: calc(100% - 46px);
width: 100%;
&.width-per150 {
width: 100%;
.col {
width: 33.3333333%;
&:last-child {
border-right: none;
width: 33.3333333%;
}
}
}
.col {
height: 100%;
float: left;
width: 50%;
border-right: 1px solid #E9E9E9;
box-sizing: border-box;
/*padding: 0 0 0 16px;*/
ul {
width: 100%;
height: calc(100% - 40px);
li {
width: 100%;
box-sizing: border-box;
padding: 0 10px 0 16px;
/*width: 100%;*/
color: #1D1B33;
font-size: 16px;
height: 45px;
line-height: 45px;
position: relative;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
.label-font {
width: calc(100% - 16px);
box-sizing: border-box;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
}
icon {
position: absolute;
right: 6px;
top: 10px;
}
//margin: 10px 0;
&:first-child {
///margin-top: 20px;
}
&:last-child {
//margin-bottom: 20px;
}
&.selected {
color: #0083FF;
opacity: .5;
}
&.active {
color: #0083FF;
opacity: 1 !important;
}
}
}
&:last-child {
border-right: none;
width: calc(50% - 16px);
}
}
}
}
<template>
<div class="well-dialog" :class="{'well-dialog--show':showDialog }">
<div class="well-dialog__mask" @click="closeDialog"></div>
<div class="well-dialog__container">
<div class="tree-select-contain">
<!-- <div class="header">
<div class="caption">
{{titleText}}
</div>
<div class="action" @click="confirm()">
确定
</div>
</div> -->
<scroll-view scroll-x style="width: 100%;height: 100%;"
:scroll-left="scrollLeft" :scroll-with-animation="true">
<div class="con" :class="{'width-per150': colItems3.length}">
<div class="col">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in data" :key="index"
@click="clickNavItem(index)"
:class="{'active': activedNavIndex == index,'selected':item.selected}">
{{item.label}}
</li>
</ul>
</scroll-view>
</div>
<div class="col">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in colItems2" :key="index"
@click="clickSubItem(index)"
:class="{'active': activedSubIndex === index,'selected':item.selected}">
{{item.label}}
</li>
</ul>
</scroll-view>
</div>
<div class="col" v-show="colItems3.length">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in colItems3" :key="index"
@click="clickThirdItem(item,index)"
:class="{'active': item.selected}">
<div class="label-font">{{item.label}}</div>
<icon type="success_no_circle" size="20" v-if="item.selected" color="#0083FF"/>
</li>
</ul>
</scroll-view>
</div>
</div>
</scroll-view>
</div>
</div>
</div>
</template>
<script>
/**
* “分类选择器”组件
* 参数:
* @param showDialog 是否显示组件,true为打开
* @param titleText 组件标题
* @param maxSelected 最多选中几项
* @param selectedValues 选中的值的value,如:[060ef5006a504697a7d642d7e7d199cc', '060ef5006a504697a7d642d7e7d199cc']
* @param data 所要展示的数据,例子:
* [{
* "label": "技术",
* "children": [
* {
* "label": "后端开发"
* "children": [
* {
* value: '060ef5006a504697a7d642d7e7d199cc',
* label: 'Java'
* },
* {
* value: '060ef5006a504697a7d642d7e7d199cc',
* label: 'Java'
* }]
* }]
* }]
*
* 事件:
* @clickNav 点击一级标签时触发的事件
* @clickSub 点击二级标签时触发的事件
* @clickThird 点击三级标签时触发的事件
* @doConfirm 点击确定时触发的事件
*
*
* 例子:
* <well-tree-select @doConfirm="doConfirmCategorys"
* :showDialog.sync="showDialog"
* :data="categorysList"
* :title-text="'选择职位'"
* :max-selected="2"
* :selected-ids="selectedValues"></well-tree-select>
* **/
export default {
props: {
showDialog: { type: Boolean, default: false },
titleText: { type: String, default: '请选择' },
data: { type: Array, default: [] },
maxSelected: { type: Number, default: 3 },
selectedValues: { type: Array, default: [] }
},
data () {
return {
scrollLeft: 0,
activedNavIndex: 0,//第一列选中第几个
activedSubIndex: null,//第二列选中第几个
colItems2: [],//第二列数据
colItems3: [],//第三列数据
selectedItems: []//选中的数据
};
},
watch: {
selectedValues: {
handler: function (newValue, oldValue) {
console.log('selectedValues change', newValue);
this.initChange();
},
immediate: true
},
data (newData, oldData) {
console.log('newData');
this.initChange();
}
},
methods: {
/**
* 点击遮罩层关闭弹窗
* **/
closeDialog () {
this.$emit('update:showDialog', false);
},
/**
* 点击第一列
* **/
clickNavItem (index) {
//console.log("clickNavItem");
this.activedNavIndex = index;
this.activedSubIndex = null;
//更新第二列及第三列数据
this.setColItems();
this.$emit('clickNav', this.data[index]);
},
/**
* 点击第二列
* **/
clickSubItem (index) {
this.activedSubIndex = index;
console.log('clickSubItem', index);
//更新第二列及第三列数据
this.setColItems();
this.scrollLeft = this.scrollLeft + wx.getSystemInfoSync().windowWidth / 2;
this.$emit('clickSub', this.colItems2[index]);
},
/**
* 点击第三列
* **/
clickThirdItem (item, index) {
this.selectedItems.push({
navIndex: this.activedNavIndex,
subIndex: this.activedSubIndex,
thirdIndex: index,
value: item.value,
label: item.label
});
//最多选择maxSelected项
let delectCount = this.selectedItems.length - this.maxSelected;
if (delectCount > 0) {
this.selectedItems.splice(0, delectCount);
}
//selectedItems发生了变化,需要更新选中状态
this.updateSelectedStyle();
this.$emit('clickThird', item);
},
/**
* 点击确认
* **/
confirm () {
this.$emit('doConfirm', this.selectedItems);
this.closeDialog();
},
/**
* 初始化选中状态
* **/
initChange () {
//根据外部出入的ids,找出每个选中值的上级下标
let col1 = this.data || [];
let flag = false;
for (let i = 0; i < col1.length; i++) {
let col2 = col1[i].children || [];
for (let j = 0; j < col2.length; j++) {
let col3 = col2[j].children || [];
for (let k = 0; k < col3.length; k++) {
if (this.selectedValues.indexOf(col3[k].value) > -1) {
this.selectedItems.push({
navIndex: i,
subIndex: j,
thirdIndex: k,
value: col3[k].value,
label: col3[k].label
});
if (!flag) {
this.activedNavIndex = i;
this.activedSubIndex = j;
flag = true;
}
}
}
}
}
//根据选中值展示每列数据
this.setColItems();
//根据选中值,设置选中状态
this.updateSelectedStyle();
},
/**
* 更新选中样式
* **/
updateSelectedStyle () {
//先取消所有选中状态
let col1 = this.data || [];
for (let i = 0; i < col1.length; i++) {
col1[i].selected = false;
let col2 = col1[i].children || [];
for (let j = 0; j < col2.length; j++) {
col2[j].selected = false;
let col3 = col2[j].children || [];
for (let k = 0; k < col3.length; k++) {
col3[k].selected = false;
}
}
}
let _selects = this.selectedItems || [];
for (let i = 0; i < _selects.length; i++) {
let item = _selects[i];
let col1 = this.data[item.navIndex];
let col2 = col1.children[item.subIndex];
let col3 = col2.children[item.thirdIndex];
col1.selected = true;
col2.selected = true;
col3.selected = true;
}
},
/**
* activedNavIndex、activedSubIndex发生变化时,
* 设置第二列和第三列数据
* **/
setColItems: function () {
let vm = this;
let res2 = {};
if (vm.activedNavIndex || vm.activedNavIndex === 0) {
res2 = vm.data[vm.activedNavIndex] || {};
}
this.colItems2 = res2.children || [];
let res3 = {};
if (vm.activedSubIndex || vm.activedSubIndex === 0) {
res3 = vm.colItems2[vm.activedSubIndex] || {};
}
this.colItems3 = res3.children || [];
}
},
components: {},
onShow () {
},
created () {
}
};
</script>
<style lang="less" scoped>
@import './well-treeSelect.less';
</style>
<template>
<div class="well-dialog" :class="{'well-dialog--show':showDialog }">
<div class="well-dialog__mask" @click="closeDialog"></div>
<div class="well-dialog__container">
<div class="tree-select-contain">
<!-- <div class="header">
<div class="caption">
{{titleText}}
</div>
<div class="action" @click="confirm()">
确定
</div>
</div> -->
<scroll-view scroll-x style="width: 100%;height: 100%;"
:scroll-left="scrollLeft" :scroll-with-animation="true">
<div class="con" :class="{'width-per150': colItems3.length}">
<div class="col">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in data" :key="index"
@click="clickNavItem(index)"
:class="{'active': activedNavIndex == index,'selected':item.selected}">
{{item.name}}
</li>
</ul>
</scroll-view>
</div>
<div class="col">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in colItems2" :key="index"
@click="clickSubItem(index)"
:class="{'active': activedSubIndex === index,'selected':item.selected}">
{{item.name}}
</li>
</ul>
</scroll-view>
</div>
<div class="col" v-show="colItems3.length">
<scroll-view scroll-y style="height: 100%;">
<ul>
<li v-for="(item, index) in colItems3" :key="index"
@click="clickThirdItem(item,index)"
:class="{'active': item.selected}">
<div class="label-font">{{item.name}}</div>
<icon type="success_no_circle" size="20" v-if="item.selected" color="#0083FF"/>
</li>
</ul>
</scroll-view>
</div>
</div>
</scroll-view>
</div>
</div>
</div>
</template>
<script>
/**
* “分类选择器”组件
* 参数:
* @param showDialog 是否显示组件,true为打开
* @param titleText 组件标题
* @param maxSelected 最多选中几项
* @param selectedValues 选中的值的value,如:[060ef5006a504697a7d642d7e7d199cc', '060ef5006a504697a7d642d7e7d199cc']
* @param data 所要展示的数据,例子:
* 事件:
* @clickNav 点击一级标签时触发的事件
* @clickSub 点击二级标签时触发的事件
* @clickThird 点击三级标签时触发的事件
* @doConfirm 点击确定时触发的事件
*
*
* 例子:
* <well-tree-select @doConfirm="doConfirmCategorys"
* :showDialog.sync="showDialog"
* :data="categorysList"
* :title-text="'选择职位'"
* :max-selected="2"
* :selected-ids="selectedValues"></well-tree-select>
* **/
export default {
props: {
showDialog: { type: Boolean, default: false },
titleText: { type: String, default: '请选择' },
data: { type: Array, default: [] },
maxSelected: { type: Number, default: 3 },
selectedValues: { type: Array, default: [] }
},
data () {
return {
scrollLeft: 0,
activedNavIndex: 0,//第一列选中第几个
activedSubIndex: null,//第二列选中第几个
colItems2: [],//第二列数据
colItems3: [],//第三列数据
selectedItems: []//选中的数据
};
},
watch: {
selectedValues: {
handler: function (newValue, oldValue) {
console.log('selectedValues change', newValue);
this.initChange();
},
immediate: true
},
data (newData, oldData) {
console.log('newData');
this.initChange();
}
},
methods: {
/**
* 点击遮罩层关闭弹窗
* **/
closeDialog () {
this.$emit('update:showDialog', false);
},
/**
* 点击第一列
* **/
clickNavItem (index) {
//console.log("clickNavItem");
this.activedNavIndex = index;
this.activedSubIndex = null;
//更新第二列及第三列数据
this.setColItems();
this.$emit('clickNav', this.data[index]);
},
/**
* 点击第二列
* **/
clickSubItem (index) {
this.activedSubIndex = index;
console.log('clickSubItem', index);
//更新第二列及第三列数据
this.setColItems();
this.scrollLeft = this.scrollLeft + wx.getSystemInfoSync().windowWidth / 2;
this.$emit('clickSub', this.colItems2[index]);
},
/**
* 点击第三列
* **/
clickThirdItem (item, index) {
this.selectedItems.push({
navIndex: this.activedNavIndex,
subIndex: this.activedSubIndex,
thirdIndex: index,
id: item.id,
name: item.name,
code: item.code
});
//最多选择maxSelected项
let delectCount = this.selectedItems.length - this.maxSelected;
if (delectCount > 0) {
this.selectedItems.splice(0, delectCount);
}
//selectedItems发生了变化,需要更新选中状态
this.updateSelectedStyle();
this.$emit('clickThird', item);
},
/**
* 点击确认
* **/
confirm () {
this.$emit('doConfirm', this.selectedItems);
this.closeDialog();
},
/**
* 初始化选中状态
* **/
initChange () {
//根据外部出入的ids,找出每个选中值的上级下标
let col1 = this.data || [];
let flag = false;
for (let i = 0; i < col1.length; i++) {
let col2 = col1[i].chilList || [];
for (let j = 0; j < col2.length; j++) {
let col3 = col2[j].chilList || [];
for (let k = 0; k < col3.length; k++) {
if (this.selectedValues.indexOf(col3[k].id) > -1) {
this.selectedItems.push({
navIndex: i,
subIndex: j,
thirdIndex: k,
id: col3[k].id,
name: col3[k].name,
code: col3[k].code
});
if (!flag) {
this.activedNavIndex = i;
this.activedSubIndex = j;
flag = true;
}
}
}
}
}
//根据选中值展示每列数据
this.setColItems();
//根据选中值,设置选中状态
this.updateSelectedStyle();
},
/**
* 更新选中样式
* **/
updateSelectedStyle () {
//先取消所有选中状态
let col1 = this.data || [];
for (let i = 0; i < col1.length; i++) {
col1[i].selected = false;
let col2 = col1[i].chilList || [];
for (let j = 0; j < col2.length; j++) {
col2[j].selected = false;
let col3 = col2[j].chilList || [];
for (let k = 0; k < col3.length; k++) {
col3[k].selected = false;
}
}
}
let _selects = this.selectedItems || [];
for (let i = 0; i < _selects.length; i++) {
let item = _selects[i];
let col1 = this.data[item.navIndex];
let col2 = col1.chilList[item.subIndex];
let col3 = col2.chilList[item.thirdIndex];
col1.selected = true;
col2.selected = true;
col3.selected = true;
}
},
/**
* activedNavIndex、activedSubIndex发生变化时,
* 设置第二列和第三列数据
* **/
setColItems: function () {
let vm = this;
let res2 = {};
if (vm.activedNavIndex || vm.activedNavIndex === 0) {
res2 = vm.data[vm.activedNavIndex] || {};
}
this.colItems2 = res2.chilList || [];
let res3 = {};
if (vm.activedSubIndex || vm.activedSubIndex === 0) {
res3 = vm.colItems2[vm.activedSubIndex] || {};
}
this.colItems3 = res3.chilList || [];
}
},
components: {},
onShow () {
},
created () {
}
};
</script>
<style lang="less" scoped>
@import './well-treeSelect.less';
</style>
更新参数说明日志
效果:
[点击链接](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-aliyun-qipsksoswcfp9547ba/206f1be0-5325-11eb-a16f-5b3e54966275.mp4)
<video src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-aliyun-qipsksoswcfp9547ba/206f1be0-5325-11eb-a16f-5b3e54966275.mp4" width="800px" height="600px" controls="controls"></video>
# 使用
引入:
```
<well-tree-select @doConfirm="doConfirmCategorys"
:showDialog.sync="showDialog"
:data="categorysList"
:title-text="'选择职位'"
:max-selected="2"
:selected-ids="selectedIds">
</well-tree-select>
```
参数说明
<table>
<tr>
<th>参数</th>
<th>说明</th>
<th>例子</th>
</tr>
<tr>
<td>showDialog</td>
<td>显示组件,Boolean,默认false</td>
<td>true</td>
</tr>
<tr>
<td>titleText</td>
<td>组件标题</td>
<td>'请选择'</td>
</tr>
<tr>
<td>maxSelected</td>
<td>最多选中几项,Number,默认3 </td>
<td>1</td>
</tr>
<tr>
<td>selectedValues</td>
<td>选中的值的value,Array,[] </td>
<td>[060ef5006a504697a7d642d7e7d199cc', '060ef5006a504697a7d642d7e7d199cc']</td>
</tr>
<tr>
<td>data</td>
<td>数据列表,Array,默认[] </td>
<td>
<pre>
<code>
[{
"label": "技术",
"children": [
{
"label": "后端开发"
"children": [
{
value: '060ef5006a504697a7d642d7e7d199cc',
label: 'Java'
},
{
value: '060ef5006a504697a7d642d7e7d199cc',
label: 'Java'
}]
}]
}]
</code>
</pre>
</td>
</tr>
<tr>
<td>@clickNav</td>
<td>点击一级标签时触发的事件</td>
<td>-</td>
</tr>
<tr>
<td>@clickSub</td>
<td>点击二级标签时触发的事件</td>
<td>-</td>
</tr>
<tr>
<td>@clickThird</td>
<td>点击三级标签时触发的事件</td>
<td>-</td>
</tr>
<tr>
<td>@doConfirm</td>
<td>点击确定时触发的事件</td>
<td>-</td>
</tr>
</table>
// 基础配置
const baseConfig = {
baseUrl: 'https://jyzp.365jft.com/jfb-recruit',
baseUrl: 'http://192.168.0.6:8000',
// baseUrl: 'https://jyzp.365jft.com/jfb-recruit',
timeout: 10000, // 10秒超时
header: {
'Content-Type': 'application/json'
......
......@@ -59,11 +59,11 @@
"mp-alipay" : {
"usingComponents" : true,
"appid" : "2021005184646262",
"permission": {
"zhima.auth.workcert.verify": {
"desc": "用于验证你的芝麻工作证信息"
}
}
"permission" : {
"zhima.auth.workcert.verify" : {
"desc" : "用于验证你的芝麻工作证信息"
}
}
},
"mp-baidu" : {
"usingComponents" : true
......
......@@ -3,6 +3,13 @@
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/user/resume/index",
"style" :
{
"navigationBarTitleText" : "简历"
}
},
{
"path": "pages/home/index",
"style": {
......@@ -28,13 +35,6 @@
"navigationBarTitleText": "我的"
}
},
{
"path" : "pages/user/resume/index",
"style" :
{
"navigationBarTitleText" : "简历"
}
},
{
"path" : "pages/user/resume/personalInfo",
"style" :
......@@ -62,6 +62,34 @@
{
"navigationBarTitleText" : "收藏记录"
}
},
{
"path" : "pages/home/companyDetails",
"style" :
{
"navigationBarTitleText" : "企业详情"
}
},
{
"path" : "pages/user/resume/work",
"style" :
{
"navigationBarTitleText" : "工作/实习经历"
}
},
{
"path" : "pages/user/resume/education",
"style" :
{
"navigationBarTitleText" : "教育经历"
}
},
{
"path" : "pages/user/resume/selfEvaluation",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {
......
<template>
<view class="companyDetails">
<view class="companyInfo">
<view class="f_s">
<u--image
:src="orgInfo.logo"
width="60rpx"
height="60rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{orgInfo.name}}</text>
</view>
</view>
<view class="jobDesc">
<view class="moduleTitle">公司详情</view>
<view style="white-space: pre-line;line-height: 2;">{{orgInfo.descr}}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
orgInfo: {}
}
},
onLoad() {
this.orgInfo = uni.getStorageSync('ogrDetails')
},
methods: {
}
}
</script>
<style lang="scss">
.companyDetails{
.moduleTitle{
font-size: 36rpx;
color: #333;
font-weight: normal;
}
.companyInfo{
background: #fff;
padding: 30rpx;
margin: 30rpx 0;
}
.jobDesc{
background: #fff;
padding: 10rpx 30rpx 200rpx;
margin: 30rpx 0;
color: #666;
font-size: 28rpx;
line-height: 2;
font-weight: 300;
}
}
</style>
......@@ -40,11 +40,11 @@
height="60rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{ item.orgName }}</text>
<text style="padding: 0 10px;font-weight: 300;font-size: 28rpx;">{{ item.orgName }}</text>
</view>
<view class="f_b occupational">
<view>{{item.industryName}}</view>
<view>{{item.address}}</view>
<view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
</view>
</view>
<u-loadmore
......@@ -177,7 +177,7 @@
.list-title{
font-weight: bold;
font-size: 36rpx;
margin-bottom: 14rpx;
margin-bottom: 20rpx;
.t{
background-color: #EFF7FE;
color: #33A1CA;
......@@ -189,13 +189,14 @@
}
}
.company{
margin: 14rpx 0;
color: #999;
margin: 20rpx 0;
color: #666;
font-size: 30rpx;
}
.occupational{
color: #999;
color: #666;
font-size: 26rpx;
font-weight: 300;
}
}
.list-item + .list-item{
......
......@@ -22,20 +22,35 @@
</view>
</view>
<view class="jobDesc">
<u-divider textPosition="left" text="职位描述" textSize="16"/>
<view style="white-space: pre-line;line-height: 2;">{{detail.details}}</view>
<view class="moduleTitle">职位描述</view>
<view style="white-space: pre-line;line-height: 2;font-weight: 300;">{{detail.details}}</view>
</view>
<view class="companyInfo">
<u-divider textPosition="left" text="公司信息" textSize="16"/>
<view class="f_s">
<u--image
:src="detail.org.logo"
width="60rpx"
height="60rpx"
radius="4"
<view class="companyInfo" @click="toCompanyDetails(detail.org)">
<view class="moduleTitle">公司信息</view>
<view class="f_b" style="margin-top: 30rpx;">
<view class="f_s">
<u--image
:src="detail.org.logo"
width="60rpx"
height="60rpx"
radius="4"
/>
<text style="padding: 0 10px;color: #666;">{{detail.orgName}}</text>
</view>
<u-icon
size="20"
name="arrow-right"
/>
<text style="padding: 0 10px;">{{detail.orgName}}</text>
</view>
<!-- <view class="f_s" style="font-weight: 300;color: #666;margin-top: 20rpx;">
<u-icon
size="30"
color="#999"
name="map-fill"
/>
{{detail.org.province}} {{detail.org.city}} {{detail.org.region}} {{detail.address}}
</view> -->
</view>
<view class="footer f_b">
<u-icon
......@@ -84,6 +99,12 @@
this.getLoginInfo()
},
methods: {
toCompanyDetails(org) {
uni.setStorageSync('ogrDetails',org)
uni.navigateTo({
url: '/pages/home/companyDetails'
})
},
getLoginInfo() {
if (uni.getStorageSync('jy-recruit-token')) {
this.$http.get('/person/person/details', {}).then(res => {
......@@ -166,6 +187,10 @@
padding-bottom: 300rpx;
overflow: auto;
box-sizing: border-box;
.moduleTitle{
font-size: 36rpx;
color: #333;
}
.jobInfo{
margin: 30rpx 0;
background: #fff;
......@@ -179,6 +204,7 @@
}
.companyName{
padding: 20rpx 0;
font-weight: 300;
}
.requirement{
.u-icon{
......@@ -187,22 +213,23 @@
.f_s + .f_s{
margin-left: 20rpx;
}
font-weight: 300;
}
}
.jobDesc{
background: #fff;
padding: 10rpx 0 60rpx;
margin: 30rpx 0;
color: #777;
color: #666;
font-size: 28rpx;
line-height: 1.4;
line-height: 2;
>view{
padding:10rpx 30rpx;
}
}
.companyInfo{
background: #fff;
padding: 10rpx 30rpx 30rpx;
padding: 30rpx;
}
.footer{
padding: 20rpx 30px calc(env(safe-area-inset-bottom) + 20rpx);
......
......@@ -20,11 +20,11 @@
height="80rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{ item.orgName }}</text>
<text style="padding: 0 10px;font-weight: 300;font-size: 28rpx;">{{ item.orgName }}</text>
</view>
<view class="f_b occupational">
<view>{{item.industryName}}</view>
<view>{{item.address}}</view>
<view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
</view>
</view>
<u-loadmore
......@@ -88,7 +88,7 @@
.list-title{
font-weight: bold;
font-size: 36rpx;
margin-bottom: 14rpx;
margin-bottom: 20rpx;
.t{
background-color: #EFF7FE;
color: #33A1CA;
......@@ -100,13 +100,14 @@
}
}
.company{
margin: 14rpx 0;
color: #999;
margin: 20rpx 0;
color: #666;
font-size: 30rpx;
}
.occupational{
color: #999;
color: #666;
font-size: 26rpx;
font-weight: 300;
}
}
.list-item + .list-item{
......
......@@ -20,11 +20,11 @@
height="80rpx"
radius="4"
/>
<text style="padding: 0 10px;">{{ item.orgName }}</text>
<text style="padding: 0 10px;font-weight: 300;font-size: 28rpx;">{{ item.orgName }}</text>
</view>
<view class="f_b occupational">
<view>{{item.industryName}}</view>
<view>{{item.address}}</view>
<view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
</view>
</view>
<u-loadmore
......@@ -88,7 +88,7 @@
.list-title{
font-weight: bold;
font-size: 36rpx;
margin-bottom: 14rpx;
margin-bottom: 20rpx;
.t{
background-color: #EFF7FE;
color: #33A1CA;
......@@ -100,13 +100,14 @@
}
}
.company{
margin: 14rpx 0;
color: #999;
margin: 20rpx 0;
color: #666;
font-size: 30rpx;
}
.occupational{
color: #999;
color: #666;
font-size: 26rpx;
font-weight: 300;
}
}
.list-item + .list-item{
......
......@@ -12,32 +12,16 @@
size="large"
:title="userInfo.industryName || '选择期望职位'"
isLink
@click="industryShow = true"
@click="showDialog2 = true"
/>
<u-picker
keyName="name"
:show="industryShow"
:columns="industryList"
@confirm="changeIndustry"
@cancel="industryShow = false"
></u-picker>
</u-form-item>
<u-form-item label="工作城市" prop="city">
<u-cell
size="large"
:title="userInfo.city || '选择工作城市'"
:title="userInfo.region && `${userInfo.province }-${userInfo.city}-${userInfo.region}` || '选择工作城市'"
isLink
@click="showArea = true"
@click="showDialog = true"
/>
<u-picker
keyName="name"
:show="showArea"
@cancel="showArea=false"
ref="uPicker"
:columns="areaColumns"
@confirm="confirmArea"
@change="changeHandler"
/>
</u-form-item>
<u-form-item label="薪资要求" prop="salaryMin">
<u-cell
......@@ -67,19 +51,12 @@
<view class="">工作性质(可多选)</view>
<view class="btn" @click="workTypeShow=false">确认</view>
</view>
<view class="f_s">
<view
:class="workTypeList.includes('全职') ? 'it itActive' : 'it'"
@click="toggleWork('全职')"
>全职</view>
<view class="f_s" style="flex-wrap: wrap;">
<view
:class="workTypeList.includes('兼职') ? 'it itActive' : 'it'"
@click="toggleWork('兼职')"
>兼职</view>
<view
:class="workTypeList.includes('实习') ? 'it itActive' : 'it'"
@click="toggleWork('实习')"
>实习</view>
:class="workTypeList.includes(item) ? 'it itActive' : 'it'"
v-for="item in workAll"
@click="toggleWork(item)"
>{{item}}</view>
</view>
</view>
</u-popup>
......@@ -87,38 +64,68 @@
</u-form>
<view class="br"></view>
<view class="footer">
<u-button @click="submit" type="primary">提交</u-button>
<u-button @click="submit" type="primary">保存</u-button>
</view>
<well-tree-select
@clickThird="clickThird"
@clickSub="clickSub"
@clickNav="clickNav"
:showDialog.sync="showDialog"
:data="areaList"
:max-selected="1"
:selected-values="selectedValues"
/>
<well-tree-select2
@clickThird="clickThird2"
@clickSub="clickSub2"
@clickNav="clickNav2"
:showDialog.sync="showDialog2"
:data="industryList"
:max-selected="1"
:selected-values="selectedValues"
/>
</view>
</template>
<script>
import sheng from '../../../util/province.json'
import shi from '../../../util/city.json'
import qu from '../../../util/area.json'
import wellTreeSelect from '../../../components/well-treeSelect/well-treeSelect.vue';
import wellTreeSelect2 from '../../../components/well-treeSelect/well-treeSelect2.vue';
import { areaList } from '../../../util/area.js'
export default {
components: {
wellTreeSelect,
wellTreeSelect2
},
data() {
return {
userInfo:{},
industryShow: false,
areaColumns: [sheng, shi['1'], qu['72']],
showArea: false,
industryList: [],
workTypeShow: false,
workTypeList: [],
workAll: [],
salaryShow: false,
salaryList: [
['1000', '2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000', '10000', '11000', '12000', '13000', '14000', '15000', '16000', '17000', '18000', '19000', '20000', '21000', '22000', '23000', '24000', '25000', '26000', '27000', '28000', '29000', '30000'],
['1000', '2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000', '10000', '11000', '12000', '13000', '14000', '15000', '16000', '17000', '18000', '19000', '20000', '21000', '22000', '23000', '24000', '25000', '26000', '27000', '28000', '29000', '30000'],
]
['2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000', '10000', '11000', '12000', '13000', '14000', '15000', '16000', '17000', '18000', '19000', '20000', '21000', '22000', '23000', '24000', '25000', '26000', '27000', '28000', '29000', '30000'],
],
selectedValues: ['3-1-2'],
areaList: areaList,
showDialog: false,
showDialog2: false,
v1: '',
v2: '',
v3: '',
}
},
onLoad(o) {
console.log(sheng)
this.userInfo.personId = o.id
this.$http.get('/public/industry/l/all', {}).then(res => {
this.industryList = [res.data]
this.industryList = res.data
})
this.$http.get('/recruit/type/all', {}).then(res => {
this.workAll = res.data.list.map(item => item.name)
})
// 编辑
if (o.objectiveId) {
......@@ -127,38 +134,48 @@
this.userInfo = {
...this.userInfo,
city:res.data.city,
province: res.data.province,
region: res.data.region,
salaryMin:res.data.salaryMin,
salaryMax:res.data.salaryMax,
workType:res.data.workType,
industryName: res.data.industryName,
industryId: res.data.industryId,
// industryId: res.data.industryId,
}
this.workTypeList = res.data.workType.split('/')
})
}
},
methods: {
changeHandler(e) { //监听联动的操作
const {
columnIndex,
value,
values, // values为当前变化列的数组内容
indexs,
picker = this.$refs.uPicker
} = e
if (columnIndex === 0) {
picker.setColumnValues(1, shi[value[0].id])
picker.setColumnValues(2, qu[shi[value[0].id][0].id])
}
if (columnIndex === 1) {
console.log(qu[shi[value[0].id][0].id])
picker.setColumnValues(2,qu[shi[value[0].id][indexs[1]].id])
}
},
confirmArea(e) {
this.userInfo.city = `${e.value[0].name}-${e.value[1].name}-${e.value[2].name}`
this.showArea = false
clickNav(item) {
this.v1 = item.label
},
clickSub(item) {
this.v2 = item.label
},
clickThird(item) {
this.v3 = item.label
// this.userInfo.city = `${this.v1}-${this.v2}-${this.v3}`
this.userInfo.province = this.v1
this.userInfo.city = this.v2
this.userInfo.region = this.v3
this.showDialog = false
},
clickNav2(item) {
this.v1 = item.name
},
clickSub2(item) {
this.v2 = item.name
},
clickThird2(item) {
this.v3 = item.name
// this.userInfo.industryName = `${this.v1}-${this.v2}-${this.v3}`
this.userInfo.industryName = `${this.v3}`
// industryId
this.showDialog2 = false
},
toggleWork(e) {
if (this.workTypeList.includes(e)) {
this.workTypeList = this.workTypeList.filter(item => item != e)
......@@ -181,7 +198,7 @@
} = e
if (columnIndex === 0) {
// picker为选择器this实例,变化第二列对应的选项
picker.setColumnValues(1, values[0].slice(index))
picker.setColumnValues(1, values[0].slice(index + 1))
}
},
confirmSalary(e) {
......@@ -191,13 +208,8 @@
}
this.salaryShow = false
},
changeIndustry(e) {
this.industryShow = false
this.userInfo.industryName = e.value[0].name
this.userInfo.industryId = e.value[0].id
},
submit(){
if (!this.userInfo.industryId) {
if (!this.userInfo.industryName) {
return uni.showToast({
title: '请选择期望职位',
icon: 'none'
......@@ -251,8 +263,8 @@
padding: 10rpx;
}
.it{
width: 150rpx;
height: 60rpx;
padding: 0 30rpx;
font-size: 32rpx;
text-align: center;
line-height: 60rpx;
......
<template>
<view class="personal">
<u-form
labelPosition="top"
:model="userInfo"
:rules="rules"
ref="uForm"
labelWidth="120"
>
<u-form-item label="最高学历" prop="qualification">
<u-cell
size="large"
:title="userInfo.qualification || '请选择'"
isLink
@click="showDialog = true"
/>
<u-picker
keyName="name"
:show="showDialog"
:columns="xlList"
@confirm="confirmSalary"
@cancel="showDialog = false"
></u-picker>
</u-form-item>
<u-form-item label="学校名称" prop="school" borderBottom>
<u-input v-model="userInfo.school" border="none" placeholder="如: 清华大学" />
</u-form-item>
<u-form-item label="所学专业" prop="major" borderBottom>
<u-input v-model="userInfo.major" border="none" placeholder="如: 计算机科学与技术" />
</u-form-item>
<u-form-item label="在校时间" borderBottom>
<view class="f_b">
<view
class="f_b"
style="width: 35vw;padding: 10rpx 0;"
@click="show=true"
>
<view>{{userInfo.startTime || '入学时间'}}</view>
<u-icon size="18" name="arrow-right"/>
</view>
-
<view class="f_b">
<view
class="f_b"
style="width: 35vw;padding: 10rpx 0;"
@click="show2=true"
>
<view>{{userInfo.endTime || '毕业时间'}}</view>
<u-icon size="18" name="arrow-right"/>
</view>
</view>
</view>
<!-- 入职时间 -->
<u-datetime-picker
:show="show"
v-model="startTime"
mode="year-month"
:minDate="2649600000"
:maxDate="1786778555000"
@close="show=false"
@confirm="setStartTime"
></u-datetime-picker>
<!-- 离职时间 -->
<u-datetime-picker
:show="show2"
v-model="endTime"
mode="year-month"
:minDate="2649600000"
:maxDate="1786778555000"
@close="show2=false"
@confirm="setEndTime"
></u-datetime-picker>
</u-form-item>
</u-form>
<view class="br"></view>
<view class="footer">
<u-button @click="submit" type="primary">保存</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showDialog: false,
userInfo:{},
xlList: [],
show: false,
startTime: new Date().getTime(),
show2: false,
endTime: new Date().getTime(),
}
},
onLoad(e) {
this.$http.get('/qualification/all', {}).then(res => {
this.xlList = [res.data.list]
})
if (e.id) {
this.$http.get('/personEducational/details', {id: e.id}).then(res => {
this.userInfo = res.data
})
}
},
methods: {
confirmSalary(e) {
this.userInfo.qualification = e.value[0].name
this.userInfo.qualificationId = e.value[0].id
this.showDialog = false
},
setStartTime(e) {
this.userInfo.startTime = this.formatTimestampToYearMonth(e.value)
this.show = false
},
setEndTime(e) {
this.userInfo.endTime = this.formatTimestampToYearMonth(e.value)
this.show2 = false
},
formatTimestampToYearMonth(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
return `${year}-${month}`;
},
submit(){
if (!this.userInfo.qualification) {
return uni.showToast({
title: '请输入最高学历',
icon: 'none'
})
}
const url = this.userInfo.id ? '/personEducational/u' : '/personEducational/c'
this.$http.post(url, this.userInfo).then(res => {
uni.showToast({
title: `保存成功`,
icon: 'none',
});
setTimeout(()=>{
uni.navigateBack()
},500)
})
}
}
}
</script>
<style lang="scss">
.personal{
background: #fff;
min-height:100vh;
padding:0 30rpx;
.br{
height: calc(200rpx + env(safe-area-inset-bottom));
}
.footer{
position: fixed;
bottom: calc(env(safe-area-inset-bottom) + 40rpx);
width: 690rpx;
}
}
</style>
......@@ -7,8 +7,6 @@
</view>
<view class="f_s">
{{ userInfo.age || 0 }}
<!-- <view style="margin: 0 20rpx;">|</view>
工作6年 -->
<view style="margin: 0 20rpx;">|</view>
{{ userInfo.sex ? '男' : '女' }}
</view>
......@@ -18,12 +16,6 @@
{{ userInfo.phoneNumber }}
</view>
</view>
<!-- <view class="f_s">
<u-icon name="email-fill" size="20"/>
<view style="margin-left: 16rpx;">
2862434031@qq.com
</view>
</view> -->
</view>
<view class="module">
<view class="f_b">
......@@ -37,12 +29,6 @@
<view style="margin-left: 16rpx;color: #3686DC;">管理</view>
</view>
</view>
<!-- <view class="f_s">
<u-icon name="clock-fill" size="20"/>
<view style="margin-left: 16rpx;">
在职-看看机会
</view>
</view> -->
<view class="f_s" v-for="item in intentionList">
<u-icon name="file-text-fill" size="20"/>
<view style="margin-left: 16rpx;">
......@@ -50,10 +36,10 @@
</view>
</view>
</view>
<!-- <view class="module">
<view class="module">
<view class="f_b">
<view class="name">工作/实习经历</view>
<view class="f_s">
<view class="f_s" @click="toWork('')">
<u-icon
name="plus"
size="22"
......@@ -63,30 +49,59 @@
</view>
</view>
</view>
<view class="module">
<view class="module" v-for="item in workExperienceList">
<view class="f_b">
<view class="f_s">
<u-icon name="bookmark-fill" size="24"/>
<view class="name" style="margin-left: 16rpx;">
亚信科技
{{item.orgName}}
</view>
</view>
<u-icon name="edit-pen" size="22" color="#3686DC"/>
<u-icon name="edit-pen" size="22" color="#3686DC" @click="toWork(item.id)"/>
</view>
<view class="time">2022.04-2024.02</view>
<view class="minTitle">前端开发</view>
<view class="f_s" style="flex-wrap: wrap;">
<view class="tag">css</view>
<view class="tag">JavaScript</view>
<view class="tag">Html</view>
<view class="tag">typeScript</view>
<view class="tag">uni-app</view>
<view class="tag">Vue</view>
<view class="time">{{item.startTime}} - {{item.endTime}}</view>
<view style="color: #666;">{{item.job}}</view>
<view class="desc">{{item.descr}}</view>
</view>
<view class="module">
<view class="f_b">
<view class="name">教育经历</view>
<view class="f_s" @click="toEducation('')">
<u-icon
name="plus"
size="22"
color="#3686DC"
/>
<view style="margin-left: 16rpx;color: #3686DC;">添加</view>
</view>
</view>
<view class="u-line-2 desc">
担任前端开发角色,负责中移在线项目前端开发与对现有功能优化与mt项目功能迁移,项目使用中国移动担任前端开发角色,负责中移在线项目前端开发与对现有功能优化与mt项目功能迁移,项目使用中国移动
</view>
<view class="module" v-for="item in personEducationalList">
<view class="f_b">
<view class="f_s">
<u-icon name="bookmark-fill" size="24"/>
<view class="name" style="margin-left: 16rpx;">
{{item.school}}
</view>
</view>
<u-icon name="edit-pen" size="22" color="#3686DC" @click="toEducation(item.id)"/>
</view>
</view> -->
<view class="time">{{item.startTime}} - {{item.endTime}}</view>
<view style="color: #666;">{{item.qualification}} | {{item.major}}</view>
</view>
<view class="module">
<view class="f_b">
<view class="f_s">
<u-icon name="bookmark-fill" size="24"/>
<view class="name" style="margin-left: 16rpx;">
自我评价
</view>
</view>
<u-icon name="edit-pen" size="22" color="#3686DC" @click="toSelf"/>
</view>
<view class="desc">{{userInfo.selfEvaluation || ''}}</view>
</view>
<view style="height: 200px;"></view>
</view>
</template>
......@@ -95,7 +110,9 @@
data() {
return {
userInfo: {},
intentionList: []
intentionList: [], // 意向职位
workExperienceList: [], // 工作经历
personEducationalList: [], // 教育经历
}
},
onShow() {
......@@ -104,6 +121,12 @@
this.$http.get('/objective/l', {personId: res.data.id}).then(res => {
this.intentionList = res.data.list
})
this.$http.get('/workExperience/l', {personId: res.data.id}).then(res => {
this.workExperienceList = res.data.list
})
this.$http.get('/personEducational/l', {personId: res.data.id}).then(res => {
this.personEducationalList = res.data.list
})
})
},
methods: {
......@@ -118,8 +141,23 @@
uni.navigateTo({
url: `/pages/user/resume/intention?id=${this.userInfo.id}`
})
},
toWork(id) {
uni.navigateTo({
url: `/pages/user/resume/work?id=${id}`
})
},
toEducation(id) {
uni.navigateTo({
url: `/pages/user/resume/education?id=${id}`
})
},
toSelf() {
uni.navigateTo({
url: `/pages/user/resume/selfEvaluation`
})
}
}
},
}
</script>
......@@ -128,6 +166,7 @@
padding: 30rpx;
background: #fff;
box-sizing: border-box;
overflow: auto;
.module{
margin-bottom: 70rpx;
font-size: 28rpx;
......@@ -135,11 +174,11 @@
margin-bottom: 20rpx;
}
.name{
font-size: 44rpx;
font-size: 38rpx;
}
.time{
margin: 20rpx 0;
font-size: 28rpx;
font-size: 24rpx;
color: #777;
}
.minTitle{
......@@ -150,8 +189,10 @@
margin: 16rpx 16rpx 0 0;
}
.desc{
color: #555;
color: #666;
line-height: 1.7;
white-space: pre-line;
font-weight: 300;
}
}
}
......
......@@ -57,7 +57,7 @@
background-color: #fff;
padding: 30rpx 0;
.title{
font-size: 40rpx;
font-size: 38rpx;
font-weight: bold;
line-height: 1;
padding: 4rpx 30rpx;
......@@ -84,7 +84,7 @@
margin-bottom: 20rpx;
}
.name{
font-size: 44rpx;
font-size: 38rpx;
}
.time{
margin: 20rpx 0;
......
......@@ -28,7 +28,7 @@
</u-form>
<view class="br"></view>
<view class="footer">
<u-button @click="submit" type="primary">提交</u-button>
<u-button @click="submit" type="primary">保存</u-button>
</view>
</view>
......
<template>
<view class="selfEvaluation">
<view class="title">自我评价</view>
<u--textarea
v-model="value"
placeholder="请对自己做一个简短评价,吸引更多HR关注,为了保护个人隐私,请不要填写手机号QQ微信等联系方式。"
border="bottom"
height="200"
maxlength="500"
></u--textarea>
<view class="footer">
<u-button @click="submit" type="primary">提交</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
value: '',
userInfo: '',
}
},
onLoad() {
this.$http.get('/person/person/details', {}).then(res => {
this.userInfo = res.data,
this.value = res.data.selfEvaluation || ''
})
},
methods: {
submit() {
if (!this.value) {
return uni.showToast({
title: '请输入自我评价',
icon: 'none'
})
}
this.$http.post('/person/u', {
...this.userInfo,
selfEvaluation: this.value,
}).then(res => {
uni.showToast({
title: `修改成功`,
icon: 'none',
});
setTimeout(()=>{
uni.navigateBack()
},500)
})
}
}
}
</script>
<style lang="scss">
.selfEvaluation{
padding: 30rpx;
background-color: #fff;
box-sizing: border-box;
.title{
font-size: 38rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.footer{
position: fixed;
bottom: calc(env(safe-area-inset-bottom) + 40rpx);
width: 690rpx;
}
}
</style>
<template>
<view class="personal">
<u-form
labelPosition="top"
:model="userInfo"
:rules="rules"
ref="uForm"
labelWidth="120"
>
<u-form-item label="公司名称" prop="orgName" borderBottom>
<u-input v-model="userInfo.orgName" border="none" placeholder="如: 君营直聘" />
</u-form-item>
<u-form-item label="职位名称" prop="job" borderBottom>
<u-input v-model="userInfo.job" border="none" placeholder="如: 高级软件工程师" />
</u-form-item>
<u-form-item label="在职时间" prop="idNo" borderBottom>
<view class="f_b">
<view
class="f_b"
style="width: 35vw;padding: 10rpx 0;"
@click="show=true"
>
<view>{{userInfo.startTime || '入职时间'}}</view>
<u-icon size="18" name="arrow-right"/>
</view>
-
<view class="f_b">
<view
class="f_b"
style="width: 35vw;padding: 10rpx 0;"
@click="show2=true"
>
<view>{{userInfo.endTime || '离职时间'}}</view>
<u-icon size="18" name="arrow-right"/>
</view>
</view>
</view>
<!-- 入职时间 -->
<u-datetime-picker
:show="show"
v-model="startTime"
mode="year-month"
:minDate="2649600000"
:maxDate="1786778555000"
@close="show=false"
@confirm="setStartTime"
></u-datetime-picker>
<!-- 离职时间 -->
<u-datetime-picker
:show="show2"
v-model="endTime"
mode="year-month"
:minDate="2649600000"
:maxDate="1786778555000"
@close="show2=false"
@confirm="setEndTime"
></u-datetime-picker>
</u-form-item>
<u-form-item label="所属行业" prop="industryName" borderBottom>
<u-input v-model="userInfo.industryName" border="none" placeholder="请输入" />
</u-form-item>
<u-form-item label="月薪" prop="money" borderBottom>
<u-input v-model="userInfo.money" border="none" placeholder="元/月" />
</u-form-item>
<u-form-item label="工作描述" prop="descr">
<u--textarea
v-model="userInfo.descr"
placeholder="在任职期间,主要负责**项目,取得了***的成绩,我再整个项目中的主要贡献是***"
border="bottom"
height="80"
maxlength="500"
></u--textarea>
</u-form-item>
</u-form>
<view class="br"></view>
<view class="footer">
<u-button @click="submit" type="primary">保存</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo:{},
show: false,
startTime: new Date().getTime(),
show2: false,
endTime: new Date().getTime(),
}
},
onLoad(e) {
if (e.id) {
this.$http.get('/workExperience/details', {id: e.id}).then(res => {
this.userInfo = res.data
})
}
},
methods: {
setStartTime(e) {
this.userInfo.startTime = this.formatTimestampToYearMonth(e.value)
this.show = false
},
setEndTime(e) {
this.userInfo.endTime = this.formatTimestampToYearMonth(e.value)
this.show2 = false
},
formatTimestampToYearMonth(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
return `${year}-${month}`;
},
submit(){
if (!this.userInfo.orgName) {
return uni.showToast({
title: '请输入公司名称',
icon: 'none'
})
}
if (!this.userInfo.job) {
return uni.showToast({
title: '职位名称',
icon: 'none'
})
}
if (!this.userInfo.startTime) {
return uni.showToast({
title: '请输入入职时间',
icon: 'none'
})
}
if (!this.userInfo.endTime) {
return uni.showToast({
title: '请输入离职时间',
icon: 'none'
})
}
if (!this.userInfo.industryName) {
return uni.showToast({
title: '请输入所属行业',
icon: 'none'
})
}
if (!this.userInfo.money) {
return uni.showToast({
title: '请输入月薪',
icon: 'none'
})
}
if (!this.userInfo.descr) {
return uni.showToast({
title: '请输入工作描述',
icon: 'none'
})
}
const url = this.userInfo.id ? '/workExperience/u' : '/workExperience/c'
this.$http.post(url, this.userInfo).then(res => {
uni.showToast({
title: `保存成功`,
icon: 'none',
});
setTimeout(()=>{
uni.navigateBack()
},500)
})
}
}
}
</script>
<style lang="scss">
.personal{
background: #fff;
min-height:100vh;
padding:0 30rpx;
.br{
height: calc(200rpx + env(safe-area-inset-bottom));
}
.footer{
position: fixed;
bottom: calc(env(safe-area-inset-bottom) + 40rpx);
width: 690rpx;
}
}
</style>
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论