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

1

上级 c1e5d578
No preview for this file type
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
mounted() { mounted() {
const that = this const that = this
uni.login({ uni.login({
scope: 'zhima.auth.workcert.verify',
success(e) { success(e) {
that.$http.get('/public/ali/getopenId', { that.$http.get('/public/ali/getopenId', {
code: e.code, code: e.code,
...@@ -60,7 +59,8 @@ ...@@ -60,7 +59,8 @@
}, },
login(){ login(){
uni.request({ 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', method: 'POST',
data: { data: {
account: this.openId, 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 = { 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秒超时 timeout: 10000, // 10秒超时
header: { header: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
......
...@@ -59,11 +59,11 @@ ...@@ -59,11 +59,11 @@
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true, "usingComponents" : true,
"appid" : "2021005184646262", "appid" : "2021005184646262",
"permission": { "permission" : {
"zhima.auth.workcert.verify": { "zhima.auth.workcert.verify" : {
"desc": "用于验证你的芝麻工作证信息" "desc" : "用于验证你的芝麻工作证信息"
} }
} }
}, },
"mp-baidu" : { "mp-baidu" : {
"usingComponents" : true "usingComponents" : true
......
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/user/resume/index",
"style" :
{
"navigationBarTitleText" : "简历"
}
},
{ {
"path": "pages/home/index", "path": "pages/home/index",
"style": { "style": {
...@@ -28,13 +35,6 @@ ...@@ -28,13 +35,6 @@
"navigationBarTitleText": "我的" "navigationBarTitleText": "我的"
} }
}, },
{
"path" : "pages/user/resume/index",
"style" :
{
"navigationBarTitleText" : "简历"
}
},
{ {
"path" : "pages/user/resume/personalInfo", "path" : "pages/user/resume/personalInfo",
"style" : "style" :
...@@ -62,6 +62,34 @@ ...@@ -62,6 +62,34 @@
{ {
"navigationBarTitleText" : "收藏记录" "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": { "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 @@ ...@@ -40,11 +40,11 @@
height="60rpx" height="60rpx"
radius="4" 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>
<view class="f_b occupational"> <view class="f_b occupational">
<view>{{item.industryName}}</view> <view>{{item.industryName}}</view>
<view>{{item.address}}</view> <view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
</view> </view>
</view> </view>
<u-loadmore <u-loadmore
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
.list-title{ .list-title{
font-weight: bold; font-weight: bold;
font-size: 36rpx; font-size: 36rpx;
margin-bottom: 14rpx; margin-bottom: 20rpx;
.t{ .t{
background-color: #EFF7FE; background-color: #EFF7FE;
color: #33A1CA; color: #33A1CA;
...@@ -189,13 +189,14 @@ ...@@ -189,13 +189,14 @@
} }
} }
.company{ .company{
margin: 14rpx 0; margin: 20rpx 0;
color: #999; color: #666;
font-size: 30rpx; font-size: 30rpx;
} }
.occupational{ .occupational{
color: #999; color: #666;
font-size: 26rpx; font-size: 26rpx;
font-weight: 300;
} }
} }
.list-item + .list-item{ .list-item + .list-item{
......
...@@ -22,20 +22,35 @@ ...@@ -22,20 +22,35 @@
</view> </view>
</view> </view>
<view class="jobDesc"> <view class="jobDesc">
<u-divider textPosition="left" text="职位描述" textSize="16"/> <view class="moduleTitle">职位描述</view>
<view style="white-space: pre-line;line-height: 2;">{{detail.details}}</view> <view style="white-space: pre-line;line-height: 2;font-weight: 300;">{{detail.details}}</view>
</view> </view>
<view class="companyInfo"> <view class="companyInfo" @click="toCompanyDetails(detail.org)">
<u-divider textPosition="left" text="公司信息" textSize="16"/> <view class="moduleTitle">公司信息</view>
<view class="f_s"> <view class="f_b" style="margin-top: 30rpx;">
<u--image <view class="f_s">
:src="detail.org.logo" <u--image
width="60rpx" :src="detail.org.logo"
height="60rpx" width="60rpx"
radius="4" 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>
<!-- <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>
<view class="footer f_b"> <view class="footer f_b">
<u-icon <u-icon
...@@ -84,6 +99,12 @@ ...@@ -84,6 +99,12 @@
this.getLoginInfo() this.getLoginInfo()
}, },
methods: { methods: {
toCompanyDetails(org) {
uni.setStorageSync('ogrDetails',org)
uni.navigateTo({
url: '/pages/home/companyDetails'
})
},
getLoginInfo() { getLoginInfo() {
if (uni.getStorageSync('jy-recruit-token')) { if (uni.getStorageSync('jy-recruit-token')) {
this.$http.get('/person/person/details', {}).then(res => { this.$http.get('/person/person/details', {}).then(res => {
...@@ -166,6 +187,10 @@ ...@@ -166,6 +187,10 @@
padding-bottom: 300rpx; padding-bottom: 300rpx;
overflow: auto; overflow: auto;
box-sizing: border-box; box-sizing: border-box;
.moduleTitle{
font-size: 36rpx;
color: #333;
}
.jobInfo{ .jobInfo{
margin: 30rpx 0; margin: 30rpx 0;
background: #fff; background: #fff;
...@@ -179,6 +204,7 @@ ...@@ -179,6 +204,7 @@
} }
.companyName{ .companyName{
padding: 20rpx 0; padding: 20rpx 0;
font-weight: 300;
} }
.requirement{ .requirement{
.u-icon{ .u-icon{
...@@ -187,22 +213,23 @@ ...@@ -187,22 +213,23 @@
.f_s + .f_s{ .f_s + .f_s{
margin-left: 20rpx; margin-left: 20rpx;
} }
font-weight: 300;
} }
} }
.jobDesc{ .jobDesc{
background: #fff; background: #fff;
padding: 10rpx 0 60rpx; padding: 10rpx 0 60rpx;
margin: 30rpx 0; margin: 30rpx 0;
color: #777; color: #666;
font-size: 28rpx; font-size: 28rpx;
line-height: 1.4; line-height: 2;
>view{ >view{
padding:10rpx 30rpx; padding:10rpx 30rpx;
} }
} }
.companyInfo{ .companyInfo{
background: #fff; background: #fff;
padding: 10rpx 30rpx 30rpx; padding: 30rpx;
} }
.footer{ .footer{
padding: 20rpx 30px calc(env(safe-area-inset-bottom) + 20rpx); padding: 20rpx 30px calc(env(safe-area-inset-bottom) + 20rpx);
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
height="80rpx" height="80rpx"
radius="4" 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>
<view class="f_b occupational"> <view class="f_b occupational">
<view>{{item.industryName}}</view> <view>{{item.industryName}}</view>
<view>{{item.address}}</view> <view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
</view> </view>
</view> </view>
<u-loadmore <u-loadmore
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
.list-title{ .list-title{
font-weight: bold; font-weight: bold;
font-size: 36rpx; font-size: 36rpx;
margin-bottom: 14rpx; margin-bottom: 20rpx;
.t{ .t{
background-color: #EFF7FE; background-color: #EFF7FE;
color: #33A1CA; color: #33A1CA;
...@@ -100,13 +100,14 @@ ...@@ -100,13 +100,14 @@
} }
} }
.company{ .company{
margin: 14rpx 0; margin: 20rpx 0;
color: #999; color: #666;
font-size: 30rpx; font-size: 30rpx;
} }
.occupational{ .occupational{
color: #999; color: #666;
font-size: 26rpx; font-size: 26rpx;
font-weight: 300;
} }
} }
.list-item + .list-item{ .list-item + .list-item{
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
height="80rpx" height="80rpx"
radius="4" 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>
<view class="f_b occupational"> <view class="f_b occupational">
<view>{{item.industryName}}</view> <view>{{item.industryName}}</view>
<view>{{item.address}}</view> <view>{{item.org.city != '市辖区' ? item.org.city : item.org.province}}</view>
</view> </view>
</view> </view>
<u-loadmore <u-loadmore
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
.list-title{ .list-title{
font-weight: bold; font-weight: bold;
font-size: 36rpx; font-size: 36rpx;
margin-bottom: 14rpx; margin-bottom: 20rpx;
.t{ .t{
background-color: #EFF7FE; background-color: #EFF7FE;
color: #33A1CA; color: #33A1CA;
...@@ -100,13 +100,14 @@ ...@@ -100,13 +100,14 @@
} }
} }
.company{ .company{
margin: 14rpx 0; margin: 20rpx 0;
color: #999; color: #666;
font-size: 30rpx; font-size: 30rpx;
} }
.occupational{ .occupational{
color: #999; color: #666;
font-size: 26rpx; font-size: 26rpx;
font-weight: 300;
} }
} }
.list-item + .list-item{ .list-item + .list-item{
......
...@@ -12,32 +12,16 @@ ...@@ -12,32 +12,16 @@
size="large" size="large"
:title="userInfo.industryName || '选择期望职位'" :title="userInfo.industryName || '选择期望职位'"
isLink 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>
<u-form-item label="工作城市" prop="city"> <u-form-item label="工作城市" prop="city">
<u-cell <u-cell
size="large" size="large"
:title="userInfo.city || '选择工作城市'" :title="userInfo.region && `${userInfo.province }-${userInfo.city}-${userInfo.region}` || '选择工作城市'"
isLink 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>
<u-form-item label="薪资要求" prop="salaryMin"> <u-form-item label="薪资要求" prop="salaryMin">
<u-cell <u-cell
...@@ -67,19 +51,12 @@ ...@@ -67,19 +51,12 @@
<view class="">工作性质(可多选)</view> <view class="">工作性质(可多选)</view>
<view class="btn" @click="workTypeShow=false">确认</view> <view class="btn" @click="workTypeShow=false">确认</view>
</view> </view>
<view class="f_s"> <view class="f_s" style="flex-wrap: wrap;">
<view
:class="workTypeList.includes('全职') ? 'it itActive' : 'it'"
@click="toggleWork('全职')"
>全职</view>
<view <view
:class="workTypeList.includes('兼职') ? 'it itActive' : 'it'" :class="workTypeList.includes(item) ? 'it itActive' : 'it'"
@click="toggleWork('兼职')" v-for="item in workAll"
>兼职</view> @click="toggleWork(item)"
<view >{{item}}</view>
:class="workTypeList.includes('实习') ? 'it itActive' : 'it'"
@click="toggleWork('实习')"
>实习</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
...@@ -87,38 +64,68 @@ ...@@ -87,38 +64,68 @@
</u-form> </u-form>
<view class="br"></view> <view class="br"></view>
<view class="footer"> <view class="footer">
<u-button @click="submit" type="primary">提交</u-button> <u-button @click="submit" type="primary">保存</u-button>
</view> </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> </view>
</template> </template>
<script> <script>
import sheng from '../../../util/province.json' import wellTreeSelect from '../../../components/well-treeSelect/well-treeSelect.vue';
import shi from '../../../util/city.json' import wellTreeSelect2 from '../../../components/well-treeSelect/well-treeSelect2.vue';
import qu from '../../../util/area.json' import { areaList } from '../../../util/area.js'
export default { export default {
components: {
wellTreeSelect,
wellTreeSelect2
},
data() { data() {
return { return {
userInfo:{}, userInfo:{},
industryShow: false,
areaColumns: [sheng, shi['1'], qu['72']],
showArea: false,
industryList: [], industryList: [],
workTypeShow: false, workTypeShow: false,
workTypeList: [], workTypeList: [],
workAll: [],
salaryShow: false, salaryShow: false,
salaryList: [ 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'],
['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) { onLoad(o) {
console.log(sheng)
this.userInfo.personId = o.id this.userInfo.personId = o.id
this.$http.get('/public/industry/l/all', {}).then(res => { 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) { if (o.objectiveId) {
...@@ -127,38 +134,48 @@ ...@@ -127,38 +134,48 @@
this.userInfo = { this.userInfo = {
...this.userInfo, ...this.userInfo,
city:res.data.city, city:res.data.city,
province: res.data.province,
region: res.data.region,
salaryMin:res.data.salaryMin, salaryMin:res.data.salaryMin,
salaryMax:res.data.salaryMax, salaryMax:res.data.salaryMax,
workType:res.data.workType, workType:res.data.workType,
industryName: res.data.industryName, industryName: res.data.industryName,
industryId: res.data.industryId,
// industryId: res.data.industryId,
} }
this.workTypeList = res.data.workType.split('/') this.workTypeList = res.data.workType.split('/')
}) })
} }
}, },
methods: { methods: {
changeHandler(e) { //监听联动的操作 clickNav(item) {
const { this.v1 = item.label
columnIndex, },
value, clickSub(item) {
values, // values为当前变化列的数组内容 this.v2 = item.label
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
}, },
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) { toggleWork(e) {
if (this.workTypeList.includes(e)) { if (this.workTypeList.includes(e)) {
this.workTypeList = this.workTypeList.filter(item => item != e) this.workTypeList = this.workTypeList.filter(item => item != e)
...@@ -181,7 +198,7 @@ ...@@ -181,7 +198,7 @@
} = e } = e
if (columnIndex === 0) { if (columnIndex === 0) {
// picker为选择器this实例,变化第二列对应的选项 // picker为选择器this实例,变化第二列对应的选项
picker.setColumnValues(1, values[0].slice(index)) picker.setColumnValues(1, values[0].slice(index + 1))
} }
}, },
confirmSalary(e) { confirmSalary(e) {
...@@ -191,13 +208,8 @@ ...@@ -191,13 +208,8 @@
} }
this.salaryShow = false this.salaryShow = false
}, },
changeIndustry(e) {
this.industryShow = false
this.userInfo.industryName = e.value[0].name
this.userInfo.industryId = e.value[0].id
},
submit(){ submit(){
if (!this.userInfo.industryId) { if (!this.userInfo.industryName) {
return uni.showToast({ return uni.showToast({
title: '请选择期望职位', title: '请选择期望职位',
icon: 'none' icon: 'none'
...@@ -251,8 +263,8 @@ ...@@ -251,8 +263,8 @@
padding: 10rpx; padding: 10rpx;
} }
.it{ .it{
width: 150rpx;
height: 60rpx; height: 60rpx;
padding: 0 30rpx;
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
line-height: 60rpx; 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 @@ ...@@ -7,8 +7,6 @@
</view> </view>
<view class="f_s"> <view class="f_s">
{{ userInfo.age || 0 }} {{ userInfo.age || 0 }}
<!-- <view style="margin: 0 20rpx;">|</view>
工作6年 -->
<view style="margin: 0 20rpx;">|</view> <view style="margin: 0 20rpx;">|</view>
{{ userInfo.sex ? '男' : '女' }} {{ userInfo.sex ? '男' : '女' }}
</view> </view>
...@@ -18,12 +16,6 @@ ...@@ -18,12 +16,6 @@
{{ userInfo.phoneNumber }} {{ userInfo.phoneNumber }}
</view> </view>
</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>
<view class="module"> <view class="module">
<view class="f_b"> <view class="f_b">
...@@ -37,12 +29,6 @@ ...@@ -37,12 +29,6 @@
<view style="margin-left: 16rpx;color: #3686DC;">管理</view> <view style="margin-left: 16rpx;color: #3686DC;">管理</view>
</view> </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"> <view class="f_s" v-for="item in intentionList">
<u-icon name="file-text-fill" size="20"/> <u-icon name="file-text-fill" size="20"/>
<view style="margin-left: 16rpx;"> <view style="margin-left: 16rpx;">
...@@ -50,10 +36,10 @@ ...@@ -50,10 +36,10 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="module"> <view class="module">
<view class="f_b"> <view class="f_b">
<view class="name">工作/实习经历</view> <view class="name">工作/实习经历</view>
<view class="f_s"> <view class="f_s" @click="toWork('')">
<u-icon <u-icon
name="plus" name="plus"
size="22" size="22"
...@@ -63,30 +49,59 @@ ...@@ -63,30 +49,59 @@
</view> </view>
</view> </view>
</view> </view>
<view class="module"> <view class="module" v-for="item in workExperienceList">
<view class="f_b"> <view class="f_b">
<view class="f_s"> <view class="f_s">
<u-icon name="bookmark-fill" size="24"/> <u-icon name="bookmark-fill" size="24"/>
<view class="name" style="margin-left: 16rpx;"> <view class="name" style="margin-left: 16rpx;">
亚信科技 {{item.orgName}}
</view> </view>
</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>
<view class="time">2022.04-2024.02</view> <view class="time">{{item.startTime}} - {{item.endTime}}</view>
<view class="minTitle">前端开发</view> <view style="color: #666;">{{item.job}}</view>
<view class="f_s" style="flex-wrap: wrap;"> <view class="desc">{{item.descr}}</view>
<view class="tag">css</view> </view>
<view class="tag">JavaScript</view> <view class="module">
<view class="tag">Html</view> <view class="f_b">
<view class="tag">typeScript</view> <view class="name">教育经历</view>
<view class="tag">uni-app</view> <view class="f_s" @click="toEducation('')">
<view class="tag">Vue</view> <u-icon
name="plus"
size="22"
color="#3686DC"
/>
<view style="margin-left: 16rpx;color: #3686DC;">添加</view>
</view>
</view> </view>
<view class="u-line-2 desc"> </view>
担任前端开发角色,负责中移在线项目前端开发与对现有功能优化与mt项目功能迁移,项目使用中国移动担任前端开发角色,负责中移在线项目前端开发与对现有功能优化与mt项目功能迁移,项目使用中国移动 <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> --> <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> </view>
</template> </template>
...@@ -95,7 +110,9 @@ ...@@ -95,7 +110,9 @@
data() { data() {
return { return {
userInfo: {}, userInfo: {},
intentionList: [] intentionList: [], // 意向职位
workExperienceList: [], // 工作经历
personEducationalList: [], // 教育经历
} }
}, },
onShow() { onShow() {
...@@ -104,6 +121,12 @@ ...@@ -104,6 +121,12 @@
this.$http.get('/objective/l', {personId: res.data.id}).then(res => { this.$http.get('/objective/l', {personId: res.data.id}).then(res => {
this.intentionList = res.data.list 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: { methods: {
...@@ -118,8 +141,23 @@ ...@@ -118,8 +141,23 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/user/resume/intention?id=${this.userInfo.id}` 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> </script>
...@@ -128,6 +166,7 @@ ...@@ -128,6 +166,7 @@
padding: 30rpx; padding: 30rpx;
background: #fff; background: #fff;
box-sizing: border-box; box-sizing: border-box;
overflow: auto;
.module{ .module{
margin-bottom: 70rpx; margin-bottom: 70rpx;
font-size: 28rpx; font-size: 28rpx;
...@@ -135,11 +174,11 @@ ...@@ -135,11 +174,11 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.name{ .name{
font-size: 44rpx; font-size: 38rpx;
} }
.time{ .time{
margin: 20rpx 0; margin: 20rpx 0;
font-size: 28rpx; font-size: 24rpx;
color: #777; color: #777;
} }
.minTitle{ .minTitle{
...@@ -150,8 +189,10 @@ ...@@ -150,8 +189,10 @@
margin: 16rpx 16rpx 0 0; margin: 16rpx 16rpx 0 0;
} }
.desc{ .desc{
color: #555; color: #666;
line-height: 1.7; line-height: 1.7;
white-space: pre-line;
font-weight: 300;
} }
} }
} }
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
background-color: #fff; background-color: #fff;
padding: 30rpx 0; padding: 30rpx 0;
.title{ .title{
font-size: 40rpx; font-size: 38rpx;
font-weight: bold; font-weight: bold;
line-height: 1; line-height: 1;
padding: 4rpx 30rpx; padding: 4rpx 30rpx;
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.name{ .name{
font-size: 44rpx; font-size: 38rpx;
} }
.time{ .time{
margin: 20rpx 0; margin: 20rpx 0;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</u-form> </u-form>
<view class="br"></view> <view class="br"></view>
<view class="footer"> <view class="footer">
<u-button @click="submit" type="primary">提交</u-button> <u-button @click="submit" type="primary">保存</u-button>
</view> </view>
</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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论