1 Commits

Author SHA1 Message Date
yangxiao
2c222deb74 flat: 石河子项目重置 2025-12-25 10:12:52 +08:00
18 changed files with 3525 additions and 3866 deletions

View File

@@ -1,41 +1,35 @@
<template> <template>
<view class="v-tabs" :style="{ height: height }"> <view class="v-tabs" :style="{ height: height }">
<scroll-view <scroll-view class="scroll-view" :show-scrollbar="false" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width: auto; height: 100%; overflow: hidden;">
class="scroll-view" <view class="v-tabs__inner">
:show-scrollbar="false" <view
scroll-x class="v-tabs__item"
scroll-with-animation :style="{
:scroll-left="scrollLeft" color: activeTab == i ? activeColor : color,
style="width: auto; height: 100%; overflow: hidden" fontSize: activeTab == i ? activeFontSize : fontSize,
backgroundColor: activeTab == i ? backgroundColor : '',
borderRadius,
padding,
}"
:data-index="i"
:class="{ active: activeTab == i }"
@tap="handleTapItem"
v-for="(v, i) in tabs"
:key="i"
> >
<view class="v-tabs__inner"> <view class="">
<view {{ v }}
class="v-tabs__item" </view>
:style="{ <view class="bottomborder"></view>
color: activeTab == i ? activeColor : color, </view>
fontSize: activeTab == i ? activeFontSize : fontSize, </view>
backgroundColor: activeTab == i ? backgroundColor : '', <!-- <view
borderRadius,
padding,
}"
:data-index="i"
:class="{ active: activeTab == i }"
@tap="handleTapItem"
v-for="(v, i) in tabs"
:key="i"
>
<view class="">
{{ v }}
</view>
<view class="bottomborder"></view>
</view>
</view>
<!-- <view
class="v-tabs__line" class="v-tabs__line"
:style="{ width: `${lineWidth}px`, height: `${lineHeight}`, backgroundColor: lineColor, transform: `translateX(${lineLeft}px)`, top: `calc(${height} - ${lineHeight})` }" :style="{ width: `${lineWidth}px`, height: `${lineHeight}`, backgroundColor: lineColor, transform: `translateX(${lineLeft}px)`, top: `calc(${height} - ${lineHeight})` }"
></view> --> ></view> -->
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script> <script>
@@ -58,190 +52,190 @@
* @event {Function(activeTab)} change 改变标签触发 * @event {Function(activeTab)} change 改变标签触发
*/ */
export default { export default {
name: 'VTabs', name: 'VTabs',
props: { props: {
value: { value: {
type: [String, Number], type: [String, Number],
default: 0, default: 0
},
height: {
type: String,
default: '45px',
},
tabs: {
type: Array,
default() {
return [];
},
},
backgroundColor: {
type: String,
default: 'transparent',
},
borderRadius: {
type: String,
default: '5px',
},
color: {
type: String,
default: '#333333',
},
activeColor: {
type: String,
default: '#007AFF',
},
fontSize: {
type: String,
default: '14px',
},
activeFontSize: {
type: String,
default: '14px',
},
padding: {
type: String,
default: '10rpx 20rpx',
},
lineScale: {
type: Number,
default: 0.6,
},
lineHeight: {
type: String,
default: '3px',
},
lineColor: {
type: String,
default: '#007AFF',
},
}, },
data() { height: {
return { type: String,
scrollLeft: 0, default: '45px'
activeTab: 0,
width: 0,
lineLeft: 0,
lineWidth: 0,
};
}, },
watch: { tabs: {
activeTab(newVal) { type: Array,
this.$emit('input', newVal * 1); default() {
}, return []
value(newVal) { }
this.activeTab = newVal;
this.getTabsWidth(0);
},
}, },
methods: { backgroundColor: {
handleTapItem(e) { type: String,
const index = e.currentTarget.dataset.index; default: 'transparent'
if (this.activeTab != index) { },
this.activeTab = index; borderRadius: {
this.getTabsWidth(e.currentTarget.offsetLeft); type: String,
this.$emit('change', this.activeTab); default: '5px'
},
color: {
type: String,
default: '#333333'
},
activeColor: {
type: String,
default: '#007AFF'
},
fontSize: {
type: String,
default: '14px'
},
activeFontSize: {
type: String,
default: '14px'
},
padding: {
type: String,
default: '10rpx 20rpx'
},
lineScale: {
type: Number,
default: 0.6
},
lineHeight: {
type: String,
default: '3px'
},
lineColor: {
type: String,
default: '#007AFF'
}
},
data() {
return {
scrollLeft: 0,
activeTab: 0,
width: 0,
lineLeft: 0,
lineWidth: 0
}
},
watch: {
activeTab(newVal) {
this.$emit('input', newVal * 1)
},
value(newVal) {
this.activeTab = newVal
this.getTabsWidth(0)
}
},
methods: {
handleTapItem(e) {
const index = e.currentTarget.dataset.index
if (this.activeTab != index) {
this.activeTab = index
this.getTabsWidth(e.currentTarget.offsetLeft)
this.$emit('change', this.activeTab)
}
},
getTabsWidth(offsetLeft) {
const query = uni.createSelectorQuery().in(this)
query
.select('.v-tabs')
.boundingClientRect(data => {
this.width = data.width
})
.exec()
setTimeout(() => {
let i = 0
let width = 0
query
.selectAll('.v-tabs__item')
.boundingClientRect(data => {
width = data.reduce((total, currentValue, currentIndex, arr) => {
if (currentIndex < this.activeTab) {
total = total + currentValue.width
}
return total
}, 0)
const padding = this.padding.split(' ')[0]
const res = /(\d+)(upx|rpx|px)/.exec(padding)
if (res && (res[2] == 'upx' || res[2] == 'rpx')) {
width += uni.upx2px(res[1]) * 2 * this.activeTab
} else {
width += res[1] * this.activeTab
} }
}, })
getTabsWidth(offsetLeft) { .exec()
const query = uni.createSelectorQuery().in(this); query
query .select('.v-tabs__item.active')
.select('.v-tabs') .boundingClientRect(data => {
.boundingClientRect((data) => { const ol = offsetLeft ? offsetLeft : width
this.width = data.width; if (data.width) {
}) this.lineLeft = ol + (data.width * (1 - this.lineScale)) / 2
.exec(); this.lineWidth = data.width * this.lineScale
setTimeout(() => { this.scrollLeft = ol - (this.width - data.width) / 2
let i = 0; }
let width = 0; })
query .exec()
.selectAll('.v-tabs__item') }, 10)
.boundingClientRect((data) => { }
width = data.reduce((total, currentValue, currentIndex, arr) => { },
if (currentIndex < this.activeTab) { mounted() {
total = total + currentValue.width; this.activeTab = this.value
} this.getTabsWidth(0)
return total; }
}, 0); }
const padding = this.padding.split(' ')[0];
const res = /(\d+)(upx|rpx|px)/.exec(padding);
if (res && (res[2] == 'upx' || res[2] == 'rpx')) {
width += uni.upx2px(res[1]) * 2 * this.activeTab;
} else {
width += res[1] * this.activeTab;
}
})
.exec();
query
.select('.v-tabs__item.active')
.boundingClientRect((data) => {
const ol = offsetLeft ? offsetLeft : width;
if (data.width) {
this.lineLeft = ol + (data.width * (1 - this.lineScale)) / 2;
this.lineWidth = data.width * this.lineScale;
this.scrollLeft = ol - (this.width - data.width) / 2;
}
})
.exec();
}, 10);
},
},
mounted() {
this.activeTab = this.value;
this.getTabsWidth(0);
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.v-tabs { .v-tabs {
position: relative;
width: 100%;
white-space: nowrap;
overflow: hidden;
border-bottom: 1rpx solid #dddddd;
.v-tabs__inner {
position: relative; position: relative;
width: 100%; display: flex;
white-space: nowrap; align-items: center;
overflow: hidden; height: 100%;
border-bottom: 1rpx solid #dddddd; justify-content: center;
.v-tabs__inner { background-color: #fefefe;
position: relative; // border-bottom: 1rpx solid #dddddd;
display: flex; border-bottom: 0;
align-items: center; }
height: 100%;
justify-content: center; .active{
background-color: #fefefe; border-radius: 0 !important;
// border-bottom: 1rpx solid #dddddd; .bottomborder{
border-bottom: 0; width: 42rpx;
height: 6rpx;
margin: 0 auto;
background-color: #1B66FF;
border-radius: 20rpx;
overflow: hidden;
display: block !important;
margin-top: 10rpx;
}
}
.v-tabs__item {
// display: inline-flex;
margin-right: 20upx;
transition: all 0.3s ease;
&:last-child {
margin-right: 0;
} }
}
.active { .v-tabs__line {
border-radius: 0 !important; position: absolute;
.bottomborder { z-index: 99;
width: 42rpx; transition: all 0.3s linear;
height: 6rpx; border-radius: 4upx;
margin: 0 auto; }
background-color: #1b66ff;
border-radius: 20rpx;
overflow: hidden;
display: block !important;
margin-top: 10rpx;
}
}
.v-tabs__item {
// display: inline-flex;
margin-right: 20upx;
transition: all 0.3s ease;
&:last-child {
margin-right: 0;
}
}
.v-tabs__line {
position: absolute;
z-index: 99;
transition: all 0.3s linear;
border-radius: 4upx;
}
} }
::v-deep ::-webkit-scrollbar { /deep/ ::-webkit-scrollbar {
display: none; display: none;
} }
</style> </style>

View File

@@ -1,82 +1,82 @@
{ {
"name": "招聘", "name" : "招聘",
"appid": "__UNI__BFB9B45", "appid" : "__UNI__120CBFC",
"description": "", "description" : "",
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": "100", "versionCode" : "100",
"transformPx": false, "transformPx" : false,
"sassImplementationName": "node-sass", "sassImplementationName" : "node-sass",
"app-plus": { "app-plus" : {
"usingComponents": true, "usingComponents" : true,
"compilerVersion": 3, "compilerVersion" : 3,
/* 5+App */ /* 5+App */
"modules": {}, "modules" : {},
/* */ /* */
"distribute": { "distribute" : {
/* */ /* */
"android": { "android" : {
/* android */ /* android */
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
"ios": {}, "ios" : {},
/* ios */ /* ios */
"sdkConfigs": {} "sdkConfigs" : {}
} }
}, },
/* SDK */ /* SDK */
"quickapp": {}, "quickapp" : {},
/* */ /* */
"mp-weixin": { "mp-weixin" : {
/* */ /* */
"appid": "wx77580889aaf15eb4", "appid" : "wx77580889aaf15eb4",
"setting": { "setting" : {
"urlCheck": false, "urlCheck" : false,
"minified": true, "minified" : true,
"es6": true "es6" : true
}, },
"usingComponents": true, "usingComponents" : true,
"permission": { "permission" : {
"scope.userLocation": { "scope.userLocation" : {
"desc": "获取您的位置,以便给您推荐合适工作信息" "desc" : "获取您的位置,以便给您推荐合适工作信息"
} }
} }
}, },
"h5": { "h5" : {
"sdkConfigs": { "sdkConfigs" : {
"maps": {} "maps" : {}
}, },
"template": "index.html", "template" : "index.html",
"router": { "router" : {
"base": "./", "base" : "./",
"mode": "hash" "mode" : "hash"
}, },
"optimization": { "optimization" : {
"treeShaking": { "treeShaking" : {
"enable": true "enable" : true
} }
} }
} }
} }

View File

@@ -483,7 +483,7 @@
padding: 24rpx; padding: 24rpx;
.top_log { .top_log {
background: url(@/static/img/index/inLogo.png) no-repeat center center; background: url(@/static/img/title-pg.png) no-repeat center center;
background-size: cover; background-size: cover;
height: 60rpx; height: 60rpx;
width: 450rpx; width: 450rpx;
@@ -518,7 +518,7 @@
} }
.home_logo { .home_logo {
background: url(@/static/img/index/inLogo.png) no-repeat center center; background: url(@/static/img/title-pg.png) no-repeat center center;
background-size: cover; background-size: cover;
height: 76rpx; height: 76rpx;
width: 560rpx; width: 560rpx;

View File

@@ -119,10 +119,10 @@
<!-- <view class="btn-out" @click="logout"> <!-- <view class="btn-out" @click="logout">
退出登录 退出登录
</view> --> </view> -->
<view class="bottom" @click="makePhoneCall"> <!-- <view class="bottom" @click="makePhoneCall">
<view>德阳市人社局 电话0838-2505580</view> <view>德阳市人社局 电话0838-2505580</view>
<view>地址德阳市旌阳区天山南路1段-102</view> <view>地址德阳市旌阳区天山南路1段-102</view>
</view> </view> -->
<cs-button></cs-button> <cs-button></cs-button>
</view> </view>
</template> </template>

View File

@@ -1,386 +1,390 @@
<template> <template>
<view class="app_container"> <view class="app_container">
<view class="app-top"> <view class="app-top">
<view class="top-search"> <view class="top-search">
<view class="top-input"> <view class="top-input">
<input <input class="put" type="text" placeholder-class="put-pla" v-model="searchValue"
class="put" placeholder="搜索附近岗位或任务">
type="text" <button class="input-btn" @tap="search">搜索</button>
placeholder-class="put-pla" </view>
v-model="searchValue" </view>
placeholder="搜索附近岗位或任务" </view>
/> <view class="view-map">
<button class="input-btn" @tap="search">搜索</button> <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
</view> :zoom="14" :min-zoom="10" :max-zoom="20" @markertap="clickmark" @regionchange="show = false"
</view> :MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view> <!-- <view id="map" ></view> -->
<view class="view-map"> <!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude"
<super-map :markers="covers" @markertap="clickmark" @regionchange="show = false"></map> -->
ref="uMap" <view class="position-bottom" v-if="show">
style="width: 100%; height: 100%" <view class="uni-margin-wrap">
:latitude="latitude" <swiper class="swiper" circular :interval="2000" :duration="500">
:longitude="longitude" <swiper-item class="wiperItem">
:zoom="14" <view class="swiper-item uni-bg-red">
:min-zoom="10" <view class="item-content">
:max-zoom="20" <view class="content-title"> {{productInfo.missionTitle}} </view>
@markertap="clickmark" <view class="color_999999 fs_12 mar_top5">
@regionchange="show = false" <uni-icons type="location" color="#999999" size="12"></uni-icons>
:MapUrl="$config.supperMap" {{ productInfo.cityId }} {{productInfo.address}} 距离{{distance}}
:flag-tip="false" </view>
></super-map> <view class="color_999999 fs_12 mar_top5">
<!-- <view id="map" ></view> --> <uni-icons type="map-pin-ellipse" color="#999999" size="12"></uni-icons>
<!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude" 招聘时间: {{productInfo.stime}}-{{productInfo.etime}}
:markers="covers" @markertap="clickmark" @regionchange="show = false"></map> --> </view>
<view class="position-bottom" v-if="show"> <view class="color_999999 fs_12 mar_top5">
<view class="uni-margin-wrap"> <uni-icons type="map-pin-ellipse" color="#999999" size="12"></uni-icons>
<swiper class="swiper" circular :interval="2000" :duration="500"> {{productInfo.experienceDesc}} | {{education[productInfo.education]}}
<swiper-item class="wiperItem"> </view>
<view class="swiper-item uni-bg-red"> <button class="btns" hover-class="active" @tap="openMap">
<view class="item-content"> <image class="btn-img" src="../../static/img/direction2.png" />查看详情
<view class="content-title">{{ productInfo.missionTitle }}</view> </button>
<view class="color_999999 fs_12 mar_top5"> </view>
<uni-icons type="location" color="#999999" size="12"></uni-icons> </view>
{{ productInfo.cityId }} {{ productInfo.address }} 距离{{ distance }} </swiper-item>
</view> </swiper>
<view class="color_999999 fs_12 mar_top5"> </view>
<uni-icons type="map-pin-ellipse" color="#999999" size="12"></uni-icons> </view>
招聘时间: {{ productInfo.stime }}-{{ productInfo.etime }} </view>
</view> </view>
<view class="color_999999 fs_12 mar_top5"> </template>
<uni-icons type="map-pin-ellipse" color="#999999" size="12"></uni-icons>
{{ productInfo.experienceDesc }} | {{ education[productInfo.education] }} <script>
</view> import {
<button class="btns" hover-class="active" @tap="openMap"> addZeroPrefix,
<image class="btn-img" src="../../static/img/direction2.png" /> getDistanceFromLatLonInKm
查看详情 } from '@/untils/tools.js'
</button> import testData from '@/common/textdata.js';
</view> import {
</view> geQueryJobsByNearby
</swiper-item> } from '@/api/map.js'
</swiper> let taskpoint = require('../../static/img/taskpoint.png');
</view> let gwpoint = require('../../static/img/gwpoint.png');
</view> let mypoint = require('../../static/img/mypoint.png');
</view> export default {
</view> data() {
</template> return {
education: testData.education,
<script> show: false,
import { addZeroPrefix, getDistanceFromLatLonInKm } from '@/untils/tools.js'; ID: 1,
import testData from '@/common/textdata.js'; searchValue: '',
import { geQueryJobsByNearby } from '@/api/map.js'; latitude: 31.133980,
let taskpoint = require('../../static/img/taskpoint.png'); longitude: 104.404419,
let gwpoint = require('../../static/img/gwpoint.png'); covers: [],
let mypoint = require('../../static/img/mypoint.png'); rateValue: 2,
export default { productInfo: {},
data() { };
return { },
education: testData.education, computed: {
show: false, distance() {
ID: 1, const {
searchValue: '', lon,
latitude: 31.13398, lat
longitude: 104.404419, } = this.productInfo
covers: [], if (lon) {
rateValue: 2, const {
productInfo: {}, m,
}; km
}, } = getDistanceFromLatLonInKm(lat, lon, this.latitude, this.longitude)
computed: { return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`
distance() { }
const { lon, lat } = this.productInfo; return '无'
if (lon) { }
const { m, km } = getDistanceFromLatLonInKm(lat, lon, this.latitude, this.longitude); },
return m > 1000 ? `${km.toFixed(2)}km` : `${m.toFixed(2)}m`; mounted() {
} const _this = this
return '无'; console.log(this.$store.state.user.userLocation)
}, if (this.$store.state.user.userLocation) {
}, const {
mounted() { latitude,
const _this = this; longitude
console.log(this.$store.state.user.userLocation); } = this.$store.state.user.userLocation
if (this.$store.state.user.userLocation) { _this.getList(longitude, latitude).then((covers) => {
const { latitude, longitude } = this.$store.state.user.userLocation; _this.$refs.uMap.addFeature(covers)
_this.getList(longitude, latitude).then((covers) => { })
_this.$refs.uMap.addFeature(covers); } else {
}); _this.$api.msg('无法获得周边信息')
} else { }
_this.$api.msg('无法获得周边信息'); },
} onShow() {
}, // const _this = this
onShow() { // this.mockGetLocation().then((myPoint) => {
// const _this = this // this.latitude = myPoint.latitude
// this.mockGetLocation().then((myPoint) => { // this.longitude = myPoint.longitude
// this.latitude = myPoint.latitude // _this.getList(_this.longitude, _this.latitude).then((covers) => {
// this.longitude = myPoint.longitude // _this.$api.msg('成功获得周边信息')
// _this.getList(_this.longitude, _this.latitude).then((covers) => { // console.log(covers)
// _this.$api.msg('成功获得周边信息') // _this.$refs.uMap.addFeature(covers)
// console.log(covers) // })
// _this.$refs.uMap.addFeature(covers) // })
// }) },
// }) methods: {
}, openMap(lon, lat) {
methods: { //打开地图,并将门店位置传入
openMap(lon, lat) { // type: post 岗位 mission 任务
//打开地图,并将门店位置传入 switch (this.productInfo.type) {
// type: post 岗位 mission 任务 case 'post':
switch (this.productInfo.type) { const no = encodeURIComponent(1)
case 'post': uni.navigateTo({
const no = encodeURIComponent(1); url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${1}`
uni.navigateTo({ })
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(no)}&isCan=${1}`, break
}); case 'mission':
break; const no1 = encodeURIComponent(this.productInfo.missionNo)
case 'mission': uni.navigateTo({
const no1 = encodeURIComponent(this.productInfo.missionNo); url: `/pages/projectInfo/projectInfo?missionNo=${no1}&isCan=${1}`
uni.navigateTo({ })
url: `/pages/projectInfo/projectInfo?missionNo=${no1}&isCan=${1}`, break
}); }
break; },
} search() {
}, const _this = this
search() { if (this.$store.state.user.userLocation) {
const _this = this; const {
if (this.$store.state.user.userLocation) { latitude,
const { latitude, longitude } = this.$store.state.user.userLocation; longitude
_this.getList(longitude, latitude).then((covers) => { } = this.$store.state.user.userLocation
_this.$refs.uMap.addFeature(covers); _this.getList(longitude, latitude).then((covers) => {
}); _this.$refs.uMap.addFeature(covers)
} else { })
_this.$api.msg('无法获得周边信息'); } else {
} _this.$api.msg('无法获得周边信息')
// this.getList(this.longitude, this.latitude).then((covers) => { }
// this.$api.msg('成功获得周边信息') // this.getList(this.longitude, this.latitude).then((covers) => {
// console.log(covers) // this.$api.msg('成功获得周边信息')
// this.$refs.uMap.addFeature(covers) // console.log(covers)
// }) // this.$refs.uMap.addFeature(covers)
}, // })
clickmark(cover) { },
if (cover.markerId === 1) return; clickmark(cover) {
this.show = true; if (cover.markerId === 1) return
this.productInfo = cover.info; this.show = true;
}, this.productInfo = cover.info
mockGetLocation() { },
return new Promise((resolve) => { mockGetLocation() {
resolve({ return new Promise((resolve) => {
longitude: 104.40632, resolve({
latitude: 31.122989, "longitude": 104.40632,
altitude: null, "latitude": 31.122989,
accuracy: 25.998, "altitude": null,
altitudeAccuracy: null, "accuracy": 25.998,
heading: null, "altitudeAccuracy": null,
speed: null, "heading": null,
errMsg: 'getLocation:ok', "speed": null,
verticalAccuracy: 0, "errMsg": "getLocation:ok",
horizontalAccuracy: 25.998, "verticalAccuracy": 0,
}); "horizontalAccuracy": 25.998
}); })
}, })
async getList(lon, lat) { },
return new Promise(async (resolve) => { async getList(lon, lat) {
let params = { return new Promise(async (resolve) => {
lon, let params = {
lat, lon,
distanceRange: 20, lat,
taskTitle: this.searchValue, distanceRange: 20,
}; taskTitle: this.searchValue
let resData = await geQueryJobsByNearby(params); }
if (resData.data.code === 200) { let resData = await geQueryJobsByNearby(params)
const arr = resData.data.data.map((item) => ({ if (resData.data.code === 200) {
id: item.id, const arr = resData.data.data.map((item) => ({
longitude: item.lon, id: item.id,
latitude: item.lat, longitude: item.lon,
iconPath: item.type === 'post' ? gwpoint : taskpoint, latitude: item.lat,
width: 20, iconPath: item.type === 'post' ? gwpoint : taskpoint,
height: 20, width: 20,
title: item.missionTitle, height: 20,
callout: { title: item.missionTitle,
content: item.missionTitle, callout: {
fontSize: 10, content: item.missionTitle,
borderColor: 'blue', fontSize: 10,
}, borderColor: 'blue',
info: item, },
})); info: item
arr.push({ }))
id: 1, arr.push({
latitude: lat, id: 1,
longitude: lon, latitude: lat,
iconPath: mypoint, longitude: lon,
title: '我的位置', iconPath: mypoint,
width: 20, title: '我的位置',
height: 20, width: 20,
}); height: 20
resolve(arr); })
} resolve(arr)
}); }
},
}, })
}; }
</script> }
}
<style lang="scss" scoped> </script>
.color_999999 {
color: #999999; <style lang="scss" scoped>
} .color_999999 {
color: #999999;
.fs_12 { }
font-size: 24rpx;
} .fs_12 {
font-size: 24rpx;
.mar_top5 { }
margin-top: 10rpx;
} .mar_top5 {
margin-top: 10rpx;
.active { }
background: #eaeaea !important;
color: #afafaf; .active {
} background: #EAEAEA !important;
color: #AFAFAF;
.card_mark { }
.mark_l {
width: 56rpx; .card_mark {
height: 28rpx; .mark_l {
border-radius: 12rpx 0 12rpx 12rpx; width: 56rpx;
background: linear-gradient(157deg, #a043c1 0%, #4133a2 100%); height: 28rpx;
font-size: 28rpx; border-radius: 12rpx 0 12rpx 12rpx;
font-family: PingFang-SC-Bold, PingFang-SC; background: linear-gradient(157deg, #A043C1 0%, #4133A2 100%);
font-weight: bold; font-size: 28rpx;
color: #ffffff; font-family: PingFang-SC-Bold, PingFang-SC;
display: flex; font-weight: bold;
align-items: center; color: #FFFFFF;
justify-content: center; display: flex;
} align-items: center;
} justify-content: center;
}
.position-bottom { }
position: absolute;
left: 0; .position-bottom {
right: 0; position: absolute;
height: 406rpx; left: 0;
bottom: 50rpx; right: 0;
height: 406rpx;
.uni-margin-wrap { bottom: 50rpx;
height: 406rpx;
.uni-margin-wrap {
.swiper { height: 406rpx;
height: 406rpx;
.swiper {
.wiperItem { height: 406rpx;
padding-left: 50rpx;
height: 406rpx; .wiperItem {
width: 660rpx !important; padding-left: 50rpx;
height: 406rpx;
.swiper-item { width: 660rpx !important;
width: 660rpx;
height: 406rpx; .swiper-item {
background: #ffffff; width: 660rpx;
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5); height: 406rpx;
border-radius: 27rpx; background: #FFFFFF;
overflow: hidden; box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
border-radius: 27rpx;
.item-top { overflow: hidden;
display: flex;
align-content: center; .item-top {
justify-content: space-between; display: flex;
align-content: center;
.top-img { justify-content: space-between;
width: 215rpx;
height: 120rpx; .top-img {
} width: 215rpx;
} height: 120rpx;
}
.item-content { }
padding: 15rpx 33rpx;
.item-content {
.content-title { padding: 15rpx 33rpx;
font-size: 32rpx;
} .content-title {
font-size: 32rpx;
.btns { }
margin-top: 20rpx;
display: flex; .btns {
align-items: center; margin-top: 20rpx;
justify-content: center; display: flex;
width: 223rpx; align-items: center;
height: 64rpx; justify-content: center;
background: linear-gradient(to right, #a043c1 0%, #4133a2 100%); width: 223rpx;
border-radius: 15rpx; height: 64rpx;
color: #ffffff; background: linear-gradient(to right, #A043C1 0%, #4133A2 100%);
font-size: 26rpx; border-radius: 15rpx;
font-weight: 800; color: #FFFFFF;
color: #ffffff; font-size: 26rpx;
line-height: 64rpx; font-weight: 800;
color: #FFFFFF;
.btn-img { line-height: 64rpx;
width: 32rpx;
height: 32rpx; .btn-img {
} width: 32rpx;
} height: 32rpx;
} }
} }
} }
} }
} }
} }
.app_container {
position: fixed; }
left: 0; }
top: 0;
right: 0; .app_container {
bottom: 0; position: fixed;
display: flex; left: 0;
flex-direction: column; top: 0;
right: 0;
.app-top { bottom: 0;
display: flex; display: flex;
background: linear-gradient(to right, #e8e8e8, #e8e8e8); flex-direction: column;
padding-bottom: 16rpx;
padding-top: 24rpx; .app-top {
display: flex;
.top-search { background: linear-gradient(to right, #e8e8e8, #e8e8e8);
position: relative; padding-bottom: 16rpx;
width: 100%; padding-top: 24rpx;
display: flex;
align-items: center; .top-search {
justify-content: center; position: relative;
width: 100%;
.top-input { display: flex;
width: 710rpx; align-items: center;
justify-content: center;
.put {
padding-left: 30rpx; .top-input {
height: 72rpx; width: 710rpx;
background: #ffffff;
border-radius: 36rpx; .put {
} padding-left: 30rpx;
height: 72rpx;
::v-deep .put-pla { background: #FFFFFF;
height: 33rpx; border-radius: 36rpx;
font-size: 24rpx; }
font-weight: 400;
color: #999999; /deep/ .put-pla {
line-height: 33rpx; height: 33rpx;
} font-size: 24rpx;
font-weight: 400;
.input-btn { color: #999999;
position: absolute; line-height: 33rpx;
right: 30rpx; }
top: 50%;
transform: translate(0, -50%); .input-btn {
color: #ffffff; position: absolute;
width: 120rpx; right: 30rpx;
height: 56rpx; top: 50%;
line-height: 56rpx; transform: translate(0, -50%);
font-size: 28rpx; color: #FFFFFF;
background: linear-gradient(157deg, #a043c1 0%, #4133a2 100%); width: 120rpx;
border-radius: 29rpx; height: 56rpx;
} line-height: 56rpx;
} font-size: 28rpx;
} background: linear-gradient(157deg, #A043C1 0%, #4133A2 100%);
} border-radius: 29rpx;
}
.view-map { }
flex: 1; }
} }
}
</style> .view-map {
flex: 1;
}
}
</style>

View File

@@ -7,7 +7,7 @@
</view> </view>
<view class="navPosition" @click="navTo('/pages/project/map')"> <view class="navPosition" @click="navTo('/pages/project/map')">
<u-icon name="map" color="#2979ff" size="16"></u-icon> <u-icon name="map" color="#2979ff" size="16"></u-icon>
<view class="positionText">德阳市地图服务</view> <view class="positionText">石河子地图服务</view>
<u-icon name="arrow-right" color="#666666" size="14"></u-icon> <u-icon name="arrow-right" color="#666666" size="14"></u-icon>
</view> </view>
<view class="content"> <view class="content">

View File

@@ -1,172 +1,174 @@
<template> <template>
<view> <view>
<view class="sealBox"> <view class="sealBox">
<view style="height: 70rpx"></view> <view style="height: 70rpx;"></view>
<view class="name">签名</view> <view class="name">签名</view>
<view v-if="src" class="sealContent"> <view v-if="src" class="sealContent">
<image class="img" mode="aspectFit" :src="src"></image> <image class="img" mode="aspectFit" :src="src"></image>
</view> </view>
<view v-else class="sealContent" @click="go"> <view v-else class="sealContent" @click="go">
<view class="contentFont">点击输入手写签名</view> <view class="contentFont">点击输入手写签名</view>
</view> </view>
<view class="list" v-if="src"> <view class="list" v-if="src">
<view class="listLeft"> <view class="listLeft">
<view class="listTitle">签名密码</view> <view class="listTitle">签名密码</view>
</view> </view>
<view class="listRight"> <view class="listRight">
<view class="rightContent nochoose"> <view class="rightContent nochoose">
<view v-if="src" class="uni-input">已设置</view> <view v-if="src" class="uni-input">已设置</view>
<view v-else class="uni-input">未设置</view> <view v-else class="uni-input">未设置</view>
</view> </view>
<image src="@/static/img/right.svg" mode=""></image> <image src="@/static/img/right.svg" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
<view v-if="!src" class="sealAgreement"> <view v-if="!src" class="sealAgreement">
<checkbox :checked="status" @click="checkClick" /> <checkbox :checked="status" @click="checkClick"/>
<view>我已阅读并同意</view> <view>我已阅读并同意</view>
<view class="agreement" @click="goAgreement('/pages/user/sealAgreement')">申请证书协议</view> <view class="agreement" @click="goAgreement('/pages/user/sealAgreement')">申请证书协议</view>
</view> </view>
<view class="btn"> <view class="btn">
<view v-if="src" @click="next" class="bottombtn">完成</view> <view v-if="src" @click="next" class="bottombtn">完成</view>
<view v-if="!src" class="bottombtn nocheck">完成</view> <view v-if="!src" class="bottombtn nocheck">完成</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import {mapGetters} from 'vuex'
export default { export default {
data() { data() {
return { return {
status: false, status:false
}; }
}, },
mounted() { mounted() {
// this.$store.dispatch('setAutograph') // this.$store.dispatch('setAutograph')
}, },
methods: { methods: {
goAgreement(url) { goAgreement (url) {
uni.navigateTo({ uni.navigateTo({
url, url
}); })
}, },
checkClick() { checkClick(){
this.status = !this.status; this.status = !this.status
}, },
next() { next () {
uni.navigateBack(); uni.navigateBack()
// uni.switchTab({ // uni.switchTab({
// url: '/pages/index/index' // url: '/pages/index/index'
// }) // })
}, },
go(url) { go(url){
if (!this.status) { if (!this.status){
uni.showToast({ uni.showToast({
title: '请先阅读并同意《申请证书协议》', title: '请先阅读并同意《申请证书协议》',
icon: 'none', icon: 'none'
}); })
return; return
} }
uni.navigateTo({ uni.navigateTo({
url: `/pageMy/setUserBase/seal/sealCanvas?path=/pageMy/setUserBase/seal/sealCanvas`, url: `/pageMy/setUserBase/seal/sealCanvas?path=/pageMy/setUserBase/seal/sealCanvas`
}); })
}, },
getInpCode: function (e) { getInpCode: function(e) {
console.log(e); console.log(e)
}, }
}, },
computed: { computed: {
...mapGetters(['autograph']), ...mapGetters(['autograph']),
src() { src(){
if (this.autograph.data && this.autograph.data.signSrcUrl) { if (this.autograph.data && this.autograph.data.signSrcUrl){
return this.autograph.data.signSrcUrl; return this.autograph.data.signSrcUrl
} }
}, }
}, }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
.sealAgreement { .sealAgreement{
display: flex; display: flex;
align-items: center; align-items: center;
margin: 30rpx; margin: 30rpx;
font-size: 32rpx; font-size: 32rpx;
.agreement { .agreement{
color: #007aff; color: #007AFF;
} }
::v-deep .uni-checkbox-input { /deep/ .uni-checkbox-input{
border-radius: 22px !important; border-radius: 22px!important;
} }
} }
.nocheck { .nocheck {
opacity: 0.3; opacity: 0.3;
} }
.bottombtn { .bottombtn {
background-color: #1b66ff; background-color: #1B66FF;
color: #fff; color: #fff;
text-align: center; text-align: center;
border-radius: 10rpx; border-radius: 10rpx;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 32rpx; font-size: 32rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
} }
.btn {
background-color: #fefefe;
padding: 70rpx 80rpx;
}
.sealBox{
background-color: #FFFFFF;
padding: 0 15px 0 15px;
.name{
font-size: 32rpx;
font-weight: 400;
color: #333333;
line-height: 45rpx;
.btn { }
background-color: #fefefe; .listRight {
padding: 70rpx 80rpx; display: flex;
} align-items: center;
.sealBox { justify-content: space-between;
background-color: #ffffff; font-family: PingFangSC-Regular;
padding: 0 15px 0 15px; font-size: 28rpx;
.name { color: #999999;
font-size: 32rpx; }
font-weight: 400;
color: #333333; .listRight image {
line-height: 45rpx; width: 40rpx;
} height: 40rpx;
.listRight { margin-left: 15rpx;
display: flex; }
align-items: center; .list {
justify-content: space-between; display: flex;
font-family: PingFangSC-Regular; align-items: center;
font-size: 28rpx; justify-content: space-between;
color: #999999; font-family: PingFangSC-Regular;
} font-size: 32rpx;
color: #333333;
.listRight image { height: 88rpx;
width: 40rpx; }
height: 40rpx; .sealContent{
margin-left: 15rpx; background: #F6F6F6;
} padding: 16rpx;
.list { margin-top: 14rpx;
display: flex; position:relative;
align-items: center; .img{
justify-content: space-between; width: 100%;
font-family: PingFangSC-Regular; height: 312rpx;
font-size: 32rpx; background-color: #FFFFFF;
color: #333333; }
height: 88rpx; .contentFont{
} height: 312rpx;
.sealContent { line-height: 312rpx;
background: #f6f6f6; font-size: 30rpx;
padding: 16rpx; color: #999999;
margin-top: 14rpx; background: #FFFFFF;
position: relative; text-align: center;
.img { }
width: 100%; }
height: 312rpx; }
background-color: #ffffff;
}
.contentFont {
height: 312rpx;
line-height: 312rpx;
font-size: 30rpx;
color: #999999;
background: #ffffff;
text-align: center;
}
}
}
</style> </style>

View File

@@ -54,7 +54,7 @@
</view> </view>
</view> </view>
<!-- 技能标签 end --> <!-- 技能标签 end -->
<view v-if="info.jobSources" style="color: red" class="prolist">来源{{ info.jobSources || '暂无' }}</view> <view v-if="info.jobSources" class="prolist">来源{{ info.jobSources || '暂无' }}</view>
</view> </view>
<view class="head"> <view class="head">
<view style="display: flex; align-items: center"> <view style="display: flex; align-items: center">

View File

@@ -59,7 +59,7 @@
</view> </view>
</view> </view>
<!-- 技能标签 end --> <!-- 技能标签 end -->
<view v-if="info.jobSources" style="color: red" class="prolist">来源{{ info.jobSources || '暂无' }}</view> <view v-if="info.jobSources" class="prolist">来源{{ info.jobSources || '暂无' }}</view>
</view> </view>
<view class="head"> <view class="head">
<!-- <view class="proname proneed"> <!-- <view class="proname proneed">

View File

@@ -13,9 +13,7 @@
行业类型{{ info.tradeNames ? info.tradeNames : info.jobCompanyIndustry || '暂无' }} 行业类型{{ info.tradeNames ? info.tradeNames : info.jobCompanyIndustry || '暂无' }}
</view> </view>
<view class="prolist">岗位工种{{ info.skillNames || '暂无' }}</view> <view class="prolist">岗位工种{{ info.skillNames || '暂无' }}</view>
<view class="prolist"> <view class="prolist">参考工资{{info.wage}}{{info.wageUpper}}{{wageUnit[info.wageUnitCategory]}}</view>
参考工资{{ info.wage }}{{ info.wageUpper }}{{ wageUnit[info.wageUnitCategory] }}
</view>
<!-- <view class="fee"> <!-- <view class="fee">
{{info.wage}}{{wageUnit[info.wageUnitCategory]}} {{info.wage}}{{wageUnit[info.wageUnitCategory]}}
</view> --> </view> -->
@@ -51,7 +49,7 @@
</view> </view>
</view> </view>
<!-- 技能标签 end --> <!-- 技能标签 end -->
<view v-if="info.jobSources" style="color: red" class="prolist">来源{{ info.jobSources || '暂无' }}</view> <view v-if="info.jobSources" class="prolist">来源{{ info.jobSources || '暂无' }}</view>
</view> </view>
<view class="head"> <view class="head">
<!-- <view class="proname proneed"> <!-- <view class="proname proneed">
@@ -191,11 +189,7 @@
</view> </view>
<view style="text-align: center; font-size: 28rpx; margin-top: 30rpx"> <view style="text-align: center; font-size: 28rpx; margin-top: 30rpx">
{{ info.callName || '联系人 ' }} : {{ info.callName || '联系人 ' }} :
<span <span style="color: blue" v-if="info.callNumber" @click="tools.onDialingPhoneNumber(info.callNumber)">
style="color: blue"
v-if="info.callNumber"
@click="tools.onDialingPhoneNumber(info.callNumber)"
>
{{ info.callNumber }} {{ info.callNumber }}
</span> </span>
<span style="color: #333333" v-else>无联系方式</span> <span style="color: #333333" v-else>无联系方式</span>

File diff suppressed because it is too large Load Diff

View File

@@ -38,7 +38,7 @@
</view> </view>
</view> </view>
<!-- 技能标签 end --> <!-- 技能标签 end -->
<view v-if="info.jobSources" style="color: red" class="prolist">来源{{ info.jobSources }}</view> <view v-if="info.jobSources" class="prolist">来源{{ info.jobSources }}</view>
</view> </view>
<view class="head"> <view class="head">
<!-- <view class="proname proneed"> <!-- <view class="proname proneed">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
static/img/title-pg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -10,7 +10,7 @@ export default {
}) !== false, }) !== false,
homeTitle: getStore({ homeTitle: getStore({
name: 'homeTitle' name: 'homeTitle'
}) || '德阳市智慧就业服务平台' }) || '石河子智慧就业服务平台'
}, },
actions: {}, actions: {},
mutations: { mutations: {

View File

@@ -1,332 +1,363 @@
<template> <template>
<view <view
class="custom-tree-select-content" class="custom-tree-select-content"
:class="{ :class="{
border: border && node[dataChildren] && node[dataChildren].length && node.showChildren, border:
}" border &&
:style="{ marginLeft: `${level ? 14 : 0}px` }" node[dataChildren] &&
> node[dataChildren].length &&
<view v-if="node.visible" class="custom-tree-select-item"> node.showChildren
<view class="item-content"> }"
<view class="left"> :style="{ marginLeft: `${level ? 14 : 0}px` }"
<view >
v-if="node[dataChildren] && node[dataChildren].length" <view v-if="node.visible" class="custom-tree-select-item">
:class="['right-icon', { active: node.showChildren }]" <view class="item-content">
@click.stop="nameClick(node)" <view class="left">
> <view
<uni-icons type="forward" size="14" color="#333"></uni-icons> v-if="node[dataChildren] && node[dataChildren].length"
</view> :class="['right-icon', { active: node.showChildren }]"
<view v-else class="smallcircle-filled"> @click.stop="nameClick(node)"
<uni-icons >
class="smallcircle-filled-icon" <uni-icons type="forward" size="14" color="#333"></uni-icons>
type="smallcircle-filled" </view>
size="10" <view v-else class="smallcircle-filled">
color="#333" <uni-icons
></uni-icons> class="smallcircle-filled-icon"
</view> type="smallcircle-filled"
<view v-if="loadingArr.includes(node[dataValue])" class="loading-icon-box"> size="10"
<uni-icons class="loading-icon" type="spinner-cycle" size="14" color="#333"></uni-icons> color="#333"
</view> ></uni-icons>
<view class="name" :style="node.disabled ? 'color: #999' : ''" @click.stop="nameClick(node)"> </view>
<text>{{ node[dataLabel] }}</text> <view
</view> v-if="loadingArr.includes(node[dataValue])"
</view> class="loading-icon-box"
<view >
v-if=" <uni-icons
choseParent || class="loading-icon"
(!choseParent && !node[dataChildren]) || type="spinner-cycle"
(!choseParent && node[dataChildren] && !node[dataChildren].length) size="14"
" color="#333"
:class="['check-box', { disabled: node.disabled }]" ></uni-icons>
@click.stop="nodeClick(node)" </view>
> <view
<view v-if="!node.checked && node.partChecked && linkage" class="part-checked"></view> class="name"
<uni-icons :style="node.disabled ? 'color: #999' : ''"
v-if="node.checked" @click.stop="nameClick(node)"
type="checkmarkempty" >
size="18" <text>{{ node[dataLabel] }}</text>
:color="node.disabled ? '#333' : '#007aff'" </view>
></uni-icons> </view>
</view> <view
</view> v-if="
</view> choseParent ||
<view v-if="node.showChildren && node[dataChildren] && node[dataChildren].length"> (!choseParent && !node[dataChildren]) ||
<data-select-item (!choseParent && node[dataChildren] && !node[dataChildren].length)
v-for="item in listData" "
:key="item[dataValue]" :class="['check-box', { disabled: node.disabled }]"
:node="item" @click.stop="nodeClick(node)"
:dataLabel="dataLabel" >
:dataValue="dataValue" <view
:dataChildren="dataChildren" v-if="!node.checked && node.partChecked && linkage"
:choseParent="choseParent" class="part-checked"
:border="border" ></view>
:linkage="linkage" <uni-icons
:level="level + 1" v-if="node.checked"
:load="load" type="checkmarkempty"
:lazyLoadChildren="lazyLoadChildren" size="18"
></data-select-item> :color="node.disabled ? '#333' : '#007aff'"
</view> ></uni-icons>
</view> </view>
</template> </view>
</view>
<script> <view
import dataSelectItem from './data-select-item.vue'; v-if="
import { paging } from './utils'; node.showChildren && node[dataChildren] && node[dataChildren].length
export default { "
name: 'data-select-item', >
components: { <data-select-item
'data-select-item': dataSelectItem, v-for="item in listData"
}, :key="item[dataValue]"
props: { :node="item"
node: { :dataLabel="dataLabel"
type: Object, :dataValue="dataValue"
default: () => ({}), :dataChildren="dataChildren"
}, :choseParent="choseParent"
choseParent: { :border="border"
type: Boolean, :linkage="linkage"
default: true, :level="level + 1"
}, :load="load"
dataLabel: { :lazyLoadChildren="lazyLoadChildren"
type: String, ></data-select-item>
default: 'name', </view>
}, </view>
dataValue: { </template>
type: String,
default: 'value', <script>
}, import dataSelectItem from './data-select-item.vue'
dataChildren: { import { paging } from './utils'
type: String, export default {
default: 'children', name: 'data-select-item',
}, components: {
border: { 'data-select-item': dataSelectItem
type: Boolean, },
default: false, props: {
}, node: {
linkage: { type: Object,
type: Boolean, default: () => ({})
default: false, },
}, choseParent: {
level: { type: Boolean,
type: Number, default: true
default: 0, },
}, dataLabel: {
load: { type: String,
type: Function, default: 'name'
default: function () {}, },
}, dataValue: {
lazyLoadChildren: { type: String,
type: Boolean, default: 'value'
default: false, },
}, dataChildren: {
}, type: String,
data() { default: 'children'
return { },
listData: [], border: {
clearTimerList: [], type: Boolean,
loadingArr: [], default: false
}; },
}, linkage: {
computed: { type: Boolean,
watchData() { default: false
const { node, dataChildren } = this; },
level: {
return { type: Number,
node, default: 0
dataChildren, },
}; load: {
}, type: Function,
}, default: function () {}
watch: { },
watchData: { lazyLoadChildren: {
immediate: true, type: Boolean,
handler(newVal) { default: false
const { node, dataChildren } = newVal; }
if (node.showChildren && node[dataChildren] && node[dataChildren].length) { },
this.resetClearTimerList(); data() {
this.renderTree(node[dataChildren]); return {
} listData: [],
}, clearTimerList: [],
}, loadingArr: []
}, }
methods: { },
// 懒加载 computed: {
renderTree(arr) { watchData() {
const pagingArr = paging(arr); const { node, dataChildren } = this
this.listData.splice(0, this.listData.length, ...(pagingArr?.[0] || []));
this.lazyRenderList(pagingArr, 1); return {
}, node,
// 懒加载具体逻辑 dataChildren
lazyRenderList(arr, startIndex) { }
for (let i = startIndex; i < arr.length; i++) { }
let timer = null; },
timer = setTimeout(() => { watch: {
this.listData.push(...arr[i]); watchData: {
}, i * 500); immediate: true,
this.clearTimerList.push(() => clearTimeout(timer)); handler(newVal) {
} const { node, dataChildren } = newVal
}, if (
// 中断懒加载 node.showChildren &&
resetClearTimerList() { node[dataChildren] &&
const list = [...this.clearTimerList]; node[dataChildren].length
this.clearTimerList.splice(0, this.clearTimerList.length); ) {
list.forEach((item) => item()); this.resetClearTimerList()
}, this.renderTree(node[dataChildren])
async nameClick(node) { }
if (!node[this.dataChildren]?.length && this.lazyLoadChildren) { }
this.loadingArr.push(node[this.dataValue]); }
try { },
const res = await this.load(node); methods: {
if (Array.isArray(res)) { // 懒加载
uni.$emit('custom-tree-select-load', { renderTree(arr) {
source: node, const pagingArr = paging(arr)
target: res, this.listData.splice(0, this.listData.length, ...(pagingArr?.[0] || []))
}); this.lazyRenderList(pagingArr, 1)
} },
} finally { // 懒加载具体逻辑
this.loadingArr = []; lazyRenderList(arr, startIndex) {
} for (let i = startIndex; i < arr.length; i++) {
} else { let timer = null
if (!node.showChildren && node[this.dataChildren] && node[this.dataChildren].length) { timer = setTimeout(() => {
// 打开 this.listData.push(...arr[i])
this.renderTree(node[this.dataChildren]); }, i * 500)
} else { this.clearTimerList.push(() => clearTimeout(timer))
// 关闭 }
this.resetClearTimerList(); },
this.listData.splice(0, this.listData.length); // 中断懒加载
} resetClearTimerList() {
uni.$emit('custom-tree-select-name-click', node); const list = [...this.clearTimerList]
} this.clearTimerList.splice(0, this.clearTimerList.length)
}, list.forEach((item) => item())
nodeClick(node) { },
if (!node.disabled) { async nameClick(node) {
uni.$emit('custom-tree-select-node-click', node); if (!node[this.dataChildren]?.length && this.lazyLoadChildren) {
} this.loadingArr.push(node[this.dataValue])
}, try {
}, const res = await this.load(node)
options: { if (Array.isArray(res)) {
styleIsolation: 'shared', uni.$emit('custom-tree-select-load', {
}, source: node,
}; target: res
</script> })
}
<style lang="scss" scoped> } finally {
* { this.loadingArr = []
margin: 0; }
padding: 0; } else {
box-sizing: border-box; if (
} !node.showChildren &&
node[this.dataChildren] &&
$primary-color: #007aff; node[this.dataChildren].length
$col-sm: 4px; ) {
$col-base: 8px; // 打开
$col-lg: 12px; this.renderTree(node[this.dataChildren])
$row-sm: 5px; } else {
$row-base: 10px; // 关闭
$row-lg: 15px; this.resetClearTimerList()
$radius-sm: 3px; this.listData.splice(0, this.listData.length)
$radius-base: 6px; }
$border-color: #c8c7cc; uni.$emit('custom-tree-select-name-click', node)
}
.custom-tree-select-content { },
&.border { nodeClick(node) {
border-left: 1px solid $border-color; if (!node.disabled) {
} uni.$emit('custom-tree-select-node-click', node)
}
::v-deep .uni-checkbox-input { }
margin: 0 !important; },
} options: {
styleIsolation: 'shared'
.item-content { }
margin: 0 0 $col-lg; }
display: flex; </script>
justify-content: space-between;
align-items: center; <style lang="scss" scoped>
position: relative; * {
margin: 0;
&::after { padding: 0;
content: ''; box-sizing: border-box;
position: absolute; }
top: 0;
left: 0; $primary-color: #007aff;
bottom: 0; $col-sm: 4px;
width: 3px; $col-base: 8px;
background-color: #fff; $col-lg: 12px;
transform: translateX(-2px); $row-sm: 5px;
z-index: 1; $row-base: 10px;
} $row-lg: 15px;
$radius-sm: 3px;
.left { $radius-base: 6px;
flex: 1; $border-color: #c8c7cc;
display: flex;
align-items: center; .custom-tree-select-content {
&.border {
.right-icon { border-left: 1px solid $border-color;
transition: 0.15s ease; }
&.active { /deep/ .uni-checkbox-input {
transform: rotate(90deg); margin: 0 !important;
} }
}
.item-content {
.smallcircle-filled { margin: 0 0 $col-lg;
width: 14px; display: flex;
height: 13.6px; justify-content: space-between;
display: flex; align-items: center;
align-items: center; position: relative;
.smallcircle-filled-icon { &::after {
transform-origin: center; content: '';
transform: scale(0.55); position: absolute;
} top: 0;
} left: 0;
bottom: 0;
.loading-icon-box { width: 3px;
margin-right: $row-sm; background-color: #fff;
width: 14px; transform: translateX(-2px);
height: 100%; z-index: 1;
display: flex; }
justify-content: center;
align-items: center; .left {
flex: 1;
.loading-icon { display: flex;
transform-origin: center; align-items: center;
animation: rotating infinite 0.2s ease;
} .right-icon {
} transition: 0.15s ease;
.name { &.active {
flex: 1; transform: rotate(90deg);
} }
} }
}
} .smallcircle-filled {
width: 14px;
.check-box { height: 13.6px;
width: 23.6px; display: flex;
height: 23.6px; align-items: center;
border: 1px solid $border-color;
border-radius: $radius-sm; .smallcircle-filled-icon {
display: flex; transform-origin: center;
justify-content: center; transform: scale(0.55);
align-items: center; }
}
&.disabled {
background-color: rgb(225, 225, 225); .loading-icon-box {
} margin-right: $row-sm;
width: 14px;
.part-checked { height: 100%;
width: 60%; display: flex;
height: 2px; justify-content: center;
background-color: $primary-color; align-items: center;
}
} .loading-icon {
transform-origin: center;
@keyframes rotating { animation: rotating infinite 0.2s ease;
from { }
transform: rotate(0); }
}
to { .name {
transform: rotate(360deg); flex: 1;
} }
} }
</style> }
}
.check-box {
width: 23.6px;
height: 23.6px;
border: 1px solid $border-color;
border-radius: $radius-sm;
display: flex;
justify-content: center;
align-items: center;
&.disabled {
background-color: rgb(225, 225, 225);
}
.part-checked {
width: 60%;
height: 2px;
background-color: $primary-color;
}
}
@keyframes rotating {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
</style>

View File

@@ -8,18 +8,17 @@ module.exports = {
'/api': { '/api': {
// target: 'http://10.165.0.173:8000', // target: 'http://10.165.0.173:8000',
// target: 'http://192.168.1.115:8000', // target: 'http://192.168.1.115:8000',
target: 'http://39.98.44.136:6013', // target: 'http://39.98.44.136:6013',
target: 'http://36.105.163.21:30081',
ws: true, ws: true,
changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/api'
} }
}, },
'/qq/map': { '/qq/map': {
//本地服务接口地址 //本地服务接口地址
target: 'https://apis.map.qq.com', target: 'https://apis.map.qq.com',
ws: true, ws: true,
changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/qq/map': '/' '^/qq/map': '/'
} }