Merge remote-tracking branch 'origin/master'

This commit is contained in:
18500206848
2024-04-23 21:51:28 +08:00
3 changed files with 409 additions and 403 deletions

View File

@@ -1,183 +1,189 @@
<template> <template>
<view> <view>
<view class="title"> <view class="title">
全部 全部
</view> </view>
<block v-for="(item, index) in city" :key="index"> <block v-for="(item, index) in city" :key="index">
<view class="cityList" @click="cityClick(item)"> <view class="cityList" @click="cityClick(item)">
{{ item.name }} {{ item.name }}
<image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image> <image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image>
<image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image> <image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image>
</view> </view>
</block> </block>
<view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view> <view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view>
<view class="btn" v-if="layer === maxLayer" @click="comfirm"> <view class="btn" v-if="layer === maxLayer" @click="comfirm">
<view class="bottombtn"> <view class="bottombtn">
确定 确定
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getWorktypesList getWorktypesList
} from '@/api/resume.js' } from '@/api/resume.js'
export default { export default {
data() { data() {
return { return {
workTypeList: [], workTypeList: [],
choose: false, choose: false,
chooseIndex: '', chooseIndex: '',
parentId: undefined, parentId: undefined,
layer: 1, layer: 1,
maxLayer: 2, maxLayer: 2,
id: '', id: '',
label: '', label: '',
tradeId: '', tradeId: '',
} }
}, },
computed: { computed: {
city() { city() {
console.log(this.parentId, this.workTypeList) console.log(this.parentId, this.workTypeList)
if (this.parentId) { if (this.parentId) {
const parentItem = this.workTypeList.find(item => item.id == this.parentId); const parentItem = this.workTypeList.find(item => item.id == this.parentId);
if (parentItem) { if (parentItem) {
return parentItem.child; return parentItem.child;
} }
} else { } else {
return this.workTypeList; return this.workTypeList;
} }
} }
}, },
mounted() { mounted() {
getWorktypesList(1).then(res => { getWorktypesList(1).then(res => {
this.workTypeList = res.data.data; this.workTypeList = res.data.data;
}) })
}, },
onLoad({ onLoad({
tradeId, tradeId,
parentId, parentId,
layer, layer,
maxLayer maxLayer
}) { }) {
this.parentId = parentId this.parentId = parentId
this.tradeId = tradeId || 0 this.tradeId = tradeId || 0
this.layer = parseInt(layer || 1) this.layer = parseInt(layer || 1)
this.maxLayer = parseInt(maxLayer || 2) this.maxLayer = parseInt(maxLayer || 2)
}, },
onShow: function () { }, onShow: function() {},
methods: { methods: {
cityClick(item) { cityClick(item) {
if (this.layer === this.maxLayer) { if (this.layer === this.maxLayer) {
this.selectCity(item) this.selectCity(item)
} else { } else {
this.goCityInfo(item) this.goCityInfo(item)
} }
}, },
selectCity(item) { selectCity(item) {
console.log(item, "item"); console.log(item, "item");
this.id = item.id; this.id = item.id;
this.label = item.name; this.label = item.name;
}, },
goCityInfo(item) { goCityInfo(item) {
uni.navigateTo({ uni.navigateTo({
url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}` url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}`
}) })
}, },
comfirm: function () { comfirm: function() {
if (this.id) { if (this.id) {
uni.$emit('setworkTypes', { detail: { id: this.id, label: this.label, parentLabel: this.$route.query.parentLabel } }) uni.$emit('setworkTypes', {
uni.navigateBack({ detail: {
delta: this.layer id: this.id,
}) label: this.label,
} else { parentLabel: this.$route.query.parentLabel
uni.showToast({ }
title: "请选择地点", })
icon: "none" uni.navigateBack({
}) delta: this.layer
} })
}, } else {
uni.showToast({
} title: "请选择类别",
} icon: "none"
</script> })
}
<style> },
.bottombtn {
background-color: #1B66FF; }
color: #fff; }
text-align: center; </script>
border-radius: 10rpx;
font-family: PingFangSC-Medium; <style>
font-size: 32rpx; .bottombtn {
height: 90rpx; background-color: #1B66FF;
line-height: 90rpx; color: #fff;
} text-align: center;
border-radius: 10rpx;
.btn { font-family: PingFangSC-Medium;
background-color: #fefefe; font-size: 32rpx;
width: 690rpx; height: 90rpx;
padding: 30rpx; line-height: 90rpx;
padding-bottom: 80rpx; }
position: fixed;
bottom: 0; .btn {
left: 0; background-color: #fefefe;
} width: 690rpx;
padding: 30rpx;
.cityList image { padding-bottom: 80rpx;
width: 32rpx; position: fixed;
height: 32rpx; bottom: 0;
} left: 0;
}
.cityList {
display: flex; .cityList image {
align-items: center; width: 32rpx;
justify-content: space-between; height: 32rpx;
font-family: PingFangSC-Regular; }
font-size: 32rpx;
color: #333333; .cityList {
padding: 30rpx; display: flex;
padding-left: 0; align-items: center;
margin-left: 30rpx; justify-content: space-between;
width: 690rpx; font-family: PingFangSC-Regular;
border-bottom: 1rpx solid #dddddd; font-size: 32rpx;
} color: #333333;
padding: 30rpx;
.location { padding-left: 0;
font-family: PingFangSC-Regular; margin-left: 30rpx;
font-size: 32rpx; width: 690rpx;
color: #333333; border-bottom: 1rpx solid #dddddd;
display: flex; }
align-items: center;
justify-content: flex-start; .location {
padding: 30rpx; font-family: PingFangSC-Regular;
} font-size: 32rpx;
color: #333333;
.comfirm { display: flex;
margin-left: auto; align-items: center;
} justify-content: flex-start;
padding: 30rpx;
.location image { }
width: 40rpx;
height: 40rpx; .comfirm {
} margin-left: auto;
}
.title {
font-family: PingFangSC-Regular; .location image {
font-size: 28rpx; width: 40rpx;
color: #999999; height: 40rpx;
background-color: #f6f6f6; }
padding: 30rpx;
} .title {
font-family: PingFangSC-Regular;
page { font-size: 28rpx;
background-color: #fefefe; color: #999999;
} background-color: #f6f6f6;
</style> padding: 30rpx;
}
page {
background-color: #fefefe;
}
</style>

View File

@@ -1,217 +1,218 @@
<template> <template>
<view> <view>
<view class="title"> <view class="title">
全部 全部
</view> </view>
<block v-for="(item, index) in city" :key="index"> <block v-for="(item, index) in city" :key="index">
<view class="cityList" @click="cityClick(item)"> <view class="cityList" @click="cityClick(item)">
{{ item.name }} {{ item.name }}
<image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image> <image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image>
<image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image> <image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image>
</view> </view>
</block> </block>
<view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view> <view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view>
<view class="btn" v-if="layer === maxLayer" @click="comfirm"> <view class="btn" v-if="layer === maxLayer" @click="comfirm">
<view class="bottombtn"> <view class="bottombtn">
确定 确定
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getWorktypesList getWorktypesList
} from '@/api/resume.js' } from '@/api/resume.js'
export default { export default {
data() { data() {
return { return {
workTypeList: [], workTypeList: [],
choose: false, choose: false,
chooseIndex: '', chooseIndex: '',
parentId: undefined, parentId: undefined,
parentLabel: null, parentLabel: null,
layer: 1, layer: 1,
maxLayer: 2, maxLayer: 2,
id: '', id: '',
label: '', label: '',
parentTwoId: '', parentTwoId: '',
parentTwoLabel: '', parentTwoLabel: '',
tradeId: '', tradeId: '',
} }
}, },
computed: { computed: {
city() { city() {
if(!this.workTypeList.length) return; if (!this.workTypeList.length) return;
if(this.parentTwoId) { if (this.parentTwoId) {
const parentItem = this.workTypeList.find(item => item.id == this.parentId); const parentItem = this.workTypeList.find(item => item.id == this.parentId);
const parentChild = parentItem.child.find(item => item.id == this.parentTwoId); const parentChild = parentItem.child.find(item => item.id == this.parentTwoId);
if (parentItem) { if (parentItem) {
return parentChild.child return parentChild.child
} }
} else if (this.parentId) { } else if (this.parentId) {
const parentItem = this.workTypeList.find(item => item.id == this.parentId); const parentItem = this.workTypeList.find(item => item.id == this.parentId);
if (parentItem) { if (parentItem) {
return parentItem.child; return parentItem.child;
} }
} else { } else {
return this.workTypeList; return this.workTypeList;
} }
} }
}, },
mounted() { mounted() {
getWorktypesList(2).then(res => { getWorktypesList(2).then(res => {
this.workTypeList = res.data.data; this.workTypeList = res.data.data;
}) })
}, },
onLoad({ onLoad({
tradeId, tradeId,
parentId, parentId,
layer, layer,
maxLayer, maxLayer,
parentLabel, parentLabel,
parentTwoId, parentTwoId,
parentTwoLabel parentTwoLabel
}) { }) {
this.parentLabel = parentLabel this.parentLabel = parentLabel
this.parentId = parentId this.parentId = parentId
this.parentTwoId = parentTwoId this.parentTwoId = parentTwoId
this.parentTwoLabel = parentTwoLabel this.parentTwoLabel = parentTwoLabel
this.tradeId = tradeId || 0 this.tradeId = tradeId || 0
this.layer = parseInt(layer || 1) this.layer = parseInt(layer || 1)
this.maxLayer = parseInt(maxLayer || 2) this.maxLayer = parseInt(maxLayer || 2)
}, },
onShow: function () { }, onShow: function() {},
methods: { methods: {
cityClick(item) { cityClick(item) {
console.log('items', item, this.layer, this.maxLayer) console.log('items', item, this.layer, this.maxLayer)
if (this.layer === this.maxLayer) { if (this.layer === this.maxLayer) {
this.selectCity(item) this.selectCity(item)
} else { } else {
switch (this.layer) { switch (this.layer) {
case 1: case 1:
this.goCityInfo(item) this.goCityInfo(item)
break break
case 2: case 2:
this.goCityInfoTwo(item) this.goCityInfoTwo(item)
break break
} }
} }
}, },
selectCity(item) { selectCity(item) {
this.id = item.id; this.id = item.id;
this.label = item.name; this.label = item.name;
}, },
goCityInfoTwo(item) { goCityInfoTwo(item) {
this.twoId = item.id; this.twoId = item.id;
this.twoLabel = item.name; this.twoLabel = item.name;
uni.navigateTo({ uni.navigateTo({
url: `./skillLevel?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${this.parentId url: `./skillLevel?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${this.parentId
}&parentLabel=${this.parentLabel}&parentTwoId=${item.id}&parentTwoLabel=${item.name}` }&parentLabel=${this.parentLabel}&parentTwoId=${item.id}&parentTwoLabel=${item.name}`
}) })
}, },
goCityInfo(item) { goCityInfo(item) {
uni.navigateTo({ uni.navigateTo({
url: `./skillLevel?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}` url: `./skillLevel?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}`
}) })
}, },
comfirm: function () { comfirm: function() {
if (this.id) { if (this.id) {
uni.$emit('setSkill', { detail: { uni.$emit('setSkill', {
id: this.id, detail: {
label: this.label, id: this.id,
parentLabel: this.$route.query.parentLabel, label: this.label,
parentTwoLabel: this.$route.query.parentTwoLabel parentLabel: this.$route.query.parentLabel,
} , parentTwoLabel: this.$route.query.parentTwoLabel
}) },
uni.navigateBack({ })
delta: this.layer uni.navigateBack({
}) delta: this.layer
} else { })
uni.showToast({ } else {
title: "请选择地点", uni.showToast({
icon: "none" title: "请选择类别",
}) icon: "none"
} })
}, }
},
}
} }
</script> }
</script>
<style>
.bottombtn { <style>
background-color: #1B66FF; .bottombtn {
color: #fff; background-color: #1B66FF;
text-align: center; color: #fff;
border-radius: 10rpx; text-align: center;
font-family: PingFangSC-Medium; border-radius: 10rpx;
font-size: 32rpx; font-family: PingFangSC-Medium;
height: 90rpx; font-size: 32rpx;
line-height: 90rpx; height: 90rpx;
} line-height: 90rpx;
}
.btn {
background-color: #fefefe; .btn {
width: 690rpx; background-color: #fefefe;
padding: 30rpx; width: 690rpx;
padding-bottom: 80rpx; padding: 30rpx;
position: fixed; padding-bottom: 80rpx;
bottom: 0; position: fixed;
left: 0; bottom: 0;
} left: 0;
}
.cityList image {
width: 32rpx; .cityList image {
height: 32rpx; width: 32rpx;
} height: 32rpx;
}
.cityList {
display: flex; .cityList {
align-items: center; display: flex;
justify-content: space-between; align-items: center;
font-family: PingFangSC-Regular; justify-content: space-between;
font-size: 32rpx; font-family: PingFangSC-Regular;
color: #333333; font-size: 32rpx;
padding: 30rpx; color: #333333;
padding-left: 0; padding: 30rpx;
margin-left: 30rpx; padding-left: 0;
width: 690rpx; margin-left: 30rpx;
border-bottom: 1rpx solid #dddddd; width: 690rpx;
} border-bottom: 1rpx solid #dddddd;
}
.location {
font-family: PingFangSC-Regular; .location {
font-size: 32rpx; font-family: PingFangSC-Regular;
color: #333333; font-size: 32rpx;
display: flex; color: #333333;
align-items: center; display: flex;
justify-content: flex-start; align-items: center;
padding: 30rpx; justify-content: flex-start;
} padding: 30rpx;
}
.comfirm {
margin-left: auto; .comfirm {
} margin-left: auto;
}
.location image {
width: 40rpx; .location image {
height: 40rpx; width: 40rpx;
} height: 40rpx;
}
.title {
font-family: PingFangSC-Regular; .title {
font-size: 28rpx; font-family: PingFangSC-Regular;
color: #999999; font-size: 28rpx;
background-color: #f6f6f6; color: #999999;
padding: 30rpx; background-color: #f6f6f6;
} padding: 30rpx;
}
page {
background-color: #fefefe; page {
} background-color: #fefefe;
</style> }
</style>

View File

@@ -3,11 +3,10 @@ module.exports = {
port: 1887, port: 1887,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://192.168.1.101:8200', target: 'http://10.165.0.173:8000',
ws: true, ws: true,
changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/api/jobslink-api": "/" '^/api': '/'
} }
}, },
'/qq/map': { '/qq/map': {