flat: 地图对接

This commit is contained in:
Apcallover
2024-05-15 16:16:35 +08:00
parent 0adca5ebc7
commit 20bcc1cbce
17 changed files with 4192 additions and 1113 deletions

View File

@@ -0,0 +1,383 @@
<template>
<view class="app-content">
<view id="map" style="width: 100%;height: 100%;"></view>
</view>
</template>
<script>
import 'ol/ol.css';
import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import SourceVector from 'ol/source/Vector';
import LayerVector from 'ol/layer/Vector';
import * as control from 'ol/control';
import {
toLonLat
} from 'ol/proj';
import Overlay from 'ol/Overlay';
import {
toStringHDMS
} from 'ol/coordinate';
import {
Select
} from 'ol/interaction'
import {
GeoJSON
} from 'ol/format';
import {
Style,
Circle,
Fill,
Stroke,
Icon,
Text
} from 'ol/style';
import Feature from 'ol/Feature';
import {
Point,
Polygon
} from 'ol/geom';
import {
Logo,
TileSuperMapRest,
FeatureService,
GetFeaturesByGeometryParameters
} from '@supermap/iclient-ol';
let mypoint = require('@/static/img/mypoint.png');
export default {
name: "uMapView",
props: {
latitude: {
required: true,
},
longitude: {
required: true,
},
zoom: {
type: Number,
required: false,
default: 10,
},
maxZoom: {
type: Number,
required: false,
default: 20,
},
minZoom: {
type: Number,
required: false,
default: 0,
},
ScaleZoom: {
type: Boolean,
required: false,
default: false,
},
MapUrl: { // 瓦片地图URL
type: String,
required: true,
default: '',
},
flagTip: {
type: Boolean,
required: false,
default: false,
},
open: {
type: Boolean,
required: false,
default: false,
}
},
data() {
return {
// 实例化对象
map: null,
addPointsSource: null,
vectorSource: null,
vectorSourceIcon: null,
vectorLayerIcon: null,
selectInteraction: null,
helpTooltipElement: null,
helpTooltip: null,
isclearPoint: null,
overlay: null,
// 控制参数
isShowToolTip: false,
};
},
mounted() {
this.initMap()
if (this.flagTip) {
this.createHelpTooltip()
}
},
methods: {
initMap() {
this.map = new Map({
target: 'map',
controls: control.defaults({
attribution: false,
zoom: this.ScaleZoom,
}),
layers: [
new TileLayer({ // 使用瓦片
source: new TileSuperMapRest({
url: this.MapUrl,
wrapX: true,
}),
projection: 'EPSG:4326',
}),
],
view: new View({
center: [this.longitude, this.latitude],
maxZoom: this.maxZoom,
minZoom: this.minZoom,
zoom: this.zoom,
projection: 'EPSG:4326',
})
});
//添加查询结果图层
this.vectorSource = new SourceVector({
wrapX: false
});
const resultLayer = new LayerVector({
source: this.vectorSource,
});
//添加点图层
this.addPointsSource = new SourceVector({
wrapX: false
});
const addPointsLayer = new LayerVector({
source: this.addPointsSource,
});
this.map.addLayer(addPointsLayer);
this.map.addLayer(resultLayer);
this.map.on('pointermove', (e) => {
if (this.isShowToolTip) {
this.helpTooltip.setPosition(undefined);
this.helpTooltipElement.classList.add('hidden');
}
this.$emit('regionchange', e.pixel)
});
this.map.on('singleclick', (e) => {
this.$emit('clickMap', this.coordinate)
});
if (this.open) {
this.addFeature([{
id: 1,
latitude: this.latitude,
longitude: this.longitude,
iconPath: mypoint,
title: '我的位置',
width: 20,
height: 20
}])
}
},
addMarker(point) {
console.log('point', point)
// this.ceateMarker([104.404419, 31.133980])
},
addFeature(covers) {
const features = covers.map((item) => ({
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [item.longitude, item.latitude],
},
properties: {
iconPath: item.iconPath,
text: item.title,
value: JSON.stringify(item),
scale: item.id === 1 ? [0.15, 0.15] : [0.1, 0.1]
}
}))
this.careateFeature(features)
},
ceateMarker(point) {
// 创建一个坐标点
const pointed = new Point(point); // 这里的[0, 0]应该替换为您的经度和纬度
// 创建一个特征
const pointFeature = new Feature({
geometry: pointed,
name: 'My Point'
});
pointFeature.setStyle(new Style({
image: new Circle({
fill: new Fill({
color: [255, 0, 0, 0.5]
}),
stroke: new Stroke({
color: 'red',
width: 2
}),
radius: 8
})
}));
pointFeature.setProperties({
POP: 1,
CAPITAL: 'test'
});
// 将特征添加到矢量图层
this.addPointsSource.addFeature(pointFeature);
// 确保更新地图视图以显示新的标点
this.map.getView().fit(this.addPointsSource.getExtent());
// // 或者移动视图
// _this.map.getView().animate({
// duration: 850,
// zoom: 5,
// center: point,
// });
},
careateFeature(result) {
if (this.vectorSourceIcon) {
this.vectorSourceIcon.clear()
}
const geojsonObject = {
type: 'FeatureCollection',
features: result,
};
// 创建一个图层作为点位
this.vectorSourceIcon = new SourceVector({
features: new GeoJSON().readFeatures(geojsonObject)
});
this.vectorLayerIcon = new LayerVector({
source: this.vectorSourceIcon,
style: feature => {
return new Style({
image: new Icon({
anchor: [0.5, 0.9],
scale: feature.get('scale'),
src: feature.get('iconPath'),
}),
text: new Text({
text: feature.get('text'),
fill: new Fill({
color: '#000'
}),
stroke: new Stroke({
color: '#fff',
width: 3
}),
font: 'normal 12px Calibri, sans-serif',
textAlign: 'center', // 文本对齐
offsetX: 0,
offsetY: 15,
rotation: 0, // 文本旋转
}),
});
}
});
this.map.addLayer(this.vectorLayerIcon);
this.selectInteraction = new Select({
layers: [this.vectorLayerIcon]
});
this.selectInteraction.on('select', (event) => {
const selectedFeatures = event.selected;
if (selectedFeatures.length) {
const select = selectedFeatures[0].values_
this.$emit('markertap', JSON.parse(select.value))
// tooltip
if (this.flagTip) {
const coordinate = selectedFeatures[0].values_.geometry.flatCoordinates;
this.helpTooltipElement.innerHTML = select.text;
console.log(this.helpTooltip)
this.helpTooltip.setPosition(coordinate);
this.helpTooltipElement.classList.remove('hidden');
this.map.addOverlay(this.helpTooltip);
this.isShowToolTip = true
}
}
});
this.map.addInteraction(this.selectInteraction);
},
createHelpTooltip() {
this.helpTooltipElement
if (this.helpTooltipElement) {
this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement);
}
this.helpTooltipElement = document.createElement('div');
this.helpTooltipElement.className = 'tooltip hidden';
this.helpTooltip = new Overlay({
element: this.helpTooltipElement,
offset: [-30, 20],
positioning: 'center-left'
});
}
}
}
</script>
<style scoped>
.app-content {}
.editPane {
position: absolute;
right: 65px;
top: 8px;
text-align: center;
background: #FFF;
z-index: 1000;
border-radius: 4px;
}
.ol-popup {
position: absolute;
background-color: white;
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
padding: 15px;
border-radius: 10px;
border: 1px solid #cccccc;
bottom: 12px;
left: -50px;
min-width: 120px;
white-space: nowrap;
}
.ol-popup:after,
.ol-popup:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.ol-popup:after {
border-top-color: white;
border-width: 10px;
left: 48px;
margin-left: -10px;
}
.ol-popup:before {
border-top-color: #cccccc;
border-width: 11px;
left: 48px;
margin-left: -11px;
}
.tooltip {
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 4px;
color: white;
padding: 4px 8px;
opacity: 0.7;
white-space: nowrap;
}
</style>

View File

@@ -4,6 +4,9 @@ module.exports = {
imageUrl: '', imageUrl: '',
// 显示标题 // 显示标题
showTitle: false, showTitle: false,
// map 1、黑色模块 2、白色模块
// supperMap: 'http://10.165.0.44:1205/proxy/rest/maps/f346b6c59dc64d5793713cf384fab78d/33cbaa14370449a08588f1074ecfec67',
supperMap: 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768',
// 应用信息 // 应用信息
appInfo: { appInfo: {
// 应用名称 // 应用名称

View File

@@ -41,10 +41,12 @@ import JlButton from "@/components/jl-button/main.vue"
import JlForm from "@/components/jl-form/main.vue" import JlForm from "@/components/jl-form/main.vue"
import JlFormItem from "@/components/jl-form/item.vue" import JlFormItem from "@/components/jl-form/item.vue"
import CSButton from "@/components/cs-button/main.vue" import CSButton from "@/components/cs-button/main.vue"
import superMapView from '@/components/uMapView/uMapView.vue';
Vue.component('jl-button', JlButton) Vue.component('jl-button', JlButton)
Vue.component('jl-form', JlForm) Vue.component('jl-form', JlForm)
Vue.component('jl-form-item', JlFormItem) Vue.component('jl-form-item', JlFormItem)
Vue.component('cs-button', CSButton) Vue.component('cs-button', CSButton)
Vue.component('super-map', superMapView)
Vue.component('empty', empty) Vue.component('empty', empty)
Vue.prototype.$api = { Vue.prototype.$api = {
msg, msg,

2642
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,9 +17,13 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@supermap/iclient-ol": "^11.1.1",
"decimal.js": "^10.2.0", "decimal.js": "^10.2.0",
"js-base64": "^2.4.9", "js-base64": "^2.4.9",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"vue-jsonp": "^2.0.0" "vue-jsonp": "^2.0.0"
},
"devDependencies": {
"@supermap/babel-plugin-import": "0.0.1"
} }
} }

View File

@@ -418,7 +418,7 @@
"style": { "style": {
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"enablePullDownRefresh": true, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },

View File

@@ -10,8 +10,12 @@
</view> </view>
</view> </view>
<view class="view-map"> <view class="view-map">
<map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude" <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:markers="covers" @markertap="clickmark" @regionchange="show = false"></map> :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> -->
<!-- <map style="width: 100%;height: 100%;" scale="16" :latitude="latitude" :longitude="longitude"
:markers="covers" @markertap="clickmark" @regionchange="show = false"></map> -->
<view class="position-bottom" v-if="show"> <view class="position-bottom" v-if="show">
<view class="uni-margin-wrap"> <view class="uni-margin-wrap">
<swiper class="swiper" circular :interval="2000" :duration="500"> <swiper class="swiper" circular :interval="2000" :duration="500">
@@ -68,7 +72,6 @@
covers: [], covers: [],
rateValue: 2, rateValue: 2,
productInfo: {}, productInfo: {},
}; };
}, },
computed: { computed: {
@@ -87,7 +90,7 @@
return '无' return '无'
} }
}, },
onShow() { mounted() {
const _this = this const _this = this
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
@@ -96,13 +99,10 @@
longitude, longitude,
latitude latitude
} = res } = res
// _this.$api.msg('成功获得周边信息')
// console.log('成功获得周边信息', res)
_this.latitude = latitude _this.latitude = latitude
_this.longitude = longitude _this.longitude = longitude
// _this.$api.msg('获得周边信息')
_this.getList(longitude, latitude).then((covers) => { _this.getList(longitude, latitude).then((covers) => {
_this.covers = covers _this.$refs.uMap.addFeature(covers)
}) })
}, },
fail: function(err) { fail: function(err) {
@@ -110,12 +110,15 @@
}, },
complete: function(e) {} complete: function(e) {}
}) })
},
onShow() {
// const _this = this
// this.mockGetLocation().then((myPoint) => { // this.mockGetLocation().then((myPoint) => {
// // this.latitude = myPoint.latitude // this.latitude = myPoint.latitude
// // this.longitude = myPoint.longitude // this.longitude = myPoint.longitude
// _this.getList(_this.longitude, _this.latitude).then((covers) => { // _this.getList(_this.longitude, _this.latitude).then((covers) => {
// _this.$api.msg('成功获得周边信息') // _this.$api.msg('成功获得周边信息')
// _this.covers = covers // _this.$refs.uMap.addFeature(covers)
// }) // })
// }) // })
}, },
@@ -139,20 +142,32 @@
} }
}, },
search() { search() {
this.getList(this.longitude, this.longitude).then((covers) => { uni.getLocation({
this.covers = covers type: 'gcj02',
success: function(res) {
const {
longitude,
latitude
} = res
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
},
fail: function(err) {
_this.$api.msg('无法获得周边信息')
},
complete: function(e) {}
}) })
// this.getList(this.longitude, this.longitude).then((covers) => {
// this.covers = covers
// })
}, },
clickmark(e) { clickmark(cover) {
if (e.detail.markerId === 1) return if (cover.markerId === 1) return
this.show = true; this.show = true;
for (var i = 0; i < this.covers.length; i++) { this.productInfo = cover.info
//遍历集合找出对应的maekerid的数据
if (this.covers[i].id == e.detail.markerId) {
this.productInfo = this.covers[i].info
break;
}
}
}, },
mockGetLocation() { mockGetLocation() {
return new Promise((resolve) => { return new Promise((resolve) => {
@@ -178,59 +193,6 @@
distanceRange: 20, distanceRange: 20,
taskTitle: this.searchValue taskTitle: this.searchValue
} }
// let json = [{
// "id": "1783015444661387266",
// "createUser": "242452735",
// "createDept": "171612561",
// "createTime": "2024-04-24 14:09:43",
// "updateUser": "242452735",
// "updateTime": "2024-04-24 14:09:43",
// "status": 1,
// "isDeleted": 0,
// "missionTitle": "维修人员",
// "skillNames": "市场/品牌推广",
// "companyIndustry": "家政",
// "tradeId": "1754327500065390599",
// "tradeNames": "制造业",
// "wage": "3",
// "wageUnitCategory": 2,
// "lat": 31.131007394902717,
// "lon": 104.40944639490272,
// "type": "post",
// "address": "广告法规定发给对方的反感",
// "cityId": "北京-北京市-东城区 ",
// "missionDesc": "范德萨发大水发发的发的发的方法是否是对方感受感受地方噶 好好放个假非户籍",
// "stime": "2024-04-25 00:00:00",
// "etime": "2024-04-26 00:00:00",
// "etimePub": "",
// "education": 7,
// "experienceDesc": "不限经验",
// "callName": "叶婷婷",
// "callTel": "15196372910"
// }]
// const arr = json.map((item) => ({
// id: item.id,
// longitude: item.lon,
// latitude: item.lat,
// iconPath: item.type === 'post' ? gwpoint : taskpoint,
// width: 20,
// height: 20,
// callout: {
// content: item.missionTitle,
// fontSize: 10,
// borderColor: 'blue',
// },
// info: item
// }))
// arr.push({
// id: 1,
// latitude: lat,
// longitude: lon,
// iconPath: mypoint,
// width: 20,
// height: 20
// })
// resolve(arr)
let resData = await geQueryJobsByNearby(params) let resData = await geQueryJobsByNearby(params)
if (resData.data.code === 200) { if (resData.data.code === 200) {
const arr = resData.data.data.map((item) => ({ const arr = resData.data.data.map((item) => ({
@@ -240,6 +202,7 @@
iconPath: item.type === 'post' ? gwpoint : taskpoint, iconPath: item.type === 'post' ? gwpoint : taskpoint,
width: 20, width: 20,
height: 20, height: 20,
title: item.missionTitle,
callout: { callout: {
content: item.missionTitle, content: item.missionTitle,
fontSize: 10, fontSize: 10,
@@ -252,6 +215,7 @@
latitude: lat, latitude: lat,
longitude: lon, longitude: lon,
iconPath: mypoint, iconPath: mypoint,
title: '我的位置',
width: 20, width: 20,
height: 20 height: 20
}) })
@@ -377,6 +341,8 @@
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
display: flex;
flex-direction: column;
.app-top { .app-top {
display: flex; display: flex;
@@ -427,8 +393,7 @@
} }
.view-map { .view-map {
height: 100%; flex: 1;
width: 100%;
} }
} }
</style> </style>

View File

@@ -100,7 +100,12 @@
<view class="prolist"> <view class="prolist">
详细地址{{info.address || '暂无'}} 详细地址{{info.address || '暂无'}}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
<!-- <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" v-if="isShow!=='0'&&status===0"> <view class="btn" v-if="isShow!=='0'&&status===0">

View File

@@ -103,7 +103,12 @@
<view class="prolist"> <view class="prolist">
详细地址{{info.address || '暂无'}} 详细地址{{info.address || '暂无'}}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
<!-- <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" v-if="isShow!=='0'&&status===0"> <view class="btn" v-if="isShow!=='0'&&status===0">

View File

@@ -108,7 +108,12 @@
<view class="prolist"> <view class="prolist">
详细地址{{info.address || '暂无'}} 详细地址{{info.address || '暂无'}}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
<!-- <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" v-if="isShow!=='0'&&status===0"> <view class="btn" v-if="isShow!=='0'&&status===0">

View File

@@ -105,7 +105,11 @@
<view class="prolist"> <view class="prolist">
详细地址{{info.address || '暂无'}} 详细地址{{info.address || '暂无'}}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
</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" v-if="isShow!=='0'&&status===0"> <view class="btn" v-if="isShow!=='0'&&status===0">

View File

@@ -86,7 +86,12 @@
<view class="prolist"> <view class="prolist">
任务地址{{ info.address }} 任务地址{{ info.address }}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
<!-- <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 File

@@ -1,86 +1,86 @@
<template> <template>
<view v-if="showDetail"> <view v-if="showDetail">
<view class="head"> <view class="head">
<view class="proname"> <view class="proname">
{{ info.jobName }} {{ info.jobName }}
</view> </view>
<!-- <view class="prolist"> <!-- <view class="prolist">
任务编码{{info.missionNo}} 任务编码{{info.missionNo}}
</view> --> </view> -->
<view class="prolist"> <view class="prolist">
发布日期{{ info.stime ? dateFormat((info.stime)) : null }} 发布日期{{ info.stime ? dateFormat((info.stime)) : null }}
</view> </view>
<view class="prolist"> <view class="prolist">
招聘人数{{ info.peopleNum }} 招聘人数{{ info.peopleNum }}
</view> </view>
<view class="prolist"> <view class="prolist">
行业类型{{ info.tradeNames ? info.tradeNames : info.jobCompanyIndustry }} 行业类型{{ info.tradeNames ? info.tradeNames : info.jobCompanyIndustry }}
</view> </view>
<view class="prolist"> <view class="prolist">
工种类型{{ info.skillNames }} 工种类型{{ info.skillNames }}
</view> </view>
<!-- <view class="fee"> <!-- <view class="fee">
{{info.wage}}{{wageUnit[info.wageUnitCategory]}} {{info.wage}}{{wageUnit[info.wageUnitCategory]}}
</view> --> </view> -->
</view> </view>
<view class="head"> <view class="head">
<view class="proname proneed"> <view class="proname proneed">
招工要求 招工要求
</view> </view>
<!-- <view class="prolist"> <!-- <view class="prolist">
<view class="protype"> <view class="protype">
年龄要求{{age[info.ageDesc]}} 年龄要求{{age[info.ageDesc]}}
</view> </view>
</view> --> </view> -->
<view class="prolist"> <view class="prolist">
<view class="protype"> <view class="protype">
学历要求{{ info.education }} 学历要求{{ info.education }}
</view> </view>
<view class="protype"> <view class="protype">
经验要求{{ info.experienceDesc }} 经验要求{{ info.experienceDesc }}
</view> </view>
</view> </view>
<view class="prolist"> <view class="prolist">
招工地址{{ info.jobAddress }} 招工地址{{ info.jobAddress }}
</view> </view>
<view class="prolist proint" style="font-weight: bold;color:#333;"> <view class="prolist proint" style="font-weight: bold;color:#333;">
招工描述 招工描述
</view> </view>
<view class="prolist description"> <view class="prolist description">
{{ info.jobDescription }} {{ info.jobDescription }}
</view> </view>
<!-- 技能标签 start --> <!-- 技能标签 start -->
<view class="ask"> <view class="ask">
<view class="askList" v-for="(item, index) in skillNames" :key="index"> <view class="askList" v-for="(item, index) in skillNames" :key="index">
{{ item }} {{ item }}
</view> </view>
</view> </view>
<!-- 技能标签 end --> <!-- 技能标签 end -->
<!-- <view v-if="info.jobSources" class="prolist"> <!-- <view v-if="info.jobSources" class="prolist">
来源{{info.jobSources}} 来源{{info.jobSources}}
</view> --> </view> -->
</view> </view>
<view class="head"> <view class="head">
<!-- <view class="proname proneed"> <!-- <view class="proname proneed">
企业信息 企业信息
</view> --> </view> -->
<!-- <view class="prolist"> <!-- <view class="prolist">
{{info.companyName}} {{info.companyName}}
</view> --> </view> -->
<!-- <view class="prolist"> <!-- <view class="prolist">
用工单位{{info.jobCompanyName}} 用工单位{{info.jobCompanyName}}
</view> --> </view> -->
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image src="../../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 20rpx;" <image src="../../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 20rpx;"
mode=""></image> mode=""></image>
<view style="font-size: 30rpx;">{{ info.jobCompanyName }}</view> <view style="font-size: 30rpx;">{{ info.jobCompanyName }}</view>
</view> </view>
</view> </view>
<view class="head"> <view class="head">
<view class="proname proneed"> <view class="proname proneed">
地址 地址
</view> </view>
<!-- <view class="prolist"> <!-- <view class="prolist">
<view class="protype"> <view class="protype">
联系人{{info.callName}} 联系人{{info.callName}}
</view> </view>
@@ -88,430 +88,455 @@
联系方式{{info.callTel}} 联系方式{{info.callTel}}
</view> </view>
</view> --> </view> -->
<!-- <view class="prolist" v-if="info.callNumber"> <!-- <view class="prolist" v-if="info.callNumber">
座机号{{info.callNumber}} 座机号{{info.callNumber}}
</view> --> </view> -->
<view class="prolist"> <view class="prolist">
岗位地址{{ info.address }} 岗位地址{{ info.address }}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
</view> <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow !== '0'"></view> :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
<view class="btn"> :MapUrl="$config.supperMap" :flag-tip="false"></super-map>
<view @click="callPhone" class="bottombtn flexbtn" </view>
style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;"> <!-- <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> <view class="btn">
<uniMask :maskShow="maskShow"> <view @click="callPhone" class="bottombtn flexbtn"
<view class="contractMask"> style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;">
<!-- #ifdef H5 || APP-PLUS --> 电话联系
<view class="close" @click="close" style="top: 124rpx;">+</view> </view>
<!-- #endif --> </view>
<!-- #ifdef MP-WEIXIN --> <uniMask :maskShow="maskShow">
<view class="close" @click="close">+</view> <view class="contractMask">
<!-- #endif --> <!-- #ifdef H5 || APP-PLUS -->
<view style="height: 30px;"></view> <view class="close" @click="close" style="top: 124rpx;">+</view>
<img :src="src" alt="" style="width:100%;height: 1000px;"> <!-- #endif -->
<view v-if="nextBtn" class="down" @click="next">下一步</view> <!-- #ifdef MP-WEIXIN -->
</view> <view class="close" @click="close">+</view>
</uniMask> <!-- #endif -->
<u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp"> <view style="height: 30px;"></view>
<view style="min-height: 100rpx;padding: 60rpx 40rpx;"> <img :src="src" alt="" style="width:100%;height: 1000px;">
<view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index"> <view v-if="nextBtn" class="down" @click="next">下一步</view>
<view>{{ item.realName }} : {{ item.telphone }}</view> </view>
<view class="applyTime">申请时间{{ item.applyTime }}</view> </uniMask>
</view> <u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp">
</view> <view style="min-height: 100rpx;padding: 60rpx 40rpx;">
</u-popup> <view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index">
</view> <view>{{ item.realName }} : {{ item.telphone }}</view>
<view class="applyTime">申请时间{{ item.applyTime }}</view>
</view>
</view>
</u-popup>
</view>
<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>
<!-- #endif --> <!-- #endif -->
<view class="title"> <view class="title">
<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 } 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 validCode from '@/components/p-valid-code/p-valid-code.vue' } from '@/untils/AxiosUtils.js';
import { getuserrecruitDetailApp } from '@/api/userrecruit.js' import {
export default { setRead
data() { } from '@/api/news.js';
return { import {
...dictionary, checkPass
info: {}, } from '@/api/auth.js';
status: null, import dictionary from '@/common/textdata.js';
showDetail: false, import {
showCode: false, dateFormat
maskShow: false, } from "../../../../untils/format.js";
nextBtn: false, import uniMask from '@/components/uni-mask/mask.vue'
loading: false, import validCode from '@/components/p-valid-code/p-valid-code.vue'
latitude: 39.909, //中心点 import {
longitude: 116.39742, getuserrecruitDetailApp
covers: [{ //marker标记位置 } from '@/api/userrecruit.js'
id: 0, export default {
latitude: 0, data() {
longitude: 0, return {
// width:30, ...dictionary,
// height:30, info: {},
iconPath: '../../../../static/img/location.png' status: null,
}], showDetail: false,
missionNo: "", showCode: false,
isShow: '', maskShow: false,
type: '', nextBtn: false,
id: '', loading: false,
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', latitude: 39.909, //中心点
maxlength: 6, longitude: 116.39742,
collectStatus: 0, // 收藏状态 covers: [{ //marker标记位置
showPopUp: false, id: 0,
jobType: null latitude: 0,
} longitude: 0,
}, // width:30,
components: { uniMask, validCode }, // height:30,
onLoad: function (option) { //option为object类型会序列化上个页面传递的参数 iconPath: '../../../../static/img/location.png'
// this.$store.dispatch('setAutograph') }],
if (option.workId) { missionNo: "",
this.workId = decodeURIComponent(option.workId); isShow: '',
} type: '',
if (option.isCan) { id: '',
this.isShow = option.isCan; //isShow为'0'则为我的任务、我的评价过来的,需要隐藏抢任务按钮 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,
if (option.type) { collectStatus: 0, // 收藏状态
this.type = option.type; //type为1则为消息邀请过来的,需要设置消息已读; showPopUp: false,
} jobType: null
if (option.id) { }
this.id = option.id; //消息id },
} components: {
if (option.jobType) { uniMask,
this.jobType = option.jobType validCode
} },
}, onLoad: function(option) { //option为object类型会序列化上个页面传递的参数
onShow: function () { // this.$store.dispatch('setAutograph')
this.showDetail = true if (option.workId) {
this.getData(); this.workId = decodeURIComponent(option.workId);
}
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
}
if (option.jobType) {
this.jobType = option.jobType
}
},
onShow: function() {
this.showDetail = true
this.getData();
}, },
onShareAppMessage(obj) { onShareAppMessage(obj) {
return { return {
title: this.info.missionTitle, title: this.info.missionTitle,
path: `/pages/projectInfo/projectInfo?missionNo=${this.info.missionNo}` path: `/pages/projectInfo/projectInfo?missionNo=${this.info.missionNo}`
} }
}, },
methods: { methods: {
dateFormat, dateFormat,
callPhone() { callPhone() {
this.showPopUp = true; this.showPopUp = true;
}, },
closePopUp() { closePopUp() {
this.showPopUp = false; this.showPopUp = false;
}, },
async getData() { async getData() {
const self = this; const self = this;
let resData = null let resData = null
if (this.jobType) { if (this.jobType) {
resData = await getuserrecruitDetailApp({ id: this.id, jobType: this.jobType }) resData = await getuserrecruitDetailApp({
} else { id: this.id,
resData = await recruit_missionDetail(self.workId, self.type) jobType: this.jobType
} })
if (resData.data?.code === 200) { } else {
self.info = resData.data.data; resData = await recruit_missionDetail(self.workId, self.type)
self.status = resData.data.data.status; }
self.missionNo = resData.data.data.missionNo; if (resData.data?.code === 200) {
self.latitude = self.info.lat; self.info = resData.data.data;
self.longitude = self.info.lon; self.status = resData.data.data.status;
self.covers[0].latitude = self.info.lat; self.missionNo = resData.data.data.missionNo;
self.covers[0].longitude = self.info.lon; self.latitude = self.info.lat;
self.showDetail = true; self.longitude = self.info.lon;
} self.covers[0].latitude = self.info.lat;
}, self.covers[0].longitude = self.info.lon;
// 查看合同 self.showDetail = true;
lookMask() { }
this.maskShow = true },
}, // 查看合同
// 关闭弹窗 lookMask() {
close() { this.maskShow = true
this.maskShow = false },
}, // 关闭弹窗
// 合同下一步 close() {
next() { this.maskShow = false
this.maskShow = false },
this.showDetail = false // 合同下一步
this.showCode = true next() {
}, this.maskShow = false
// 输入签名密码 this.showDetail = false
getInpCode(password) { this.showCode = true
uni.showLoading({ },
title: "请求中..." // 输入签名密码
}) getInpCode(password) {
this.loading = true uni.showLoading({
var obj = { title: "请求中..."
pass: password })
} this.loading = true
checkPass(obj).then(res => { var obj = {
this.submitTask() pass: password
this.closeShowCode() }
}).catch(err => { checkPass(obj).then(res => {
this.loading = false this.submitTask()
}) this.closeShowCode()
}, }).catch(err => {
// 关闭签名密码弹窗 this.loading = false
closeShowCode() { })
this.showCode = false },
this.showDetail = true // 关闭签名密码弹窗
}, closeShowCode() {
// 忘记密码 this.showCode = false
forget() { this.showDetail = true
uni.navigateTo({ },
url: `/pageMy/setUserBase/seal/forget?forget=true` // 忘记密码
}) forget() {
} uni.navigateTo({
}, url: `/pageMy/setUserBase/seal/forget?forget=true`
computed: { })
...mapGetters(['auth', 'autograph']), }
skillNames() { },
if (this.info.skillNames) { computed: {
return this.info.skillNames.split(',') ...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 { .closeCode {
position: absolute; position: absolute;
right: 36rpx; right: 36rpx;
top: 120rpx; top: 120rpx;
color: #1B66FF; color: #1B66FF;
transform: rotate(45deg); transform: rotate(45deg);
font-size: 40px; font-size: 40px;
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.name { .name {
height: 46rpx; height: 46rpx;
font-size: 46rpx; font-size: 46rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 46rpx; line-height: 46rpx;
margin-right: 28rpx; margin-right: 28rpx;
} }
.tip { .tip {
height: 38rpx; height: 38rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 38rpx; line-height: 38rpx;
} }
.forget { .forget {
height: 38rpx; height: 38rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #5AA0FA; color: #5AA0FA;
line-height: 38rpx; line-height: 38rpx;
text-align: right; text-align: right;
} }
} }
.contractMask { .contractMask {
background-color: #FFFFFF; background-color: #FFFFFF;
margin: 30rpx; margin: 30rpx;
position: relative; position: relative;
border-radius: 4px; border-radius: 4px;
height: 96%; height: 96%;
overflow: auto; overflow: auto;
.close { .close {
width: 23px; width: 23px;
height: 23px; height: 23px;
color: #1B66FF; color: #1B66FF;
position: fixed; position: fixed;
right: 60rpx; right: 60rpx;
top: 60rpx; top: 60rpx;
transform: rotate(45deg); transform: rotate(45deg);
font-size: 40px; font-size: 40px;
} }
.down { .down {
position: fixed; position: fixed;
bottom: 30px; bottom: 30px;
left: 14%; left: 14%;
width: 545rpx; width: 545rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
text-align: center; text-align: center;
background: #1B66FF; background: #1B66FF;
font-size: 36rpx; font-size: 36rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
} }
.lookContract { .lookContract {
width: 30%; width: 30%;
margin-right: 30rpx; margin-right: 30rpx;
} }
.flexbtn { .flexbtn {
flex: 1; flex: 1;
} }
.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;
width: 690rpx; width: 690rpx;
padding: 30rpx; padding: 30rpx;
padding-bottom: 80rpx; padding-bottom: 80rpx;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
display: flex; display: flex;
} }
.disabledBtn { .disabledBtn {
background-color: #c8c9cc; background-color: #c8c9cc;
} }
.map { .map {
width: 100%; width: 100%;
height: 350rpx; height: 350rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
.askList { .askList {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
background-color: #f6f6f6; background-color: #f6f6f6;
padding: 5rpx 15rpx; padding: 5rpx 15rpx;
margin-right: 10rpx; margin-right: 10rpx;
margin-top: 15rpx; margin-top: 15rpx;
} }
.ask { .ask {
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
margin: 20rpx 0; margin: 20rpx 0;
} }
.proint { .proint {
margin-top: 30rpx; margin-top: 30rpx;
font-size: 30rpx !important; font-size: 30rpx !important;
} }
.proneed { .proneed {
font-size: 32rpx !important; font-size: 32rpx !important;
} }
.fee { .fee {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 32rpx; font-size: 32rpx;
color: #F46161; color: #F46161;
margin-top: 30rpx; margin-top: 30rpx;
} }
.protype { .protype {
width: 50%; width: 50%;
} }
.prolist { .prolist {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #666666; color: #666666;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
text-align: left; text-align: left;
padding: 5rpx 0; padding: 5rpx 0;
} }
.proname { .proname {
font-weight: bold; font-weight: bold;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 40rpx; font-size: 40rpx;
color: #333333; color: #333333;
width: 90%; width: 90%;
overflow: hidden; overflow: hidden;
padding-bottom: 20rpx; padding-bottom: 20rpx;
} }
.head { .head {
padding: 30rpx; padding: 30rpx;
background: #fefefe; background: #fefefe;
border-bottom: 20rpx solid #f6f6f6; border-bottom: 20rpx solid #f6f6f6;
} }
.description { .description {
word-break: break-all; word-break: break-all;
white-space: pre-line; white-space: pre-line;
} }
.contactWrapper { .contactWrapper {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
margin-top: 10rpx; margin-top: 10rpx;
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
border-radius: 5px; border-radius: 5px;
padding: 20rpx; padding: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.applyTime { .applyTime {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
} }
</style> </style>

View File

@@ -1,86 +1,86 @@
<template> <template>
<view v-if="showDetail"> <view v-if="showDetail">
<view class="head"> <view class="head">
<view class="proname"> <view class="proname">
{{ info.jobName }} {{ info.jobName }}
</view> </view>
<!-- <view class="prolist"> <!-- <view class="prolist">
任务编码{{info.missionNo}} 任务编码{{info.missionNo}}
</view> --> </view> -->
<view class="prolist"> <view class="prolist">
发布日期{{ dateFormat((info.stime)) }} 发布日期{{ dateFormat((info.stime)) }}
</view> </view>
<view class="prolist"> <view class="prolist">
招聘人数{{ info.peopleNum }} 招聘人数{{ info.peopleNum }}
</view> </view>
<view class="prolist"> <view class="prolist">
行业类型{{ info.tradeNames ? info.tradeNames : info.jobCompanyIndustry }} 行业类型{{ info.tradeNames ? info.tradeNames : info.jobCompanyIndustry }}
</view> </view>
<view class="prolist"> <view class="prolist">
工种类型{{ info.skillNames }} 工种类型{{ info.skillNames }}
</view> </view>
<!-- <view class="fee"> <!-- <view class="fee">
{{info.wage}}{{wageUnit[info.wageUnitCategory]}} {{info.wage}}{{wageUnit[info.wageUnitCategory]}}
</view> --> </view> -->
</view> </view>
<view class="head"> <view class="head">
<view class="proname proneed"> <view class="proname proneed">
岗位要求 岗位要求
</view> </view>
<!-- <view class="prolist"> <!-- <view class="prolist">
<view class="protype"> <view class="protype">
年龄要求{{age[info.ageDesc]}} 年龄要求{{age[info.ageDesc]}}
</view> </view>
</view> --> </view> -->
<view class="prolist"> <view class="prolist">
<view class="protype"> <view class="protype">
学历要求{{ info.education }} 学历要求{{ info.education }}
</view> </view>
<view class="protype"> <view class="protype">
经验要求{{ info.experienceDesc }} 经验要求{{ info.experienceDesc }}
</view> </view>
</view> </view>
<view class="prolist"> <view class="prolist">
岗位地址{{ info.jobAddress }} 岗位地址{{ info.jobAddress }}
</view> </view>
<view class="prolist proint" style="font-weight: bold;color:#333;"> <view class="prolist proint" style="font-weight: bold;color:#333;">
任务描述 任务描述
</view> </view>
<view class="prolist description"> <view class="prolist description">
{{ info.jobDescription }} {{ info.jobDescription }}
</view> </view>
<!-- 技能标签 start --> <!-- 技能标签 start -->
<view class="ask"> <view class="ask">
<view class="askList" v-for="(item, index) in skillNames" :key="index"> <view class="askList" v-for="(item, index) in skillNames" :key="index">
{{ item }} {{ item }}
</view> </view>
</view> </view>
<!-- 技能标签 end --> <!-- 技能标签 end -->
<view v-if="info.jobSources" class="prolist"> <view v-if="info.jobSources" class="prolist">
来源{{ info.jobSources }} 来源{{ info.jobSources }}
</view> </view>
</view> </view>
<view class="head"> <view class="head">
<!-- <view class="proname proneed"> <!-- <view class="proname proneed">
企业信息 企业信息
</view> --> </view> -->
<!-- <view class="prolist"> <!-- <view class="prolist">
{{info.companyName}} {{info.companyName}}
</view> --> </view> -->
<!-- <view class="prolist"> <!-- <view class="prolist">
用工单位{{info.jobCompanyName}} 用工单位{{info.jobCompanyName}}
</view> --> </view> -->
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image src="../../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 20rpx;" <image src="../../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 20rpx;"
mode=""></image> mode=""></image>
<view style="font-size: 30rpx;">{{ info.jobCompanyName }}</view> <view style="font-size: 30rpx;">{{ info.jobCompanyName }}</view>
</view> </view>
</view> </view>
<view class="head"> <view class="head">
<view class="proname proneed"> <view class="proname proneed">
地址 地址
</view> </view>
<!-- <view class="prolist"> <!-- <view class="prolist">
<view class="protype"> <view class="protype">
联系人{{info.callName}} 联系人{{info.callName}}
</view> </view>
@@ -88,422 +88,444 @@
联系方式{{info.callTel}} 联系方式{{info.callTel}}
</view> </view>
</view> --> </view> -->
<!-- <view class="prolist" v-if="info.callNumber"> <!-- <view class="prolist" v-if="info.callNumber">
座机号{{info.callNumber}} 座机号{{info.callNumber}}
</view> --> </view> -->
<view class="prolist"> <view class="prolist">
岗位地址{{ info.address }} 岗位地址{{ info.address }}
</view> </view>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
</view> <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow !== '0'"></view> :open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
<view class="btn"> :MapUrl="$config.supperMap" :flag-tip="false"></super-map>
<view @click="callPhone" class="bottombtn flexbtn" </view>
style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;"> <!-- <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> <view class="btn">
<uniMask :maskShow="maskShow"> <view @click="callPhone" class="bottombtn flexbtn"
<view class="contractMask"> style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;">
<!-- #ifdef H5 || APP-PLUS --> 电话联系
<view class="close" @click="close" style="top: 124rpx;">+</view> </view>
<!-- #endif --> </view>
<!-- #ifdef MP-WEIXIN --> <uniMask :maskShow="maskShow">
<view class="close" @click="close">+</view> <view class="contractMask">
<!-- #endif --> <!-- #ifdef H5 || APP-PLUS -->
<view style="height: 30px;"></view> <view class="close" @click="close" style="top: 124rpx;">+</view>
<img :src="src" alt="" style="width:100%;height: 1000px;"> <!-- #endif -->
<view v-if="nextBtn" class="down" @click="next">下一步</view> <!-- #ifdef MP-WEIXIN -->
</view> <view class="close" @click="close">+</view>
</uniMask> <!-- #endif -->
<u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp"> <view style="height: 30px;"></view>
<view style="min-height: 100rpx;padding: 60rpx 40rpx;"> <img :src="src" alt="" style="width:100%;height: 1000px;">
<view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index"> <view v-if="nextBtn" class="down" @click="next">下一步</view>
<view>{{ item.realName }} : {{ item.telphone }}</view> </view>
<view class="applyTime">申请时间{{ item.applyTime }}</view> </uniMask>
</view> <u-popup closeable :show="showPopUp" mode="bottom" @close="closePopUp">
</view> <view style="min-height: 100rpx;padding: 60rpx 40rpx;">
</u-popup> <view class="contactWrapper" v-for="(item, index) in info.applyList" :key="index">
</view> <view>{{ item.realName }} : {{ item.telphone }}</view>
<view class="applyTime">申请时间{{ item.applyTime }}</view>
</view>
</view>
</u-popup>
</view>
<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>
<!-- #endif --> <!-- #endif -->
<view class="title"> <view class="title">
<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 } 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 { userrecruitDetail } from '@/api/userrecruit.js' GoLogin
import uniMask from '@/components/uni-mask/mask.vue' } from '@/untils/AxiosUtils.js';
import validCode from '@/components/p-valid-code/p-valid-code.vue' import {
export default { setRead
data() { } from '@/api/news.js';
return { import {
...dictionary, checkPass
info: {}, } from '@/api/auth.js';
status: null, import dictionary from '@/common/textdata.js';
showDetail: false, import {
showCode: false, dateFormat
maskShow: false, } from "../../../../untils/format.js";
nextBtn: false, import {
loading: false, userrecruitDetail
latitude: 39.909, //中心点 } from '@/api/userrecruit.js'
longitude: 116.39742, import uniMask from '@/components/uni-mask/mask.vue'
covers: [{ //marker标记位置 import validCode from '@/components/p-valid-code/p-valid-code.vue'
id: 0, export default {
latitude: 0, data() {
longitude: 0, return {
// width:30, ...dictionary,
// height:30, info: {},
iconPath: '../../../../static/img/location.png' status: null,
}], showDetail: false,
missionNo: "", showCode: false,
isShow: '', maskShow: false,
type: '', nextBtn: false,
id: '', loading: false,
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', latitude: 39.909, //中心点
maxlength: 6, longitude: 116.39742,
collectStatus: 0, // 收藏状态 covers: [{ //marker标记位置
showPopUp: false, id: 0,
} latitude: 0,
}, longitude: 0,
components: { uniMask, validCode }, // width:30,
onLoad: function (option) { //option为object类型会序列化上个页面传递的参数 // height:30,
// this.$store.dispatch('setAutograph') iconPath: '../../../../static/img/location.png'
if (option.workId) { }],
this.workId = decodeURIComponent(option.workId); missionNo: "",
} isShow: '',
if (option.isCan) { type: '',
this.isShow = option.isCan; //isShow为'0'则为我的任务、我的评价过来的,需要隐藏抢任务按钮 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',
if (option.type) { maxlength: 6,
this.type = option.type; //type为1则为消息邀请过来的,需要设置消息已读; collectStatus: 0, // 收藏状态
} showPopUp: false,
if (option.id) { }
this.id = option.id; //消息id },
} components: {
}, uniMask,
onShow: function () { validCode
this.showDetail = true },
this.getData(); onLoad: function(option) { //option为object类型会序列化上个页面传递的参数
// this.$store.dispatch('setAutograph')
if (option.workId) {
this.workId = decodeURIComponent(option.workId);
}
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) { onShareAppMessage(obj) {
return { return {
title: this.info.missionTitle, title: this.info.missionTitle,
path: `/pages/projectInfo/projectInfo?missionNo=${this.info.missionNo}` path: `/pages/projectInfo/projectInfo?missionNo=${this.info.missionNo}`
} }
}, },
methods: { methods: {
dateFormat, dateFormat,
callPhone() { callPhone() {
this.showPopUp = true; this.showPopUp = true;
}, },
closePopUp() { closePopUp() {
this.showPopUp = false; this.showPopUp = false;
}, },
getData: function () { getData: function() {
const self = this; const self = this;
recruit_missionDetail(self.workId, self.type).then(res => { recruit_missionDetail(self.workId, self.type).then(res => {
self.info = res.data.data; self.info = res.data.data;
self.status = res.data.data.status; self.status = res.data.data.status;
self.missionNo = res.data.data.missionNo; self.missionNo = res.data.data.missionNo;
self.latitude = self.info.lat; self.latitude = self.info.lat;
self.longitude = self.info.lon; self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat; self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon; self.covers[0].longitude = self.info.lon;
self.showDetail = true; self.showDetail = true;
}, error => { }, error => {
console.log(error); console.log(error);
}); });
}, },
// 查看合同 // 查看合同
lookMask() { lookMask() {
this.maskShow = true this.maskShow = true
}, },
// 关闭弹窗 // 关闭弹窗
close() { close() {
this.maskShow = false this.maskShow = false
}, },
// 合同下一步 // 合同下一步
next() { next() {
this.maskShow = false this.maskShow = false
this.showDetail = false this.showDetail = false
this.showCode = true this.showCode = true
}, },
// 输入签名密码 // 输入签名密码
getInpCode(password) { getInpCode(password) {
uni.showLoading({ uni.showLoading({
title: "请求中..." title: "请求中..."
}) })
this.loading = true this.loading = true
var obj = { var obj = {
pass: password pass: password
} }
checkPass(obj).then(res => { checkPass(obj).then(res => {
this.submitTask() this.submitTask()
this.closeShowCode() this.closeShowCode()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
}) })
}, },
// 关闭签名密码弹窗 // 关闭签名密码弹窗
closeShowCode() { closeShowCode() {
this.showCode = false this.showCode = false
this.showDetail = true this.showDetail = true
}, },
// 忘记密码 // 忘记密码
forget() { forget() {
uni.navigateTo({ uni.navigateTo({
url: `/pageMy/setUserBase/seal/forget?forget=true` url: `/pageMy/setUserBase/seal/forget?forget=true`
}) })
} }
}, },
computed: { computed: {
...mapGetters(['auth', 'autograph']), ...mapGetters(['auth', 'autograph']),
skillNames() { skillNames() {
if (this.info.skillNames) { if (this.info.skillNames) {
return this.info.skillNames.split(',') 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 { .closeCode {
position: absolute; position: absolute;
right: 36rpx; right: 36rpx;
top: 120rpx; top: 120rpx;
color: #1B66FF; color: #1B66FF;
transform: rotate(45deg); transform: rotate(45deg);
font-size: 40px; font-size: 40px;
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.name { .name {
height: 46rpx; height: 46rpx;
font-size: 46rpx; font-size: 46rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 46rpx; line-height: 46rpx;
margin-right: 28rpx; margin-right: 28rpx;
} }
.tip { .tip {
height: 38rpx; height: 38rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 38rpx; line-height: 38rpx;
} }
.forget { .forget {
height: 38rpx; height: 38rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #5AA0FA; color: #5AA0FA;
line-height: 38rpx; line-height: 38rpx;
text-align: right; text-align: right;
} }
} }
.contractMask { .contractMask {
background-color: #FFFFFF; background-color: #FFFFFF;
margin: 30rpx; margin: 30rpx;
position: relative; position: relative;
border-radius: 4px; border-radius: 4px;
height: 96%; height: 96%;
overflow: auto; overflow: auto;
.close { .close {
width: 23px; width: 23px;
height: 23px; height: 23px;
color: #1B66FF; color: #1B66FF;
position: fixed; position: fixed;
right: 60rpx; right: 60rpx;
top: 60rpx; top: 60rpx;
transform: rotate(45deg); transform: rotate(45deg);
font-size: 40px; font-size: 40px;
} }
.down { .down {
position: fixed; position: fixed;
bottom: 30px; bottom: 30px;
left: 14%; left: 14%;
width: 545rpx; width: 545rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
text-align: center; text-align: center;
background: #1B66FF; background: #1B66FF;
font-size: 36rpx; font-size: 36rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
} }
.lookContract { .lookContract {
width: 30%; width: 30%;
margin-right: 30rpx; margin-right: 30rpx;
} }
.flexbtn { .flexbtn {
flex: 1; flex: 1;
} }
.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;
width: 690rpx; width: 690rpx;
padding: 30rpx; padding: 30rpx;
padding-bottom: 80rpx; padding-bottom: 80rpx;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
display: flex; display: flex;
} }
.disabledBtn { .disabledBtn {
background-color: #c8c9cc; background-color: #c8c9cc;
} }
.map { .map {
width: 100%; width: 100%;
height: 350rpx; height: 350rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
.askList { .askList {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
background-color: #f6f6f6; background-color: #f6f6f6;
padding: 5rpx 15rpx; padding: 5rpx 15rpx;
margin-right: 10rpx; margin-right: 10rpx;
margin-top: 15rpx; margin-top: 15rpx;
} }
.ask { .ask {
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
margin: 20rpx 0; margin: 20rpx 0;
} }
.proint { .proint {
margin-top: 30rpx; margin-top: 30rpx;
font-size: 30rpx !important; font-size: 30rpx !important;
} }
.proneed { .proneed {
font-size: 32rpx !important; font-size: 32rpx !important;
} }
.fee { .fee {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 32rpx; font-size: 32rpx;
color: #F46161; color: #F46161;
margin-top: 30rpx; margin-top: 30rpx;
} }
.protype { .protype {
width: 50%; width: 50%;
} }
.prolist { .prolist {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #666666; color: #666666;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
text-align: left; text-align: left;
padding: 5rpx 0; padding: 5rpx 0;
} }
.proname { .proname {
font-weight: bold; font-weight: bold;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 40rpx; font-size: 40rpx;
color: #333333; color: #333333;
width: 90%; width: 90%;
overflow: hidden; overflow: hidden;
padding-bottom: 20rpx; padding-bottom: 20rpx;
} }
.head { .head {
padding: 30rpx; padding: 30rpx;
background: #fefefe; background: #fefefe;
border-bottom: 20rpx solid #f6f6f6; border-bottom: 20rpx solid #f6f6f6;
} }
.description { .description {
word-break: break-all; word-break: break-all;
white-space: pre-line; white-space: pre-line;
} }
.contactWrapper { .contactWrapper {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
margin-top: 10rpx; margin-top: 10rpx;
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
border-radius: 5px; border-radius: 5px;
padding: 20rpx; padding: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.applyTime { .applyTime {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
} }
</style> </style>

View File

@@ -132,8 +132,12 @@
:loading="loading" loading-text="数据加载中" placeholder="请输入详细地址" @input="selectInput" :loading="loading" loading-text="数据加载中" placeholder="请输入详细地址" @input="selectInput"
v-model="info.address" @confirm="selectConfirm" /> --> v-model="info.address" @confirm="selectConfirm" /> -->
</u-form-item> </u-form-item>
<view class="map">
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</u--form> </u--form>
<u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button> <u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button>
<u-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></u-button> <u-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></u-button>

View File

@@ -133,7 +133,12 @@
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1"> <u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input> <u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
</u-form-item> </u-form-item>
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> <view class="map">
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false"
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
</view>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</u--form> </u--form>
<u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button> <u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button>
<u-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></u-button> <u-button type="error" text="重置" customStyle="margin-top: 10px" @click="reset"></u-button>

View File

@@ -3,7 +3,7 @@ module.exports = {
port: 1887, port: 1887,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://10.165.0.77:8000', target: 'http://10.165.0.173:8000',
ws: true, ws: true,
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/'