浏览代码

fix: 驿站工作人员外出轨迹地图

zhangying 3 月之前
父节点
当前提交
59ef7448ed

+ 6 - 1
doc/待更新脚本.txt

@@ -33,4 +33,9 @@ alter table pc_signin add constraint FK_Pc_Signin_Ref_Site foreign key (SiteID)
  INSERT INTO `sys_dictionary_item` (`DictionaryItemID`, `Code`, `DictionaryCode`, `Value`, `Name`, `OrderNo`, `RecordStatus`, `IsEditable`) VALUES
  INSERT INTO `sys_dictionary_item` (`DictionaryItemID`, `Code`, `DictionaryCode`, `Value`, `Name`, `OrderNo`, `RecordStatus`, `IsEditable`) VALUES
  ('ac93ede5-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 1, '走访企业', 1, 1, 0),
  ('ac93ede5-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 1, '走访企业', 1, 1, 0),
  ('b100cbf2-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 2, '走访人员', 2, 1, 0),
  ('b100cbf2-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 2, '走访人员', 2, 1, 0),
- ('b4ec8c51-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 3, '其他外联事项', 3, 1, 0);
+ ('b4ec8c51-538d-11ef-8d63-7085c2a9999e', '', 'SigninType', 3, '其他外联事项', 3, 1, 0);
+
+ -- 2024-08-06 驿站工作人员外出地图菜单
+ INSERT INTO sys_function_code VALUES ('T011004', '驿站工作人员外出地图', 'T0110', 4);
+ INSERT INTO `sys_menu` VALUES ('T011004', 4, '驿站工作人员外出地图', NULL, 'views/dataMap/siteUserWorkDataMap', '/siteUserWorkDataMap', 'T0110', NULL, 0, 1, 1, 'T011004', 1, NULL, 1);
+ insert into sys_role_sys_function_code (`RoleID`, `FunctionCode`) values('20afde90-a81a-11ed-a6c5-7085c2a9999e','T011004');

+ 12 - 3
src/main/java/com/hz/employmentsite/controller/baseSettings/SiteUserController.java

@@ -148,14 +148,23 @@ public class SiteUserController {
 
 
     @GetMapping("/dataMap")
     @GetMapping("/dataMap")
     public BaseResponse<PageInfo<SiteUserMapVo>> getDataMapList(@RequestParam int pageIndex, @RequestParam int pageSize,
     public BaseResponse<PageInfo<SiteUserMapVo>> getDataMapList(@RequestParam int pageIndex, @RequestParam int pageSize,
-                                                             @RequestParam(required = false) String siteUserName, @RequestParam(required = false) String regionCode,
-                                                             @RequestParam(required = false) String streetCode, @RequestParam(required = false) String siteID){
+                                                                @RequestParam(required = false) String siteUserName, @RequestParam(required = false) String regionCode,
+                                                                @RequestParam(required = false) String streetCode, @RequestParam(required = false) String siteID){
         PageInfo<SiteUserMapVo> result = userInfoService.getDataMapList(pageIndex, pageSize, siteUserName, regionCode, streetCode, siteID);
         PageInfo<SiteUserMapVo> result = userInfoService.getDataMapList(pageIndex, pageSize, siteUserName, regionCode, streetCode, siteID);
         return RespGenerstor.success(result);
         return RespGenerstor.success(result);
     }
     }
 
 
+    @GetMapping("/siteUserWorkDataMap")
+    public BaseResponse<PageInfo<SiteUserMapVo>> getDataMapListBySiteUserWorkMap(@RequestParam int pageIndex, @RequestParam int pageSize,
+                                                                                 @RequestParam(required = false) String siteUserName, @RequestParam(required = false) String regionCode,
+                                                                                 @RequestParam(required = false) String siteID, @RequestParam(required = false) Date startDate,
+                                                                                 @RequestParam(required = false) Date endDate) {
+        PageInfo<SiteUserMapVo> result = userInfoService.getDataMapListBySiteUserWorkMap(pageIndex, pageSize, siteUserName, regionCode, siteID, startDate, endDate);
+        return RespGenerstor.success(result);
+    }
+
     @GetMapping("/dataCount")
     @GetMapping("/dataCount")
-    public BaseResponse<Map> findUserDataCount(@RequestParam String userID){
+    public BaseResponse<Map> findUserDataCount(@RequestParam String userID) {
         Map<String, Object> result = userInfoService.findUserDataCount(userID);
         Map<String, Object> result = userInfoService.findUserDataCount(userID);
         return RespGenerstor.success(result);
         return RespGenerstor.success(result);
     }
     }

+ 21 - 0
src/main/java/com/hz/employmentsite/mapper/cquery/UserInfoCQuery.java

@@ -2,8 +2,10 @@ package com.hz.employmentsite.mapper.cquery;
 
 
 import com.hz.employmentsite.vo.baseSettings.SiteUserVo;
 import com.hz.employmentsite.vo.baseSettings.SiteUserVo;
 import com.hz.employmentsite.vo.dataMap.SiteUserMapVo;
 import com.hz.employmentsite.vo.dataMap.SiteUserMapVo;
+import com.hz.employmentsite.vo.signin.SigninVo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
@@ -34,6 +36,25 @@ public interface UserInfoCQuery {
     List<SiteUserMapVo> getDataMapList(@Param("siteUserName") String siteUserName, @Param("regionCode") String regionCode,
     List<SiteUserMapVo> getDataMapList(@Param("siteUserName") String siteUserName, @Param("regionCode") String regionCode,
                                        @Param("streetCode") String streetCode, @Param("siteID") String siteID);
                                        @Param("streetCode") String streetCode, @Param("siteID") String siteID);
 
 
+    /**
+     * 驿站工作人员地图查询驿站人员
+     * @param siteUserName 人员名称
+     * @param regionCode 所属县区
+     * @param siteID 所属驿站
+     * @return 驿站人员列表
+     */
+    List<SiteUserMapVo> getDataMapListBySiteUserWorkMap(@Param("siteUserName") String siteUserName, @Param("regionCode") String regionCode, @Param("siteID") String siteID);
+
+    /**
+     * 获取驿站人员的外出工作记录
+     * @param siteUserIDList 驿站人员ID
+     * @param startDate 开始日期
+     * @param endDate 结束日期
+     */
+    List<SigninVo> getSiteUserSigninList(@Param("siteUserIDList") String siteUserIDList,
+                                       @Param("startDate") Date startDate,
+                                       @Param("endDate") Date endDate);
+
     /**
     /**
      * 查询驿站人员登记的业务数据数量
      * 查询驿站人员登记的业务数据数量
      */
      */

+ 34 - 0
src/main/java/com/hz/employmentsite/services/impl/baseSettings/SiteUserImpl.java

@@ -14,6 +14,7 @@ import com.hz.employmentsite.util.DateUtils;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.vo.baseSettings.SiteUserVo;
 import com.hz.employmentsite.vo.baseSettings.SiteUserVo;
 import com.hz.employmentsite.vo.dataMap.SiteUserMapVo;
 import com.hz.employmentsite.vo.dataMap.SiteUserMapVo;
+import com.hz.employmentsite.vo.signin.SigninVo;
 import net.sourceforge.pinyin4j.PinyinHelper;
 import net.sourceforge.pinyin4j.PinyinHelper;
 import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
 import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
 import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
 import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
@@ -525,4 +526,37 @@ public class SiteUserImpl implements SiteUserService {
     public Map<String, Object> findUserDataCount(String userID) {
     public Map<String, Object> findUserDataCount(String userID) {
         return userInfoCQuery.findUserDataCount(userID);
         return userInfoCQuery.findUserDataCount(userID);
     }
     }
+
+    /**
+     * 驿站工作人员外出数据地图查询驿站人员
+     */
+    @Override
+    public PageInfo<SiteUserMapVo> getDataMapListBySiteUserWorkMap(int pageIndex, int pageSize, String siteUserName, String regionCode, String siteID, Date startDate, Date endDate) {
+        PageHelper.startPage(pageIndex, pageSize);
+        List<SiteUserMapVo> dataMapList = userInfoCQuery.getDataMapListBySiteUserWorkMap(siteUserName, regionCode, siteID);
+        PageInfo<SiteUserMapVo> result = new PageInfo(dataMapList);
+
+        // 获取所有的企业ID
+        List<String> siteUserIDs = result.getList().stream()
+                .filter(Objects::nonNull)
+                .map(SiteUserMapVo::getSiteUserID)
+                .filter(Objects::nonNull).toList();
+
+        if (!siteUserIDs.isEmpty()){
+            List<SigninVo> siteUserSigninList = userInfoCQuery.getSiteUserSigninList(stringUtils.ListToInSql(siteUserIDs), startDate, endDate);
+            Map<String, List<SigninVo>> signinMap = (siteUserSigninList != null) ?
+                    siteUserSigninList.stream()
+                            .filter(Objects::nonNull)
+                            .collect(Collectors.groupingBy(SigninVo::getSiteUserID))
+                    : new HashMap<>();
+            // 填充岗位数据
+            result.getList().forEach(siteUser -> {
+                if (siteUser != null && siteUser.getSiteUserID() != null) {
+                    siteUser.setSigninList(signinMap.getOrDefault(siteUser.getSiteUserID(), new ArrayList<>()));
+                }
+            });
+        }
+
+        return result;
+    }
 }
 }

+ 8 - 0
src/main/java/com/hz/employmentsite/services/service/baseSettings/SiteUserService.java

@@ -5,6 +5,7 @@ import com.hz.employmentsite.model.SelectProps;
 import com.hz.employmentsite.vo.baseSettings.SiteUserVo;
 import com.hz.employmentsite.vo.baseSettings.SiteUserVo;
 import com.hz.employmentsite.vo.dataMap.SiteUserMapVo;
 import com.hz.employmentsite.vo.dataMap.SiteUserMapVo;
 
 
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
@@ -42,6 +43,13 @@ public interface SiteUserService {
     PageInfo<SiteUserMapVo> getDataMapList(int pageIndex, int pageSize, String siteUserName,
     PageInfo<SiteUserMapVo> getDataMapList(int pageIndex, int pageSize, String siteUserName,
                                            String regionCode, String streetCode, String siteID);
                                            String regionCode, String streetCode, String siteID);
 
 
+    /**
+     * 驿站工作人员外出数据地图查询驿站人员
+     */
+    PageInfo<SiteUserMapVo> getDataMapListBySiteUserWorkMap(int pageIndex, int pageSize, String siteUserName,
+                                                            String regionCode, String siteID, Date startDate,
+                                                            Date endDate);
+
     /**
     /**
      * 查询驿站人员登记的业务数据数量
      * 查询驿站人员登记的业务数据数量
      */
      */

+ 5 - 0
src/main/java/com/hz/employmentsite/vo/dataMap/SiteUserMapVo.java

@@ -1,7 +1,10 @@
 package com.hz.employmentsite.vo.dataMap;
 package com.hz.employmentsite.vo.dataMap;
 
 
+import com.hz.employmentsite.vo.signin.SigninVo;
 import lombok.Data;
 import lombok.Data;
 
 
+import java.util.List;
+
 @Data
 @Data
 public class SiteUserMapVo {
 public class SiteUserMapVo {
     private String siteUserID;
     private String siteUserID;
@@ -25,4 +28,6 @@ public class SiteUserMapVo {
     private String longitude;
     private String longitude;
 
 
     private String latitude;
     private String latitude;
+
+    private List<SigninVo> signinList;
 }
 }

+ 14 - 0
src/main/java/com/hz/employmentsite/vo/signin/SigninVo.java

@@ -10,9 +10,23 @@ import java.util.Date;
 @NoArgsConstructor
 @NoArgsConstructor
 @AllArgsConstructor
 @AllArgsConstructor
 public class SigninVo {
 public class SigninVo {
+    private String siteUserID;
+
     private Date signinTime;
     private Date signinTime;
 
 
+    private Integer signinType;
+
+    private String content;
+
+    private String longitude;
+
+    private String latitude;
+
     private String siteName;
     private String siteName;
 
 
     private String signinUserName;
     private String signinUserName;
+
+    private String companyName;
+
+    private String jobUserName;
 }
 }

+ 59 - 0
src/main/resources/mapping/cquery/SiteUserCQuery.xml

@@ -134,6 +134,65 @@
         siteUser.CreateTime DESC
         siteUser.CreateTime DESC
     </select>
     </select>
 
 
+    <select id="getDataMapListBySiteUserWorkMap" resultType="com.hz.employmentsite.vo.dataMap.SiteUserMapVo">
+        SELECT
+            siteUser.siteUserID,
+            siteUser.SiteUserName,
+            siteUser.userNo,
+            siteUser.Mobile,
+            site.siteName
+        FROM
+            pc_site_user siteUser
+                LEFT JOIN pc_site site ON siteUser.SiteID = site.SiteID
+        WHERE
+            1=1
+            <if test="siteUserName!='' and siteUserName!=null">
+                and siteUser.siteUserName like Concat('%', #{siteUserName}, '%')
+            </if>
+            <if test="siteID!='' and siteID!=null">
+                and siteUser.siteID = #{siteID}
+            </if>
+            <if test="regionCode!='' and regionCode!=null">
+                and site.regionCode = #{regionCode}
+            </if>
+        ORDER BY
+            siteUser.CreateTime DESC
+    </select>
+
+    <select id="getSiteUserSigninList" resultType="com.hz.employmentsite.vo.signin.SigninVo">
+        SELECT
+            siteUser.SiteUserID,
+            signin.SigninTime,
+            signin.SigninType,
+            signin.Content,
+            signin.Longitude,
+            signin.Latitude,
+            company.CompanyName,
+            jobUser.`Name` AS jobUserName
+        FROM
+            pc_signin signin
+                LEFT JOIN pc_company company ON signin.CompanyID = company.CompanyID
+                LEFT JOIN pc_jobuser jobUser ON signin.JobuserID = jobUser.JobuserID
+                LEFT JOIN pc_site_user siteUser ON signin.CreateUserID = siteUser.UserID
+        WHERE
+            1=1
+            <if test="siteUserIDList!='' and siteUserIDList!=null">
+                and siteUser.siteUserID in (${siteUserIDList})
+            </if>
+            <if test="startDate != null and endDate == null">
+                and Date(signin.SigninTime) <![CDATA[ >= ]]> Date(#{startDate})
+            </if>
+            <if test="endDate != null and startDate == null">
+                and Date(signin.SigninTime) <![CDATA[ <= ]]> Date(#{endDate})
+            </if>
+            <if test="startDate != null and endDate != null">
+                and Date(signin.SigninTime) <![CDATA[ >= ]]> Date(#{startDate})
+                and Date(signin.SigninTime) <![CDATA[ <= ]]> Date(#{endDate})
+            </if>
+        ORDER BY
+            signin.SigninTime DESC
+    </select>
+
     <select id="findUserDataCount" resultType="Map">
     <select id="findUserDataCount" resultType="Map">
         SELECT
         SELECT
             (SELECT COUNT(1) FROM pc_company WHERE CreateUserID = #{userID}) AS companyCount,
             (SELECT COUNT(1) FROM pc_company WHERE CreateUserID = #{userID}) AS companyCount,

+ 13 - 0
vue/src/api/baseSettings/userInfo.ts

@@ -109,6 +109,19 @@ export function getSiteUserDataMapList(params: any) {
   );
   );
 }
 }
 
 
+export function getDataMapListBySiteUserWorkMap(params: any) {
+  return request<object>(
+    {
+      url: "userInfo/siteUserWorkDataMap",
+      method: 'get',
+      params: params,
+    },
+    {
+      isNew: true,
+    },
+  );
+}
+
 export function findUserDataCount(userID: any) {
 export function findUserDataCount(userID: any) {
   return request<object>(
   return request<object>(
     {
     {

+ 10 - 1
vue/src/router/outsideLayout.ts

@@ -40,6 +40,15 @@ export const jobUserDataMapRoute: RouteRecordRaw = {
   },
   },
 };
 };
 
 
+export const SiteUserWorkDataMapRoute: RouteRecordRaw = {
+  path: '/dataMap/siteUserWorkDataMap',
+  name: 'dataMap_siteUserWorkDataMap',
+  component: () => import('@/views/dataMap/siteUserWorkDataMap.vue'),
+  meta: {
+    title: '惠州市就业驿站管理系统',
+  },
+};
+
 export const dataScreenIndexRoute: RouteRecordRaw = {
 export const dataScreenIndexRoute: RouteRecordRaw = {
   path: '/dataScreen/dataScreenIndex',
   path: '/dataScreen/dataScreenIndex',
   name: 'dataScreenIndex',
   name: 'dataScreenIndex',
@@ -76,4 +85,4 @@ export const dataScreenSysServiceRoute: RouteRecordRaw = {
   },
   },
 };
 };
 
 
-export default [LoginRoute, companyDataMapRoute, siteDataMapRoute, jobUserDataMapRoute, dataScreenIndexRoute, dataScreenCompanyRoute, dataScreenJobUserRoute, dataScreenSysServiceRoute];
+export default [LoginRoute, companyDataMapRoute, siteDataMapRoute, jobUserDataMapRoute, SiteUserWorkDataMapRoute, dataScreenIndexRoute, dataScreenCompanyRoute, dataScreenJobUserRoute, dataScreenSysServiceRoute];

+ 442 - 0
vue/src/views/dataMap/siteUserWorkDataMap.vue

@@ -0,0 +1,442 @@
+<template>
+  <div>
+    <div class="map-box">
+      <!-- 地图 -->
+      <div
+        id="mapDiv"
+      ></div>
+      <!-- 查询表单与列表展示 -->
+      <div class="site-search-data-box">
+        <!-- 查询表单区域 -->
+        <div class="search-input-box">
+          <!-- 查询表单区域 -->
+          <div class="search-input-box">
+            <a-input-search
+              v-model:value="siteUserSearchParam.siteUserName"
+              placeholder="请输入驿站工作人员姓名"
+              enter-button
+              :loading="searchLoading"
+              style="width: 100%"
+              @search="onSearch"
+            />
+          </div>
+        </div>
+        <!-- 数据列表 -->
+        <div class="select-data-box">
+          <!-- 下拉框查询部分 -->
+          <div class="select-input-box flex-box items-center" style="flex-wrap: wrap">
+            <a-date-picker style="width: 50%;" v-model:value="siteUserSearchParam.startDate" value-format="YYYY-MM-DD"
+                           placeholder="请选择开始日期" :allow-clear="false" @change="changeRegion"/>
+            <a-date-picker style="width: 50%;" v-model:value="siteUserSearchParam.endDate" value-format="YYYY-MM-DD"
+                           placeholder="请选择结束日期" :allow-clear="false" @change="changeRegion"/>
+            <a-select
+              style="width: 50%;"
+              v-model:value="siteUserSearchParam.regionCode"
+              :allow-clear="true"
+              :options="regionList"
+              :field-names="{ label: 'name', value: 'code' }"
+              :bordered="false"
+              placeholder="所属县区"
+              @change="changeRegion"
+            >
+            </a-select>
+            <a-select
+              style="width: 50%;"
+              v-model:value="siteUserSearchParam.siteID"
+              :options="siteDicList"
+              :field-names="{ label: 'siteName', value: 'siteID' }"
+              :allow-clear="true"
+              :bordered="false"
+              :disabled="searchType == 'site'"
+              placeholder="所属驿站"
+              @change="onSearch"
+            >
+            </a-select>
+          </div>
+          <!-- 数据列表部分 -->
+          <div class="list-box">
+            <!-- 驿站人员数据 -->
+            <div v-if="siteUserList.length > 0" class="site-data"
+                 :class="{'check-site':nowCheckSiteUser.siteUserID == siteUser.siteUserID || nowMouseenterSiteUser.siteUserID == siteUser.siteUserID}"
+                 v-for="(siteUser,siteIndex) in siteUserList"
+                 :key="siteIndex"
+                 @click="checkSiteUser(siteUser)"
+                 @mouseenter="siteUserMouseenter(siteUser)"
+                 @mouseleave="siteUserMouseenter({siteUserID:null})"
+            >
+              <p class="site-name">
+                {{ siteUser.siteUserName }}
+              </p>
+              <p class="label-text">
+                工号:{{ siteUser.userNo }}
+              </p>
+              <p class="label-text">
+                联系电话:{{ siteUser.mobile }}
+              </p>
+              <p class="label-text">
+                所属驿站:{{ siteUser.siteName }}
+              </p>
+            </div>
+            <div
+              v-if="searchType == 'siteUser' && siteUserList.length == 0"
+              class="empty-box">
+              <a-empty/>
+            </div>
+          </div>
+        </div>
+        <!-- 分页控件 -->
+        <div class="pagination-box">
+          <span>共{{ paginationTotal }}人</span>
+          <a-pagination v-model:current="siteUserSearchParam.pageIndex" :total="paginationTotal"
+                        v-model:pageSize="siteUserSearchParam.pageSize" :disabled="searchLoading"
+                        show-less-items @change="onSearch" simple :show-size-changer="false"/>
+        </div>
+      </div>
+      <!-- 驿站人员信息详情 -->
+      <div class="site-user-info-box" v-if="nowCheckSiteUser.siteUserID != null">
+        <div class="user-info-box margin-bottom-10">
+          <p class="font-size-18 margin-bottom-8" style="font-weight: 600; text-align: center">
+            {{ nowCheckSiteUser.siteUserName }}
+          </p>
+        </div>
+        <!-- 服务记录时间轴 -->
+        <div v-if="nowCheckSiteUser.signinList.length > 0" class="serviceRecords-list">
+          <p class="margin-bottom-10">服务记录</p>
+          <a-timeline>
+            <a-timeline-item v-for="(service, key) in nowCheckSiteUser.signinList" :key="key" position="left">
+              <p>{{ dayjs(service.signinTime).format('YYYY-MM-DD HH:mm') }}</p>
+              <p v-if="service.signinType == 1">走访{{ service.companyName }}</p>
+              <p v-if="service.signinType == 2">走访{{ service.jobUserName }}人员信息</p>
+              <p v-if="service.signinType == 3">外出走访({{ service.content }})</p>
+            </a-timeline-item>
+          </a-timeline>
+        </div>
+        <div v-else class="empty-box">
+          <a-empty description="暂无服务记录"/>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import huiZhouGeoJSON from "./geo"
+import {onMounted, reactive, ref} from "vue";
+import {setBoundary} from "@/utils/position";
+import type {SelectProps} from "ant-design-vue";
+import {getSiteList} from "@/api/baseSettings/siteInfo";
+import {getRegionCodeList} from "@/api/system/area/index";
+import redTh from "@/assets/images/redTh.png"
+import dayjs from "dayjs";
+import {getDataMapListBySiteUserWorkMap} from "@/api/baseSettings/userInfo";
+
+const T = (window as any).T;
+const zoom = 9;
+let map = null;
+// 天地图默认中心点坐标
+const centerLngLat = new T.LngLat(114.416110, 23.111582);
+// 地图标记点
+let markerList = ref<Array<any>>([]);
+// 地图画线
+let lineList = ref<Array<any>>([]);
+
+// 驿站人员查询数据
+const siteUserSearchParam = reactive({
+  pageIndex: 1,
+  pageSize: 100,
+  siteUserName: "",
+  regionCode: null,
+  siteID: null,
+  startDate: dayjs(new Date()).format('YYYY-MM-DD'),
+  endDate: dayjs(new Date()).format('YYYY-MM-DD'),
+});
+// 驿站人员列表
+const siteUserList = ref<Array<any>>([]);
+// 查询加载动画
+const searchLoading = ref(false);
+// 县区数据
+const regionList = ref<SelectProps['options']>();
+// 驿站下拉框数据
+const siteDicList = ref<any>([]);
+// 选中的驿站人员
+const nowCheckSiteUser = ref<any>({siteUserID: null})
+// 鼠标经过的驿站
+const nowMouseenterSiteUser = ref<any>({siteUserID: null});
+// 驿站总条数
+const paginationTotal = ref(0)
+
+// 地图初始化
+const initMap = () => {
+  // 初始化容器
+  map = new T.Map('mapDiv');
+  if (map != null) {
+    // 设置地图显示中心点为惠州市人民政府
+    (map as any).centerAndZoom(centerLngLat, zoom);
+    (map as any).setMinZoom(5);
+    (map as any).setMaxZoom(14);
+  }
+  // 设置城市边界
+  setBoundary(map, T, huiZhouGeoJSON);
+};
+
+// 查询方法
+async function onSearch() {
+  // 清除地图标记点
+  delMapInfo();
+  await getDataMapListBySiteUserWorkMap({...siteUserSearchParam}).then((result: any) => {
+    siteUserList.value = result.list;
+    paginationTotal.value = result.total;
+
+    // 初始化地图标点图标
+    const icon_red = new T.Icon({
+      iconUrl: redTh,
+      iconSize: new T.Point(20, 20)
+    })
+
+    // 绘制地图标点
+    result.list.forEach((siteUser: any) => {
+      if (siteUser.signinList.length > 0) {
+        const points = new Array<any>();
+
+        siteUser.signinList.forEach((signin) => {
+          if (signin.longitude && signin.latitude) {
+            // 保存坐标点
+            points.push(new T.LngLat(signin.longitude, signin.latitude))
+
+            const point = new T.LngLat(signin.longitude, signin.latitude)
+            const marker = new T.Marker(point, {
+              icon: icon_red
+            }); // 创建标注
+            (map as any).addOverLay(marker);// 将标注添加到地图中
+            markerList.value.push(marker);
+          }
+        })
+
+        // 在地图上画线
+        const line = new T.Polyline(points, {
+          color: "#c00020"
+        });
+        (map as any).addOverLay(line); //向地图上添加线
+        lineList.value.push(line);
+      }
+    })
+  });
+}
+
+// 查询县区
+const getRegionList = async function () {
+  regionList.value = await getRegionCodeList();
+}
+// 县区变更事件
+const changeRegion = async function () {
+  if (siteUserSearchParam.regionCode) {
+    getSiteList({pageIndex: 1, pageSize: 9999, regionCode: siteUserSearchParam.regionCode}).then((result: any) => {
+      siteDicList.value = result.list;
+    })
+  } else {
+    siteDicList.value = [];
+  }
+  await onSearch();
+}
+
+// 选择站点人员
+async function checkSiteUser(siteUser: any) {
+  nowCheckSiteUser.value = JSON.parse(JSON.stringify(siteUser));
+  // 清除地图标其他记点
+  delMapInfo();
+  if (siteUser.signinList.length >= 0) {
+    // 设置中心点
+    (map as any).centerAndZoom(new T.LngLat(siteUser.signinList[0].longitude, siteUser.signinList[0].latitude), 14);
+    // 绘制当前选择驿站人员的画线
+    const icon_red = new T.Icon({
+      iconUrl: redTh,
+      iconSize: new T.Point(20, 20)
+    })
+    const points = new Array<any>();
+    siteUser.signinList.forEach((signin) => {
+      if (signin.longitude && signin.latitude) {
+        // 保存坐标点
+        points.push(new T.LngLat(signin.longitude, signin.latitude))
+
+        const point = new T.LngLat(signin.longitude, signin.latitude)
+        const marker = new T.Marker(point, {
+          icon: icon_red
+        }); // 创建标注
+        (map as any).addOverLay(marker);// 将标注添加到地图中
+        markerList.value.push(marker);
+      }
+    })
+    // 在地图上画线
+    const line = new T.Polyline(points, {
+      color: "#c00020"
+    });
+    (map as any).addOverLay(line); //向地图上添加线
+    lineList.value.push(line);
+  }
+}
+
+// 站点人员鼠标经过事件
+function siteUserMouseenter(siteUser: any) {
+  nowMouseenterSite.value = siteUser;
+}
+
+// 清空地图标点
+function delMapInfo() {
+  // 删除已有标点
+  if (markerList.value.length > 0) {
+    for (let i = 0; i < markerList.value.length; i++) {
+      (map as any).removeOverLay(markerList.value[i]);
+    }
+    markerList.value = [];
+  }
+  if (lineList.value.length > 0) {
+    for (let i = 0; i < lineList.value.length; i++) {
+      (map as any).removeOverLay(lineList.value[i]);
+    }
+    lineList.value = [];
+  }
+  (map as any).closeInfoWindow();
+}
+
+onMounted(() => {
+  // 获取当前日期与7天前的日期
+  // 获取当天日期
+  const today = dayjs();
+  // 获取7天前的日期
+  const sevenDaysAgo = today.subtract(7, 'day');
+  siteUserSearchParam.startDate = sevenDaysAgo.format('YYYY-MM-DD');
+  siteUserSearchParam.endDate = today.format('YYYY-MM-DD');
+
+  initMap();
+  getRegionList();
+  onSearch();
+})
+</script>
+
+<script lang="ts">
+// 设置页面名称进行组件缓存
+export default {
+  name: "SiteUserWorkDataMap"
+}
+</script>
+
+<style lang="less">
+.map-box {
+  width: 100vw;
+  height: 100vh;
+  position: relative;
+  border: 1px rgba(173, 173, 173, 0.8) solid;
+  box-sizing: border-box;
+
+  #mapDiv {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 100;
+  }
+
+  .site-search-data-box {
+    width: 360px;
+    position: absolute;
+    top: 15px;
+    bottom: 5px;
+    left: 15px;
+    right: 390px;
+    z-index: 110;
+
+    .search-input-box {
+      width: 100%;
+      margin-bottom: 10px;
+    }
+
+    .select-data-box {
+      height: calc(100% - 95px);
+      background-color: #F8F8F8;
+      border-radius: 10px 10px 0 0;
+      padding: 10px;
+
+      .select-input-box {
+        width: 100%;
+        display: flex;
+        align-items: center;
+        background-color: white;
+        padding: 5px;
+        margin-bottom: 10px;
+        border-radius: 10px;
+      }
+
+      .list-box {
+        max-height: calc(100% - 100px);
+        overflow: hidden;
+        overflow-y: auto;
+
+        .site-data {
+          background-color: white;
+          border-radius: 10px;
+          padding: 8px;
+          cursor: pointer;
+          margin-bottom: 10px;
+          box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.3);
+          box-sizing: border-box;
+          border: 1px solid white;
+        }
+
+        .check-site {
+          border-color: #007EFF;
+        }
+      }
+    }
+  }
+
+  .site-user-info-box {
+    width: 300px;
+    position: absolute;
+    top: 15px;
+    left: calc(100% - 330px);
+    right: 15px;
+    bottom: 15px;
+    z-index: 110;
+    border-radius: 10px;
+    background-color: white;
+    padding: 15px;
+  }
+
+  .pagination-box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding: 10px 10px;
+    background-color: #F8F8F8;
+    border-radius: 0 0 10px 10px;
+  }
+
+  .empty-box {
+    width: 100%;
+    height: 450px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+
+  .ant-btn, .ant-input, .ant-picker, .ant-picker-input, .ant-picker-focused {
+    border: none !important;
+    box-shadow: none !important;
+  }
+
+  input {
+    height: 32px;
+  }
+
+  .ant-select:not(.ant-select-customize-input) .ant-select-selector,
+  .ant-select:not(.ant-select-customize-input) .ant-select-selector,
+  .ant-input-affix-wrapper, .ant-select-selector {
+    border: none !important;
+    box-shadow: none !important;
+  }
+
+  .ant-select:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) > .ant-select-selector {
+    border-color: transparent;
+    box-shadow: none;
+  }
+}
+</style>