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;
background-color: #fefefe;
// border-bottom: 1rpx solid #dddddd;
border-bottom: 0;
}
.active { .active{
border-radius: 0 !important; border-radius: 0 !important;
.bottomborder { .bottomborder{
width: 42rpx; width: 42rpx;
height: 6rpx; height: 6rpx;
margin: 0 auto; margin: 0 auto;
background-color: #1b66ff; background-color: #1B66FF;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
display: block !important; display: block !important;
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
.v-tabs__item { .v-tabs__item {
// display: inline-flex; // display: inline-flex;
margin-right: 20upx; margin-right: 20upx;
transition: all 0.3s ease; transition: all 0.3s ease;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
}
} }
}
.v-tabs__line { .v-tabs__line {
position: absolute; position: absolute;
z-index: 99; z-index: 99;
transition: all 0.3s linear; transition: all 0.3s linear;
border-radius: 4upx; border-radius: 4upx;
} }
} }
::v-deep ::-webkit-scrollbar { /deep/ ::-webkit-scrollbar {
display: none; display: none;
} }
</style> </style>

View File

@@ -1,22 +1,22 @@
{ {
"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\"/>",
@@ -41,41 +41,41 @@
"<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

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

View File

@@ -7,26 +7,42 @@
<!-- <view class="prolist"> <!-- <view class="prolist">
任务编码{{info.missionNo}} 任务编码{{info.missionNo}}
</view> --> </view> -->
<view class="prolist">岗位日期{{ dateFormat(info.stime) }}{{ dateFormat(info.etime) }}</view> <view class="prolist">
岗位日期{{ dateFormat((info.stime)) }}{{ dateFormat((info.etime)) }}
</view>
<!-- <view class="prolist"> <!-- <view class="prolist">
报名截止{{dateFormat((info.etimePub))}} 报名截止{{dateFormat((info.etimePub))}}
</view> --> </view> -->
<view class="prolist">行业类型{{ info.tradeNames }}</view> <view class="prolist">
<view class="prolist">工种类型{{ info.worktypeNames }}</view> 行业类型{{ info.tradeNames }}
</view>
<view class="prolist">
工种类型{{ info.worktypeNames }}
</view>
<view class="fee"> <view class="fee">
{{ info.wage }} {{ info.wage }}
</view> </view>
</view> </view>
<view class="head"> <view class="head">
<view class="proname proneed">岗位要求</view> <view class="proname proneed">
<view class="prolist"> 岗位要求
<view class="protype">年龄要求{{ age[info.ageDesc] }}</view>
</view> </view>
<view class="prolist"> <view class="prolist">
<view class="protype">学历要求{{ education[info.education] }}</view> <view class="protype">
<view class="protype">经验要求{{ experience[info.experienceDesc] }}</view> 年龄要求{{ age[info.ageDesc] }}
</view>
</view>
<view class="prolist">
<view class="protype">
学历要求{{ education[info.education] }}
</view>
<view class="protype">
经验要求{{ experience[info.experienceDesc] }}
</view>
</view>
<view class="prolist proint" style="font-weight: bold;color:#333;">
任务描述
</view> </view>
<view class="prolist proint" style="font-weight: bold; color: #333">任务描述</view>
<view class="prolist description"> <view class="prolist description">
{{ info.missionDesc }} {{ info.missionDesc }}
</view> </view>
@@ -37,17 +53,25 @@
</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> <view class="proname proneed">
用工单位信息
</view>
<view class="prolist"> <view class="prolist">
{{ info.companyName }} {{ info.companyName }}
</view> </view>
<view class="prolist">用工单位地址{{ info.companyAddress }}</view> <view class="prolist">
用工单位地址{{ info.companyAddress }}
</view>
</view> </view>
<view class="head"> <view class="head">
<view class="proname proneed">地址</view> <view class="proname proneed">
地址
</view>
<!-- <view class="prolist"> <!-- <view class="prolist">
<view class="protype"> <view class="protype">
联系人{{info.callName}} 联系人{{info.callName}}
@@ -59,62 +83,48 @@
<view class="prolist" v-if="info.callNumber"> <view class="prolist" v-if="info.callNumber">
座机号{{info.callNumber}} 座机号{{info.callNumber}}
</view> --> </view> -->
<view class="prolist">任务地址{{ info.address }}</view> <view class="prolist">
任务地址{{ info.address }}
</view>
<view class="map"> <view class="map">
<super-map <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
ref="uMap" :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" :MapUrl="$config.supperMap"
style="width: 100%; height: 100%" :flag-tip="false"></super-map>
:latitude="latitude"
:longitude="longitude"
:open="true"
:zoom="14"
:min-zoom="10"
:max-zoom="20"
:MapUrl="$config.supperMap"
:flag-tip="false"
></super-map>
</view> </view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> --> <!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view> </view>
<view class="" style="height: 200rpx; background-color: #f6f6f6" v-if="isShow !== '0'"></view> <view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow !== '0'"></view>
<view class="btn"> <view class="btn">
<view
@click="callPhone" <view @click="callPhone" class="bottombtn flexbtn"
class="bottombtn flexbtn" style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;">
style="margin-right: 10rpx; background-color: #fbad17; border-radius: 45rpx"
>
查看申请列表 查看申请列表
</view> </view>
</view> </view>
<uniMask :maskShow="maskShow"> <uniMask :maskShow="maskShow">
<view class="contractMask"> <view class="contractMask">
<!-- #ifdef H5 || APP-PLUS --> <!-- #ifdef H5 || APP-PLUS -->
<view class="close" @click="close" style="top: 124rpx">+</view> <view class="close" @click="close" style="top: 124rpx;">+</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="close" @click="close">+</view> <view class="close" @click="close">+</view>
<!-- #endif --> <!-- #endif -->
<view style="height: 30px"></view> <view style="height: 30px;"></view>
<img :src="src" alt="" style="width: 100%; height: 1000px" /> <img :src="src" alt="" style="width:100%;height: 1000px;">
<view v-if="nextBtn" class="down" @click="next">下一步</view> <view v-if="nextBtn" class="down" @click="next">下一步</view>
</view> </view>
</uniMask> </uniMask>
<u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp"> <u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp">
<view style="min-height: 100rpx; padding: 60rpx 40rpx"> <view style="min-height: 100rpx;padding: 60rpx 40rpx;">
<view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index"> <view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index">
<view class="wrapperLeft"> <view class="wrapperLeft">
<view>{{ item.realName }} : {{ item.telphone }}</view> <view> {{ item.realName }} : {{ item.telphone }} </view>
<view>申请时间{{ item.applyTime }}</view> <view> 申请时间{{ item.applyTime }} </view>
</view> </view>
<view class="applyTime"> <view class="applyTime">
<!-- // 1申请中2申请通过3申请未通过--> <!-- // 1申请中2申请通过3申请未通过-->
<view <view class="btnGr" v-if="item.status === 1 ||item.status === 3"
class="btnGr" @click="changeWorkerStatus(item)">录用</view>
v-if="item.status === 1 || item.status === 3"
@click="changeWorkerStatus(item)"
>
录用
</view>
<view class="btnHuy" v-if="item.status === 2" @click="cancelWorkerStatus(item)">取消</view> <view class="btnHuy" v-if="item.status === 2" @click="cancelWorkerStatus(item)">取消</view>
</view> </view>
</view> </view>
@@ -124,7 +134,7 @@
<view v-else-if="showCode" class="codeSealBox"> <view v-else-if="showCode" class="codeSealBox">
<!-- #ifdef H5 || APP-PLUS --> <!-- #ifdef H5 || APP-PLUS -->
<view class="closeCode" @click="closeShowCode" style="top: 124rpx">+</view> <view class="closeCode" @click="closeShowCode" style="top: 124rpx;">+</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="closeCode" @click="closeShowCode">+</view> <view class="closeCode" @click="closeShowCode">+</view>
@@ -134,132 +144,142 @@
<view class="name">签名密码</view> <view class="name">签名密码</view>
<view class="tip">6位数字签名密码</view> <view class="tip">6位数字签名密码</view>
</view> </view>
<view style="height: 36px"></view> <view style="height: 36px;"></view>
<valid-code ref="validCode" @finish="getInpCode" :maxlength="maxlength"></valid-code> <valid-code ref="validCode" @finish="getInpCode" :maxlength="maxlength"></valid-code>
<view style="height: 36px"></view> <view style="height: 36px;"></view>
<view class="forget" @click="forget">忘记密码</view> <view class="forget" @click="forget">忘记密码</view>
</view> </view>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import {
import { recruit_missionDetail } from '@/api/mission.js'; mapGetters
import { GoLogin } from '@/untils/AxiosUtils.js'; } from 'vuex'
import { setRead, updataEmployedNew, cancelEmployed } from '@/api/news.js'; import {
import { checkPass } from '@/api/auth.js'; recruit_missionDetail
import dictionary from '@/common/textdata.js'; } from '@/api/mission.js';
import { dateFormat } from '../../../../untils/format.js'; import {
import uniMask from '@/components/uni-mask/mask.vue'; GoLogin
import uniPopup from '@/components/uni-popup/uni-popup.vue'; } from '@/untils/AxiosUtils.js';
import validCode from '@/components/p-valid-code/p-valid-code.vue'; import {
export default { setRead,
data() { updataEmployedNew,
return { cancelEmployed
...dictionary, } from '@/api/news.js';
info: {}, import {
status: null, checkPass
showDetail: false, } from '@/api/auth.js';
showCode: false, import dictionary from '@/common/textdata.js';
maskShow: false, import {
nextBtn: false, dateFormat
loading: false, } from "../../../../untils/format.js";
latitude: 39.909, //中心点 import uniMask from '@/components/uni-mask/mask.vue'
longitude: 116.39742, import uniPopup from '@/components/uni-popup/uni-popup.vue'
covers: [ import validCode from '@/components/p-valid-code/p-valid-code.vue'
{ export default {
//marker标记位置 data() {
return {
...dictionary,
info: {},
status: null,
showDetail: false,
showCode: false,
maskShow: false,
nextBtn: false,
loading: false,
latitude: 39.909, //中心点
longitude: 116.39742,
covers: [{ //marker标记位置
id: 0, id: 0,
latitude: 0, latitude: 0,
longitude: 0, longitude: 0,
// width:30, // width:30,
// height:30, // height:30,
iconPath: '../../../../static/img/location.png', iconPath: '../../../../static/img/location.png'
}, }],
], missionNo: "",
missionNo: '', isShow: '',
isShow: '', type: '',
type: '', id: '',
id: '', src: 'https://jlfiles.oss-cn-zhangjiakou.aliyuncs.com/jobslink-api/doc/%E7%94%B5%E5%AD%90%E5%90%88%E5%90%8C%E9%A2%84%E8%A7%88%E5%9B%BE%E7%89%87.png',
src: 'https://jlfiles.oss-cn-zhangjiakou.aliyuncs.com/jobslink-api/doc/%E7%94%B5%E5%AD%90%E5%90%88%E5%90%8C%E9%A2%84%E8%A7%88%E5%9B%BE%E7%89%87.png', maxlength: 6,
maxlength: 6, collectStatus: 0, // 收藏状态
collectStatus: 0, // 收藏状态 showPopUp: false,
showPopUp: false,
};
},
components: {
uniMask,
validCode,
uniPopup,
},
onLoad: function (option) {
//option为object类型会序列化上个页面传递的参数
// this.$store.dispatch('setAutograph')
if (option.missionNo) {
this.missionNo = decodeURIComponent(option.missionNo);
}
if (option.isCan) {
this.isShow = option.isCan; //isShow为'0'则为我的任务、我的评价过来的,需要隐藏抢任务按钮
}
if (option.type) {
this.type = option.type; //type为1则为消息邀请过来的,需要设置消息已读;
}
if (option.id) {
this.id = option.id; //消息id
}
},
onShow: function () {
this.showDetail = true;
this.getData();
},
onShareAppMessage(obj) {
return {
title: this.info.missionTitle,
path: `/pages/projectInfo/projectInfo?missionNo=${this.info.missionNo}`,
};
},
methods: {
dateFormat,
async cancelWorkerStatus(item) {
let params = {
missionNo: this.info.missionNo,
ids: item.id,
};
uni.showLoading({
title: '请稍后',
});
let resData = await cancelEmployed(params);
uni.hideLoading();
if (resData.data.code === 200) {
this.$api.msg('操作成功');
this.getData();
} }
}, },
async changeWorkerStatus(item) { components: {
let params = { uniMask,
missionNo: this.info.missionNo, validCode,
ids: item.id, uniPopup
}; },
uni.showLoading({ onLoad: function(option) { //option为object类型会序列化上个页面传递的参数
title: '请稍后', // this.$store.dispatch('setAutograph')
}); if (option.missionNo) {
let resData = await updataEmployedNew(params); this.missionNo = decodeURIComponent(option.missionNo);
uni.hideLoading(); }
if (resData.data.code === 200) { if (option.isCan) {
this.$api.msg('操作成功'); this.isShow = option.isCan; //isShow为'0'则为我的任务、我的评价过来的,需要隐藏抢任务按钮
this.getData(); }
if (option.type) {
this.type = option.type; //type为1则为消息邀请过来的,需要设置消息已读;
}
if (option.id) {
this.id = option.id; //消息id
} }
}, },
callPhone() { onShow: function() {
this.showPopUp = true; this.showDetail = true
this.getData();
}, },
closePopUp() { onShareAppMessage(obj) {
this.showPopUp = false; return {
title: this.info.missionTitle,
path: `/pages/projectInfo/projectInfo?missionNo=${this.info.missionNo}`
}
}, },
getData: function () { methods: {
const self = this; dateFormat,
// missionDetail(self.missionNo).then(res => { async cancelWorkerStatus(item) {
recruit_missionDetail(self.missionNo, self.type).then( let params = {
(res) => { missionNo: this.info.missionNo,
ids: item.id
}
uni.showLoading({
title: '请稍后'
})
let resData = await cancelEmployed(params)
uni.hideLoading()
if (resData.data.code === 200) {
this.$api.msg('操作成功')
this.getData();
}
},
async changeWorkerStatus(item) {
let params = {
missionNo: this.info.missionNo,
ids: item.id
}
uni.showLoading({
title: '请稍后'
})
let resData = await updataEmployedNew(params)
uni.hideLoading()
if (resData.data.code === 200) {
this.$api.msg('操作成功')
this.getData();
}
},
callPhone() {
this.showPopUp = true;
},
closePopUp() {
this.showPopUp = false;
},
getData: function() {
const self = this;
// missionDetail(self.missionNo).then(res => {
recruit_missionDetail(self.missionNo, self.type).then(res => {
self.info = res.data.data; self.info = res.data.data;
self.status = res.data.data.detailStatus; self.status = res.data.data.detailStatus;
self.latitude = self.info.lat; self.latitude = self.info.lat;
@@ -269,301 +289,301 @@ export default {
self.showDetail = true; self.showDetail = true;
if (self.type === 1) { if (self.type === 1) {
// 设置已读 // 设置已读
setRead(self.id).then((res) => { setRead(self.id).then(res => {
self.$store.commit('SET_READ'); self.$store.commit("SET_READ");
}); })
} }
}, }, error => {
(error) => {
console.log(error); console.log(error);
}
);
},
// 查看合同
lookMask() {
this.maskShow = true;
},
// 关闭弹窗
close() {
this.maskShow = false;
},
// 合同下一步
next() {
this.maskShow = false;
this.showDetail = false;
this.showCode = true;
},
// 输入签名密码
getInpCode(password) {
uni.showLoading({
title: '请求中...',
});
this.loading = true;
var obj = {
pass: password,
};
checkPass(obj)
.then((res) => {
this.closeShowCode();
})
.catch((err) => {
this.loading = false;
}); });
}, },
// 关闭签名密码弹窗 // 查看合同
closeShowCode() { lookMask() {
this.showCode = false; this.maskShow = true
this.showDetail = true; },
}, // 关闭弹窗
// 忘记密码 close() {
forget() { this.maskShow = false
uni.navigateTo({ },
url: `/pageMy/setUserBase/seal/forget?forget=true`, // 合同下一步
}); next() {
}, this.maskShow = false
}, this.showDetail = false
computed: { this.showCode = true
...mapGetters(['auth', 'autograph']), },
skillNames() { // 输入签名密码
if (this.info.skillNames) { getInpCode(password) {
return this.info.skillNames.split(','); uni.showLoading({
title: "请求中..."
})
this.loading = true
var obj = {
pass: password
}
checkPass(obj).then(res => {
this.closeShowCode()
}).catch(err => {
this.loading = false
})
},
// 关闭签名密码弹窗
closeShowCode() {
this.showCode = false
this.showDetail = true
},
// 忘记密码
forget() {
uni.navigateTo({
url: `/pageMy/setUserBase/seal/forget?forget=true`
})
} }
}, },
}, computed: {
}; ...mapGetters(['auth', 'autograph']),
skillNames() {
if (this.info.skillNames) {
return this.info.skillNames.split(',')
}
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
.codeSealBox { .codeSealBox {
padding: 285rpx 72rpx 0 72rpx; padding: 285rpx 72rpx 0 72rpx;
.closeCode {
position: absolute;
right: 36rpx;
top: 120rpx;
color: #1B66FF;
transform: rotate(45deg);
font-size: 40px;
}
.title {
display: flex;
align-items: center;
}
.name {
height: 46rpx;
font-size: 46rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 46rpx;
margin-right: 28rpx;
}
.tip {
height: 38rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 38rpx;
}
.forget {
height: 38rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #5AA0FA;
line-height: 38rpx;
text-align: right;
}
.closeCode {
position: absolute;
right: 36rpx;
top: 120rpx;
color: #1b66ff;
transform: rotate(45deg);
font-size: 40px;
} }
.title { .contractMask {
display: flex; background-color: #FFFFFF;
align-items: center; margin: 30rpx;
position: relative;
border-radius: 4px;
height: 96%;
overflow: auto;
.close {
width: 23px;
height: 23px;
color: #1B66FF;
position: fixed;
right: 60rpx;
top: 60rpx;
transform: rotate(45deg);
font-size: 40px;
}
.down {
position: fixed;
bottom: 30px;
left: 14%;
width: 545rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #1B66FF;
font-size: 36rpx;
font-weight: 400;
color: #FFFFFF;
}
} }
.name { .lookContract {
height: 46rpx; width: 30%;
font-size: 46rpx; margin-right: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 46rpx;
margin-right: 28rpx;
} }
.tip { .flexbtn {
height: 38rpx; flex: 1;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 38rpx;
} }
.forget { .bottombtn {
height: 38rpx; background-color: #1B66FF;
font-size: 28rpx; color: #fff;
font-family: PingFangSC-Regular, PingFang SC; text-align: center;
font-weight: 400; border-radius: 10rpx;
color: #5aa0fa; font-family: PingFangSC-Medium;
line-height: 38rpx; font-size: 32rpx;
text-align: right;
}
}
.contractMask {
background-color: #ffffff;
margin: 30rpx;
position: relative;
border-radius: 4px;
height: 96%;
overflow: auto;
.close {
width: 23px;
height: 23px;
color: #1b66ff;
position: fixed;
right: 60rpx;
top: 60rpx;
transform: rotate(45deg);
font-size: 40px;
}
.down {
position: fixed;
bottom: 30px;
left: 14%;
width: 545rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
text-align: center;
background: #1b66ff;
font-size: 36rpx;
font-weight: 400;
color: #ffffff;
} }
}
.lookContract { .btn {
width: 30%; background-color: #fefefe;
margin-right: 30rpx; width: 690rpx;
} padding: 30rpx;
padding-bottom: 80rpx;
position: fixed;
bottom: 0;
left: 0;
display: flex;
}
.flexbtn { .disabledBtn {
flex: 1; background-color: #c8c9cc;
} }
.bottombtn { .map {
background-color: #1b66ff; width: 100%;
color: #fff; height: 350rpx;
text-align: center; margin-top: 30rpx;
border-radius: 10rpx; }
font-family: PingFangSC-Medium;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
}
.btn { .askList {
background-color: #fefefe; font-family: PingFangSC-Regular;
width: 690rpx; font-size: 24rpx;
padding: 30rpx; color: #666666;
padding-bottom: 80rpx; background-color: #f6f6f6;
position: fixed; padding: 5rpx 15rpx;
bottom: 0; margin-right: 10rpx;
left: 0; margin-top: 15rpx;
display: flex; }
}
.disabledBtn { .ask {
background-color: #c8c9cc; overflow: hidden;
} width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx 0;
.map { }
width: 100%;
height: 350rpx;
margin-top: 30rpx;
}
.askList { .proint {
font-family: PingFangSC-Regular; margin-top: 30rpx;
font-size: 24rpx; font-size: 30rpx !important;
color: #666666; }
background-color: #f6f6f6;
padding: 5rpx 15rpx;
margin-right: 10rpx;
margin-top: 15rpx;
}
.ask { .proneed {
overflow: hidden; font-size: 32rpx !important;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx 0;
}
.proint { }
margin-top: 30rpx;
font-size: 30rpx !important;
}
.proneed { .fee {
font-size: 32rpx !important; font-family: PingFangSC-Medium;
} font-size: 32rpx;
color: #F46161;
margin-top: 30rpx;
}
.fee { .protype {
font-family: PingFangSC-Medium; width: 50%;
font-size: 32rpx; }
color: #f46161;
margin-top: 30rpx;
}
.protype { .prolist {
width: 50%; font-family: PingFangSC-Regular;
} font-size: 28rpx;
color: #666666;
display: flex;
align-items: center;
justify-content: space-between;
text-align: left;
padding: 5rpx 0;
}
.prolist { .proname {
font-family: PingFangSC-Regular; font-weight: bold;
font-size: 28rpx; font-family: PingFangSC-Medium;
color: #666666; font-size: 40rpx;
display: flex; color: #333333;
align-items: center; width: 90%;
justify-content: space-between; overflow: hidden;
text-align: left; padding-bottom: 20rpx;
padding: 5rpx 0; }
}
.proname { .head {
font-weight: bold; padding: 30rpx;
font-family: PingFangSC-Medium; background: #fefefe;
font-size: 40rpx; border-bottom: 20rpx solid #f6f6f6;
color: #333333; }
width: 90%;
overflow: hidden;
padding-bottom: 20rpx;
}
.head { .description {
padding: 30rpx; word-break: break-all;
background: #fefefe; white-space: pre-line;
border-bottom: 20rpx solid #f6f6f6; }
}
.description { .contactWrapper {
word-break: break-all; box-sizing: border-box;
white-space: pre-line; text-align: center;
} font-size: 28rpx;
margin-top: 10rpx;
border: 1px solid #e0e0e0;
border-radius: 5px;
padding: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
.contactWrapper { }
box-sizing: border-box;
text-align: center;
font-size: 28rpx;
margin-top: 10rpx;
border: 1px solid #e0e0e0;
border-radius: 5px;
padding: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.applyTime { .applyTime {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
} }
.wrapperLeft { .wrapperLeft {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
} }
.btnGr { .btnGr {
background-color: green; background-color: green;
color: #ffffff; color: #FFFFFF;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
border-radius: 5rpx; border-radius: 5rpx;
} }
.btnHuy { .btnHuy {
background-color: #e8e8e8; background-color: #e8e8e8;
color: #ffffff; color: #FFFFFF;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
border-radius: 5rpx; border-radius: 5rpx;
} }
</style> </style>

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