|
@@ -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
|
|
@@ -95,6 +95,7 @@
|
|
|
<div class="company-data-box"
|
|
|
:class="{
|
|
|
'check-company': (nowCheckCompany.companyID == company.companyID || nowMouseenterCompany.companyID == company.companyID) && company.creditRecordCount == null,
|
|
|
+ 'check-company-green': (nowCheckCompany.companyID == company.companyID || nowMouseenterCompany.companyID == company.companyID) && company.signinCount >= 1 && !company.creditRecordCount,
|
|
|
'check-company-red': (nowCheckCompany.companyID == company.companyID || nowMouseenterCompany.companyID == company.companyID) && company.creditRecordCount >= 1,
|
|
|
}"
|
|
|
v-if="companyList.length > 0 && searchType == 'company'" v-for="(company,index) in companyList"
|
|
@@ -195,17 +196,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,60 +229,84 @@
|
|
|
<span class="launch-btn" v-else @click.stop="postBoxCompanyLabelExpanded = true">收起</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="label-text">
|
|
|
+ 暂无标签
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <a-radio-group v-model:value="dataType" button-style="solid" size="small"
|
|
|
+ style="margin-bottom: 10px">
|
|
|
+ <a-radio-button value="post">岗位</a-radio-button>
|
|
|
+ <a-radio-button value="signin">服务记录</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
<!-- 岗位列表 -->
|
|
|
- <div class="list-box">
|
|
|
- <div class="list-post-box margin-bottom-10" v-if="postList.length > 0"
|
|
|
- v-for="(post, postIndex) in postList"
|
|
|
- :key="postIndex">
|
|
|
- <div class="post-title">
|
|
|
- <span>{{ post.professionName }}</span>
|
|
|
- <span class="post-salary">{{ showSalary(post.minSalary, post.maxSalary) }}</span>
|
|
|
- </div>
|
|
|
- <p class="label-text">
|
|
|
- 招聘人数:{{ post.recruitCount }}
|
|
|
- </p>
|
|
|
- <p class="label-text">
|
|
|
- 招聘日期:
|
|
|
- {{ dayjs(post.startTime).format("YYYY-MM-DD") }}
|
|
|
- 至
|
|
|
- {{ dayjs(post.endTime).format("YYYY-MM-DD") }}
|
|
|
- </p>
|
|
|
- <!-- 岗位要求 -->
|
|
|
- <div class="post-desc-box">
|
|
|
- <div class="label-text post-desc" :ref="el => postDescBoxRef[postIndex] = el"
|
|
|
- :class="{'post-desc-max-height': post.descExpanded}">
|
|
|
- 岗位要求:{{ post.postDesc }}
|
|
|
+ <div v-if="dataType == 'post'" class="dataType-box">
|
|
|
+ <div class="list-box">
|
|
|
+ <div class="list-post-box margin-bottom-10" v-if="postList.length > 0"
|
|
|
+ v-for="(post, postIndex) in postList"
|
|
|
+ :key="postIndex">
|
|
|
+ <div class="post-title">
|
|
|
+ <span>{{ post.professionName }}</span>
|
|
|
+ <span class="post-salary">{{ showSalary(post.minSalary, post.maxSalary) }}</span>
|
|
|
</div>
|
|
|
- <div v-if="showLaunchBtnBox(postDescBoxRef,postIndex,36)">
|
|
|
+ <p class="label-text">
|
|
|
+ 招聘人数:{{ post.recruitCount }}
|
|
|
+ </p>
|
|
|
+ <p class="label-text">
|
|
|
+ 招聘日期:
|
|
|
+ {{ dayjs(post.startTime).format("YYYY-MM-DD") }}
|
|
|
+ 至
|
|
|
+ {{ dayjs(post.endTime).format("YYYY-MM-DD") }}
|
|
|
+ </p>
|
|
|
+ <!-- 岗位要求 -->
|
|
|
+ <div class="post-desc-box">
|
|
|
+ <div class="label-text post-desc" :ref="el => postDescBoxRef[postIndex] = el"
|
|
|
+ :class="{'post-desc-max-height': post.descExpanded}">
|
|
|
+ 岗位要求:{{ post.postDesc }}
|
|
|
+ </div>
|
|
|
+ <div v-if="showLaunchBtnBox(postDescBoxRef,postIndex,36)">
|
|
|
<span class="launch-btn" v-if="post.descExpanded"
|
|
|
@click.stop="post.descExpanded = false">展开</span>
|
|
|
- <span class="launch-btn " v-else @click.stop="post.descExpanded = true">收起</span>
|
|
|
+ <span class="launch-btn " v-else @click.stop="post.descExpanded = true">收起</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- 标签 -->
|
|
|
- <div class="company-label-box" v-if="post.labelList && post.labelList.length > 0"
|
|
|
- :ref="el => postLabelBoxRef[postIndex] = el" :class="{'label-box-max-height': post.labelExpanded}">
|
|
|
- <a-tag v-for="(label, labelIndex) in post.labelList" :key="labelIndex">
|
|
|
- {{ label.labelName }}
|
|
|
- </a-tag>
|
|
|
- <div v-if="showLaunchBtnBox(postLabelBoxRef,postIndex,50)">
|
|
|
+ <!-- 标签 -->
|
|
|
+ <div class="company-label-box" v-if="post.labelList && post.labelList.length > 0"
|
|
|
+ :ref="el => postLabelBoxRef[postIndex] = el" :class="{'label-box-max-height': post.labelExpanded}">
|
|
|
+ <a-tag v-for="(label, labelIndex) in post.labelList" :key="labelIndex">
|
|
|
+ {{ label.labelName }}
|
|
|
+ </a-tag>
|
|
|
+ <div v-if="showLaunchBtnBox(postLabelBoxRef,postIndex,50)">
|
|
|
<span class="launch-btn" v-if="post.labelExpanded"
|
|
|
@click.stop="post.labelExpanded = false">展开</span>
|
|
|
- <span class="launch-btn" v-else @click.stop="post.labelExpanded = true">收起</span>
|
|
|
+ <span class="launch-btn" v-else @click.stop="post.labelExpanded = true">收起</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="empty-box">
|
|
|
+ <a-empty/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-else class="empty-box">
|
|
|
- <a-empty/>
|
|
|
+ <!-- 分页控件 -->
|
|
|
+ <div class="pagination-box">
|
|
|
+ <span>共{{ postTotal }}个</span>
|
|
|
+ <a-pagination v-model:current="postSearchParams.pageIndex" :total="postTotal"
|
|
|
+ v-model:pageSize="postSearchParams.pageSize"
|
|
|
+ show-less-items @change="postPaginationChange" simple :show-size-changer="false"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 分页控件 -->
|
|
|
- <div class="pagination-box">
|
|
|
- <span>共{{ postTotal }}个</span>
|
|
|
- <a-pagination v-model:current="postSearchParams.pageIndex" :total="postTotal"
|
|
|
- v-model:pageSize="postSearchParams.pageSize"
|
|
|
- show-less-items @change="postPaginationChange" simple :show-size-changer="false"/>
|
|
|
+ <div v-if="dataType == 'signin'" class="dataType-box">
|
|
|
+ <!-- 服务记录时间轴 -->
|
|
|
+ <div v-if="signinList.length > 0" class="signin-list">
|
|
|
+ <a-timeline>
|
|
|
+ <a-timeline-item v-for="(signin, key) in signinList" :key="key" position="left">
|
|
|
+ <p>{{ dayjs(signin.signinTime).format('YYYY-MM-DD') }}</p>
|
|
|
+ <p>{{ signin.siteName }}{{ signin.signinUserName }}进行走访服务</p>
|
|
|
+ </a-timeline-item>
|
|
|
+ </a-timeline>
|
|
|
+ </div>
|
|
|
+ <div v-else class="empty-box">
|
|
|
+ <a-empty description="暂无服务记录"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="searchType == 'post'"
|
|
@@ -335,13 +368,14 @@ import {onMounted, reactive, ref} from "vue";
|
|
|
import huiZhouGeoJSON from "./geo";
|
|
|
import {getPosition, setBoundary} from "@/utils/position";
|
|
|
import redThIcon from "@/assets/images/redTh1.png";
|
|
|
-import redThIcon3 from "@/assets/images/redTh4.png";
|
|
|
+import redThIcon4 from "@/assets/images/redTh4.png";
|
|
|
import blueThIcon from "@/assets/images/blueTh1.png";
|
|
|
+import greenThIcon from "@/assets/images/greenTh.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 {getCompanySigninList, getDataMapList, getDataMapListByPostName} from "@/api/companyService/company";
|
|
|
import {getCompanyMapPostList} from "@/api/companyService/post";
|
|
|
import dayjs from "dayjs";
|
|
|
import avtO1 from "@/assets/images/avt01.png";
|
|
@@ -367,10 +401,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>>([])
|
|
|
// 企业分页条数
|
|
@@ -388,6 +427,10 @@ const postSearchParams = reactive({
|
|
|
const postList = ref<Array<any>>([]);
|
|
|
// 岗位分页总条数
|
|
|
const postTotal = ref(0);
|
|
|
+// 当前选中的企业的打卡服务记录
|
|
|
+const signinList = ref<Array<any>>([])
|
|
|
+// 企业详情显示内容tab
|
|
|
+const dataType = ref("post");
|
|
|
|
|
|
// 范围列表
|
|
|
const rangeList = [
|
|
@@ -507,33 +550,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();
|
|
|
})
|
|
|
}
|
|
@@ -593,7 +651,12 @@ function setCompanyMarker(setCenter: boolean) {
|
|
|
iconAnchor: sizeData.iconAnchor
|
|
|
})
|
|
|
const icon_red = new T.Icon({
|
|
|
- iconUrl: redThIcon3,
|
|
|
+ iconUrl: redThIcon4,
|
|
|
+ iconSize: new T.Point(sizeData.iconSize, sizeData.iconSize),
|
|
|
+ iconAnchor: sizeData.iconAnchor
|
|
|
+ })
|
|
|
+ const icon_green = new T.Icon({
|
|
|
+ iconUrl: greenThIcon,
|
|
|
iconSize: new T.Point(sizeData.iconSize, sizeData.iconSize),
|
|
|
iconAnchor: sizeData.iconAnchor
|
|
|
})
|
|
@@ -607,6 +670,11 @@ function setCompanyMarker(setCenter: boolean) {
|
|
|
icon: icon_blue
|
|
|
}); // 创建标注
|
|
|
}
|
|
|
+ if (item.signinCount >= 1) {
|
|
|
+ marker = new T.Marker(point, {
|
|
|
+ icon: icon_green
|
|
|
+ }); // 创建标注
|
|
|
+ }
|
|
|
if (item.creditRecordCount >= 1) {
|
|
|
marker = new T.Marker(point, {
|
|
|
icon: icon_red
|
|
@@ -684,18 +752,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,10 +818,11 @@ 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();
|
|
|
+ await findCompanySigninList();
|
|
|
}
|
|
|
|
|
|
// 企业信息鼠标移入移出事件
|
|
@@ -775,6 +844,13 @@ async function findPostList() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+// 查询企业的打卡服务记录
|
|
|
+async function findCompanySigninList() {
|
|
|
+ await getCompanySigninList(nowCheckCompany.value.companyID).then((result: any) => {
|
|
|
+ signinList.value = result;
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 企业分页器页码变更事件
|
|
|
function postPaginationChange() {
|
|
|
findPostList();
|
|
@@ -850,6 +926,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();
|
|
@@ -1038,6 +1135,10 @@ export default {
|
|
|
.check-company-red {
|
|
|
border: 1px solid red;
|
|
|
}
|
|
|
+
|
|
|
+ .check-company-green {
|
|
|
+ border: 1px solid #00ff00;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1054,6 +1155,20 @@ export default {
|
|
|
right: 0;
|
|
|
border-radius: 10px;
|
|
|
|
|
|
+ .dataType-box {
|
|
|
+ height: 72%;
|
|
|
+
|
|
|
+ .signin-list {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ padding: 15px;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.company-info-post-list {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -1123,7 +1238,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.list-box {
|
|
|
- height: calc(100% - 260px);
|
|
|
+ height: calc(100% - 40px);
|
|
|
|
|
|
.list-post-box {
|
|
|
padding: 8px;
|