|
@@ -65,7 +65,7 @@
|
|
|
:options="siteList"
|
|
|
:field-names="{ label: 'siteName', value: 'siteID' }"
|
|
|
placeholder="所属驿站" size="small" style="width: 149px"
|
|
|
- @change="onSearch"
|
|
|
+ @change="siteChange"
|
|
|
>
|
|
|
</a-select>
|
|
|
<a-select
|
|
@@ -195,17 +195,25 @@
|
|
|
{{ nowCheckCompany.companyName }}
|
|
|
</p>
|
|
|
<p class="label-text">
|
|
|
- 工作地点:{{ nowCheckCompany.companyAddress }}
|
|
|
- </p>
|
|
|
- <p class="label-text">
|
|
|
- 企业规模:{{ nowCheckCompany.companyModelType }}
|
|
|
+ 所属行业:{{ nowCheckCompany.industryName }}
|
|
|
</p>
|
|
|
- <p class="label-text">
|
|
|
- 企业状态:{{ nowCheckCompany.recordStatusName }}
|
|
|
+ <p class="label-text flex-box justify-between">
|
|
|
+ <span style="width: 50%">
|
|
|
+ 企业规模:{{ nowCheckCompany.companyModelType }}
|
|
|
+ </span>
|
|
|
+ <span style="width: 50%">
|
|
|
+ 企业状态:{{ nowCheckCompany.recordStatusName }}
|
|
|
+ </span>
|
|
|
</p>
|
|
|
- <p class="label-text">
|
|
|
- 登记人:{{ nowCheckCompany.companyCreateUserName }}
|
|
|
+ <p class="label-text flex-box justify-between">
|
|
|
+ <span>
|
|
|
+ 联系人:{{ nowCheckCompany.userName }}
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ 联系电话:{{ nowCheckCompany.userMobile }}
|
|
|
+ </span>
|
|
|
</p>
|
|
|
+ <p class="label-text">标签</p>
|
|
|
<!-- 标签 -->
|
|
|
<div class="company-label-box"
|
|
|
v-if="nowCheckCompany.companyLabelList && nowCheckCompany.companyLabelList.length > 0"
|
|
@@ -220,6 +228,9 @@
|
|
|
<span class="launch-btn" v-else @click.stop="postBoxCompanyLabelExpanded = true">收起</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="label-text">
|
|
|
+ 暂无标签
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 岗位列表 -->
|
|
|
<div class="list-box">
|
|
@@ -339,7 +350,7 @@ import redThIcon3 from "@/assets/images/redTh4.png";
|
|
|
import blueThIcon from "@/assets/images/blueTh1.png";
|
|
|
import {message, type SelectProps} from "ant-design-vue";
|
|
|
import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
|
-import {getSiteList} from "@/api/baseSettings/siteInfo";
|
|
|
+import {getSiteByID, getSiteList} from "@/api/baseSettings/siteInfo";
|
|
|
import {getRegionCodeList} from "@/api/system/area/index";
|
|
|
import {getDataMapList, getDataMapListByPostName} from "@/api/companyService/company";
|
|
|
import {getCompanyMapPostList} from "@/api/companyService/post";
|
|
@@ -367,10 +378,15 @@ const companySearchParam = reactive({
|
|
|
siteID: undefined,
|
|
|
regionCode: undefined,
|
|
|
createTimeBy: 'all',
|
|
|
- longitude: 114.416110,
|
|
|
- latitude: 23.111582,
|
|
|
+ longitude: 114.411771,
|
|
|
+ latitude: 23.113454,
|
|
|
isPost: null
|
|
|
})
|
|
|
+// 当前电脑的位置
|
|
|
+const defaultLonLat = reactive({
|
|
|
+ longitude: 114.411771,
|
|
|
+ latitude: 23.113454,
|
|
|
+})
|
|
|
// 企业数据
|
|
|
const companyList = ref<Array<any>>([])
|
|
|
// 企业分页条数
|
|
@@ -507,33 +523,48 @@ const initMap = () => {
|
|
|
setLoginLocation();
|
|
|
};
|
|
|
|
|
|
+// 设置中心点图标
|
|
|
+function setCenterIcon() {
|
|
|
+ // 清除地图上的查询位置标记点
|
|
|
+ (map as any).removeOverLay(userMarker);
|
|
|
+
|
|
|
+ // 设置中心点
|
|
|
+ (map as any).centerAndZoom(new T.LngLat(companySearchParam.longitude, companySearchParam.latitude), zoom);
|
|
|
+ const icon = new T.Icon({
|
|
|
+ iconUrl: redThIcon,
|
|
|
+ iconSize: new T.Point(10, 10),
|
|
|
+ iconAnchor: new T.Point(0, 5)
|
|
|
+ })
|
|
|
+ const point = new T.LngLat(companySearchParam.longitude, companySearchParam.latitude)
|
|
|
+ // 创建标注
|
|
|
+ userMarker = new T.Marker(point, {
|
|
|
+ icon: icon
|
|
|
+ });
|
|
|
+ //向地图上标记
|
|
|
+ (map as any).addOverLay(userMarker);
|
|
|
+}
|
|
|
+
|
|
|
// 获取当前登录用户定位
|
|
|
function setLoginLocation() {
|
|
|
getPosition().then((data: any) => {
|
|
|
if (data.longitude && data.latitude) {
|
|
|
- companySearchParam.longitude = data.longitude;
|
|
|
- companySearchParam.latitude = data.latitude;
|
|
|
+ if (!companySearchParam.siteID) {
|
|
|
+ companySearchParam.longitude = data.longitude;
|
|
|
+ companySearchParam.latitude = data.latitude;
|
|
|
+ }
|
|
|
+ // 记录下来当前位置
|
|
|
+ defaultLonLat.longitude = data.longitude;
|
|
|
+ defaultLonLat.latitude = data.latitude;
|
|
|
} else {
|
|
|
// 如果没有获取到经纬度,设置默认为惠州市人民政府的位置
|
|
|
- companySearchParam.longitude = 114.420244;
|
|
|
- companySearchParam.latitude = 23.116236;
|
|
|
+ if (!companySearchParam.siteID) {
|
|
|
+ companySearchParam.longitude = 114.411771;
|
|
|
+ companySearchParam.latitude = 23.113454;
|
|
|
+ }
|
|
|
message.info("获取定位失败,已使用默认定位");
|
|
|
}
|
|
|
}).finally(() => {
|
|
|
- // 设置中心点
|
|
|
- (map as any).centerAndZoom(new T.LngLat(companySearchParam.longitude, companySearchParam.latitude), zoom);
|
|
|
- const icon = new T.Icon({
|
|
|
- iconUrl: redThIcon,
|
|
|
- iconSize: new T.Point(10, 10),
|
|
|
- iconAnchor: new T.Point(5, 10)
|
|
|
- })
|
|
|
- const point = new T.LngLat(companySearchParam.longitude, companySearchParam.latitude)
|
|
|
- // 创建标注
|
|
|
- userMarker = new T.Marker(point, {
|
|
|
- icon: icon
|
|
|
- });
|
|
|
- //向地图上标记
|
|
|
- (map as any).addOverLay(userMarker);
|
|
|
+ setCenterIcon();
|
|
|
onSearch();
|
|
|
})
|
|
|
}
|
|
@@ -684,18 +715,18 @@ function setCompanyMarker(setCenter: boolean) {
|
|
|
// 天地图按缩放基本计算图标与文本的大小与锚点偏移值
|
|
|
function computeMarkerSize(zoomLevel: any) {
|
|
|
// 计算新的icon大小
|
|
|
- let newIconSize = Math.min(Math.max(zoomLevel * 3, 15), 45);
|
|
|
+ let newIconSize = Math.min(Math.max(zoomLevel * 2, 10), 15);
|
|
|
// 计算新的icon锚点位置
|
|
|
- let iconAnchor = new T.Point(10 * (newIconSize / 45), 20 * (newIconSize / 45));
|
|
|
+ let iconAnchor = new T.Point(10 * (newIconSize / 15), 20 * (newIconSize / 15));
|
|
|
// 计算新的偏移量,保持 label 居中且不超过初始值
|
|
|
- let offsetX = -20 + ((newIconSize - 45) / 3);
|
|
|
- let offsetY = 28 + ((newIconSize - 45) / 3);
|
|
|
+ let offsetX = -15 + ((newIconSize - 15) / 2);
|
|
|
+ let offsetY = 15 + ((newIconSize - 15) / 2);
|
|
|
// 确保偏移量不超过初始值
|
|
|
- offsetX = Math.max(offsetX, -20);
|
|
|
- offsetY = Math.min(offsetY, 28);
|
|
|
+ offsetX = Math.max(offsetX, -15);
|
|
|
+ offsetY = Math.min(offsetY, 15);
|
|
|
// 更新 label 的偏移量
|
|
|
let newOffset = new T.Point(offsetX, offsetY);
|
|
|
- let fontSize = Math.min(12, Math.max(8, 12 - (45 - newIconSize) / 3))
|
|
|
+ let fontSize = Math.min(12, Math.max(8, 12 - (15 - newIconSize) / 2))
|
|
|
|
|
|
return {
|
|
|
iconSize: newIconSize,
|
|
@@ -750,7 +781,7 @@ const checkCompanyChange = async (company: any, funE: any) => {
|
|
|
autoPan: true,
|
|
|
maxHeight: 300,
|
|
|
maxWidth: 400,
|
|
|
- offset: new T.Point(10, 0)
|
|
|
+ offset: new T.Point(-5, -15)
|
|
|
});
|
|
|
}
|
|
|
await findPostList();
|
|
@@ -850,6 +881,27 @@ function regionCodeChange() {
|
|
|
onSearch();
|
|
|
}
|
|
|
|
|
|
+function siteChange() {
|
|
|
+ if (companySearchParam.siteID) {
|
|
|
+ getSiteByID(companySearchParam.siteID).then((result: any) => {
|
|
|
+ // 设置查询的中心点为驿站的经纬度
|
|
|
+ if (result.siteLongitude && result.siteLatitude) {
|
|
|
+ companySearchParam.longitude = result.siteLongitude;
|
|
|
+ companySearchParam.latitude = result.siteLatitude;
|
|
|
+ setCenterIcon();
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ onSearch();
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 未选择驿站时恢复默认位置
|
|
|
+ companySearchParam.longitude = defaultLonLat.longitude;
|
|
|
+ companySearchParam.latitude = defaultLonLat.latitude;
|
|
|
+ setCenterIcon();
|
|
|
+ onSearch();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
initMap();
|
|
|
getCompanyModelList();
|