瀏覽代碼

wuzhen update

wuzhen 1 年之前
父節點
當前提交
d7e900a64f

+ 10 - 0
backend/ruoyi-modules/ruoyi-zsjy/src/main/java/org/dromara/zsjy/domain/bo/ZsjyGraduateInfoBo.java

@@ -144,16 +144,19 @@ public class ZsjyGraduateInfoBo extends BaseEntity {
     /**
     /**
      * 邮箱地址
      * 邮箱地址
      */
      */
+    @Size(max = 100, message = "邮箱地址长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
     private String email;
     private String email;
 
 
     /**
     /**
      * QQ号码
      * QQ号码
      */
      */
+    @Size(max = 20, message = "QQ号码长度不能超过20个字符", groups = { AddGroup.class, EditGroup.class })
     private String qqNumber;
     private String qqNumber;
 
 
     /**
     /**
      * 微信号码
      * 微信号码
      */
      */
+    @Size(max = 30, message = "微信号码长度不能超过30个字符", groups = { AddGroup.class, EditGroup.class })
     private String wechatNumber;
     private String wechatNumber;
 
 
     /**
     /**
@@ -174,11 +177,14 @@ public class ZsjyGraduateInfoBo extends BaseEntity {
     /**
     /**
      * 详细地址
      * 详细地址
      */
      */
+    @Size(max = 200, message = "详细地址长度不能超过200个字符", groups = { AddGroup.class, EditGroup.class })
     private String detailAddress;
     private String detailAddress;
 
 
     /**
     /**
      * 邮政编码
      * 邮政编码
      */
      */
+    @Size(max = 10, message = "邮政编码长度不能超过10个字符", groups = { AddGroup.class, EditGroup.class })
+    @Pattern(regexp = "^\\d{6}$", message = "邮政编码格式不正确,应为6位数字", groups = { AddGroup.class, EditGroup.class })
     private String postalCode;
     private String postalCode;
 
 
     /**
     /**
@@ -190,6 +196,7 @@ public class ZsjyGraduateInfoBo extends BaseEntity {
     /**
     /**
      * 就业单位名称
      * 就业单位名称
      */
      */
+    @Size(max = 100, message = "就业单位名称长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
     private String employmentCompany;
     private String employmentCompany;
 
 
     /**
     /**
@@ -200,6 +207,7 @@ public class ZsjyGraduateInfoBo extends BaseEntity {
     /**
     /**
      * 工作职位
      * 工作职位
      */
      */
+    @Size(max = 50, message = "工作职位长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
     private String jobPosition;
     private String jobPosition;
 
 
     /**
     /**
@@ -220,11 +228,13 @@ public class ZsjyGraduateInfoBo extends BaseEntity {
     /**
     /**
      * 升学院校
      * 升学院校
      */
      */
+    @Size(max = 100, message = "升学院校长度不能超过100个字符", groups = { AddGroup.class, EditGroup.class })
     private String furtherSchool;
     private String furtherSchool;
 
 
     /**
     /**
      * 升学专业
      * 升学专业
      */
      */
+    @Size(max = 50, message = "升学专业长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
     private String furtherMajor;
     private String furtherMajor;
 
 
     /**
     /**

+ 207 - 175
mobile/src/pages/internship/index.vue

@@ -90,74 +90,72 @@
         </view>
         </view>
 
 
         <!-- 位置信息卡片 -->
         <!-- 位置信息卡片 -->
-        <view class="location-card" v-if="currentLocation" >
+        <view class="location-card">
             <view class="card-header">
             <view class="card-header">
                 <view class="header-left">
                 <view class="header-left">
-                    <u-icon name="map-pin" size="18" color="#f56c6c"></u-icon>
-                    <text class="card-title">当前位置</text>
-                </view>
-                <u-button 
-                    type="info" 
-                    size="mini" 
-                    text="重新定位" 
-                    @click="refreshLocation"
-                    :loading="locationLoading"
-                    class="refresh-btn"
-                ></u-button>
-            </view>
-            
-            <!-- 地址信息 -->
-            <view class="location-address">
-                <u-icon name="location" size="14" color="#909399" class="address-icon"></u-icon>
-                <text class="address-text">{{ currentLocation.address }}</text>
-            </view>
-            
-            <!-- 坐标信息 -->
-            <view class="coordinates-section">
-                <view class="coord-row">
-                    <view class="coord-item">
-                        <text class="coord-label">经度</text>
-                        <text class="coord-value">{{ currentLocation.longitude.toFixed(6) }}</text>
-                    </view>
-                    <view class="coord-divider"></view>
-                    <view class="coord-item">
-                        <text class="coord-label">纬度</text>
-                        <text class="coord-value">{{ currentLocation.latitude.toFixed(6) }}</text>
-                    </view>
-                </view>
-            </view>
-            
-            <!-- 精度信息 -->
-            <view class="accuracy-section" v-if="currentLocation.accuracy">
-                <view class="accuracy-info">
-                    <u-icon name="target" size="14" color="#67c23a" class="accuracy-icon"></u-icon>
-                    <text class="accuracy-text">定位精度 {{ currentLocation.accuracy.toFixed(0) }}米</text>
-                    <u-tag 
-                        :text="getAccuracyStatus(currentLocation.accuracy).text"
-                        :type="getAccuracyStatus(currentLocation.accuracy).type"
-                        size="mini"
-                        class="accuracy-tag"
-                    ></u-tag>
+                    
+                    <text class="card-title">签到位置</text>
                 </view>
                 </view>
             </view>
             </view>
             
             
-            <!-- 操作按钮 -->
-            <view class="location-actions">
+            <!-- 定位按钮 -->
+            <view class="location-row">
                 <u-button 
                 <u-button 
                     type="primary" 
                     type="primary" 
                     size="default" 
                     size="default" 
-                    plain
-                    @click="openLocationInMap"
-                    class="map-btn"
+                    plain 
+                    @click="handleGetLocation"
+                    :loading="locationLoading"
+                    class="location-btn"
                 >
                 >
-                    <u-icon name="map" size="16" color="#2979ff" />
-                    <text class="btn-text">在地图中查看</text>
+                    <u-icon name="map-fill" size="20" color="#2979ff" />
+                    <text style="margin-left: 8rpx">
+                        {{ checkIsWechatBrowser() ? '微信定位' : '定位' }}
+                    </text>
                 </u-button>
                 </u-button>
             </view>
             </view>
+            
+            <!-- 位置信息显示 -->
+            <view v-if="currentLocation" class="location-info-section">
+                <!-- 坐标信息 -->
+                <view class="location-coords-container">
+                    <text class="location-coords">
+                        经纬度:{{ currentLocation.latitude.toFixed(6) }},{{ currentLocation.longitude.toFixed(6) }}
+                    </text>
+                </view>
+                
+                <!-- 精度信息 -->
+                <view class="accuracy-section" v-if="currentLocation.accuracy">
+                    <view class="accuracy-info">
+                        <u-icon name="target" size="14" color="#67c23a" class="accuracy-icon"></u-icon>
+                        <text class="accuracy-text">定位精度 {{ currentLocation.accuracy.toFixed(0) }}米</text>
+                        <u-tag 
+                            :text="getAccuracyStatus(currentLocation.accuracy).text"
+                            :type="getAccuracyStatus(currentLocation.accuracy).type"
+                            size="mini"
+                            class="accuracy-tag"
+                        ></u-tag>
+                    </view>
+                </view>
+                
+                <!-- 查看位置按钮 -->
+                <view class="location-action-container">
+                    <u-button 
+                        size="default" 
+                        type="primary" 
+                        plain 
+                        @click="openLocationInMap"
+                        class="view-map-btn"
+                    >
+                        <u-icon name="eye" size="16" color="#2979ff" />
+                        <text>查看位置</text>
+                    </u-button>
+                </view>
+            </view>
         </view>
         </view>
 
 
         <!-- 位置获取失败提示 -->
         <!-- 位置获取失败提示 -->
-        <view class="location-error-card" v-else-if="locationError">
+        <view class="location-error-card" v-if="locationError && !currentLocation">
             <view class="card-header">
             <view class="card-header">
                 <view class="header-left">
                 <view class="header-left">
                     <u-icon name="map-pin" size="18" color="#f56c6c"></u-icon>
                     <u-icon name="map-pin" size="18" color="#f56c6c"></u-icon>
@@ -265,6 +263,7 @@ import { getInternshipInfo, getStudentInternshipInfo, checkIn, getDailyList, get
 import { getCurrentLocation, checkLocationPermission, openLocationSettings } from '@/utils/location.js';
 import { getCurrentLocation, checkLocationPermission, openLocationSettings } from '@/utils/location.js';
 import { userManager } from '@/utils/user.js';
 import { userManager } from '@/utils/user.js';
 import weChatSDK from '@/utils/wechat.js';
 import weChatSDK from '@/utils/wechat.js';
+import { request } from '@/common/request.js';
 
 
 export default {
 export default {
     name: 'InternshipIndex',
     name: 'InternshipIndex',
@@ -289,7 +288,6 @@ export default {
             
             
             // 微信SDK相关(新增)
             // 微信SDK相关(新增)
             wechatSDK: weChatSDK,
             wechatSDK: weChatSDK,
-            isWechatBrowser: false,
             wechatInitializing: false,
             wechatInitializing: false,
             
             
             // 统计数据
             // 统计数据
@@ -319,19 +317,6 @@ export default {
         };
         };
     },
     },
     
     
-    async onLoad() {
-        // 初始化微信环境检查并自动初始化SDK
-        await this.checkWechatEnvironment();
-        
-        this.initPage();
-    },
-    
-    onShow() {
-        // 页面显示时刷新数据
-        this.loadTodayRecord();
-        this.loadStatistics();
-    },
-    
     methods: {
     methods: {
         // === 微信SDK相关方法 ===
         // === 微信SDK相关方法 ===
 
 
@@ -339,9 +324,9 @@ export default {
         async checkWechatEnvironment() {
         async checkWechatEnvironment() {
             try {
             try {
                 // 检查是否在微信浏览器中
                 // 检查是否在微信浏览器中
-                this.isWechatBrowser = this.wechatSDK.isWeChatBrowser();
+                const isWechatBrowser = this.wechatSDK.isWeChatBrowser();
 
 
-                if (this.isWechatBrowser) {
+                if (isWechatBrowser) {
                     // 在微信环境中,自动初始化SDK
                     // 在微信环境中,自动初始化SDK
                     await this.initWechatSDK();
                     await this.initWechatSDK();
                 }
                 }
@@ -407,10 +392,10 @@ export default {
                 }
                 }
                 
                 
                 // 初始化微信环境检测
                 // 初始化微信环境检测
-                this.isWechatBrowser = this.wechatSDK.isWeChatBrowser();
+                const isWechatBrowser = this.wechatSDK.isWeChatBrowser();
                 
                 
                 // 如果在微信环境,初始化微信SDK
                 // 如果在微信环境,初始化微信SDK
-                if (this.isWechatBrowser) {
+                if (isWechatBrowser) {
                     await this.initWechatSDK();
                     await this.initWechatSDK();
                 }
                 }
                 
                 
@@ -419,10 +404,14 @@ export default {
                     this.loadInternshipInfo(),
                     this.loadInternshipInfo(),
                     this.loadTodayRecord(),
                     this.loadTodayRecord(),
                     this.loadRecentRecords(),
                     this.loadRecentRecords(),
-                    this.loadStatistics(),
-                    this.initLocation()
+                    this.loadStatistics()
                 ]);
                 ]);
                 
                 
+                // 初始化位置信息(不阻塞页面加载)
+                this.initLocation().catch(error => {
+                    console.error('位置信息初始化失败:', error);
+                });
+                
             } catch (error) {
             } catch (error) {
                 console.error('初始化页面失败:', error);
                 console.error('初始化页面失败:', error);
                 uni.showToast({
                 uni.showToast({
@@ -608,8 +597,8 @@ export default {
                     return;
                     return;
                 }
                 }
                 
                 
-                // 获取当前位置
-                await this.getCurrentLocationInfo();
+                // 不自动获取位置,等待用户手动点击定位按钮
+                console.log('位置权限检查完成,等待用户手动定位');
             } catch (error) {
             } catch (error) {
                 console.error('初始化位置失败:', error);
                 console.error('初始化位置失败:', error);
                 this.canCheckin = false;
                 this.canCheckin = false;
@@ -645,16 +634,16 @@ export default {
         },
         },
         
         
         /**
         /**
-         * 智能定位:根据环境自动选择最适合的定位方式(增强版)
+         * 智能定位:根据环境自动选择最适合的定位方式(参考请假页面实现)
          */
          */
-        async getCurrentLocationInfo() {
+        async handleGetLocation() {
             try {
             try {
                 this.locationLoading = true;
                 this.locationLoading = true;
                 this.locationError = '';
                 this.locationError = '';
                 uni.showLoading({ title: '定位中...', mask: true });
                 uni.showLoading({ title: '定位中...', mask: true });
 
 
                 const envInfo = {
                 const envInfo = {
-                    isWechatBrowser: this.isWechatBrowser,
+                    isWechatBrowser: this.checkIsWechatBrowser(),
                     isWechatSdkReady: this.wechatSDK.isInitialized,
                     isWechatSdkReady: this.wechatSDK.isInitialized,
                     isH5Web: this.isH5Web(),
                     isH5Web: this.isH5Web(),
                     isBrowserGeolocationSupported: this.isBrowserGeolocationSupported(),
                     isBrowserGeolocationSupported: this.isBrowserGeolocationSupported(),
@@ -663,7 +652,7 @@ export default {
                 console.log('环境检测结果:', envInfo);
                 console.log('环境检测结果:', envInfo);
 
 
                 // 优先级1:微信SDK定位(如果在微信环境且SDK已就绪)
                 // 优先级1:微信SDK定位(如果在微信环境且SDK已就绪)
-                if (this.isWechatBrowser && this.wechatSDK.isInitialized) {
+                if (this.checkIsWechatBrowser() && this.wechatSDK.isInitialized) {
                     const wxLocationSuccess = await this.tryWeChatLocationWithSDK();
                     const wxLocationSuccess = await this.tryWeChatLocationWithSDK();
                     if (wxLocationSuccess) {
                     if (wxLocationSuccess) {
                         return;
                         return;
@@ -671,7 +660,7 @@ export default {
                 }
                 }
 
 
                 // 优先级2:微信环境但SDK未就绪,尝试初始化后重试
                 // 优先级2:微信环境但SDK未就绪,尝试初始化后重试
-                if (this.isWechatBrowser && !this.wechatSDK.isInitialized) {
+                if (this.checkIsWechatBrowser() && !this.wechatSDK.isInitialized) {
                     try {
                     try {
                         await this.initWechatSDK();
                         await this.initWechatSDK();
                         if (this.wechatSDK.isInitialized) {
                         if (this.wechatSDK.isInitialized) {
@@ -710,7 +699,7 @@ export default {
                     success: (res) => {
                     success: (res) => {
                         if (res.confirm) {
                         if (res.confirm) {
                             // 用户选择重试
                             // 用户选择重试
-                            this.getCurrentLocationInfo();
+                            this.handleGetLocation();
                         }
                         }
                     }
                     }
                 });
                 });
@@ -720,7 +709,14 @@ export default {
         },
         },
         
         
         /**
         /**
-         * 使用微信SDK进行定位(增强版)
+         * 检测浏览器是否支持 Geolocation API
+         */
+        isBrowserGeolocationSupported() {
+            return typeof navigator !== 'undefined' && 'geolocation' in navigator;
+        },
+        
+        /**
+         * 使用微信SDK进行定位(参考请假页面实现)
          */
          */
         async tryWeChatLocationWithSDK() {
         async tryWeChatLocationWithSDK() {
             try {
             try {
@@ -768,7 +764,7 @@ export default {
         },
         },
 
 
         /**
         /**
-         * H5 web端原生定位(增强版)
+         * H5 web端原生定位(参考请假页面实现)
          */
          */
         async handleH5WebLocation() {
         async handleH5WebLocation() {
             return new Promise((resolve) => {
             return new Promise((resolve) => {
@@ -792,6 +788,7 @@ export default {
 
 
                         const { latitude, longitude, accuracy } = position.coords;
                         const { latitude, longitude, accuracy } = position.coords;
 
 
+                        // 将WGS84坐标转换为GCJ02坐标系(中国标准坐标系)
                         this.currentLocation = {
                         this.currentLocation = {
                             latitude: latitude,
                             latitude: latitude,
                             longitude: longitude,
                             longitude: longitude,
@@ -834,12 +831,12 @@ export default {
                             content: `${errorMessage}。是否手动输入位置信息?`,
                             content: `${errorMessage}。是否手动输入位置信息?`,
                             showCancel: true,
                             showCancel: true,
                             cancelText: '取消',
                             cancelText: '取消',
-                            confirmText: '稍后重试',
+                            confirmText: '手动输入',
                             success: (res) => {
                             success: (res) => {
                                 if (res.confirm) {
                                 if (res.confirm) {
-                                    // 用户选择重试
+                                    // 可以在这里添加手动输入位置的逻辑
                                     uni.showToast({
                                     uni.showToast({
-                                        title: '请稍后重试定位',
+                                        title: '手动输入功能开发中',
                                         icon: 'none',
                                         icon: 'none',
                                         duration: 2000,
                                         duration: 2000,
                                     });
                                     });
@@ -935,23 +932,24 @@ export default {
          * 刷新位置
          * 刷新位置
          */
          */
         refreshLocation() {
         refreshLocation() {
-            this.getCurrentLocationInfo();
+            this.handleGetLocation();
         },
         },
 
 
 
 
 
 
         /**
         /**
-         * 打开位置信息在地图中查看
+         * 打开位置信息在地图中查看(参考请假页面实现)
          */
          */
         async openLocationInMap() {
         async openLocationInMap() {
             if (!this.currentLocation) {
             if (!this.currentLocation) {
                 uni.showToast({
                 uni.showToast({
-                    title: '无法获取位置信息',
-                    icon: 'none'
+                    title: '暂无位置信息',
+                    icon: 'none',
                 });
                 });
                 return;
                 return;
             }
             }
 
 
+            // 从坐标信息解析经纬度
             const { latitude, longitude } = this.currentLocation;
             const { latitude, longitude } = this.currentLocation;
 
 
             if (!latitude || !longitude || isNaN(latitude) || isNaN(longitude)) {
             if (!latitude || !longitude || isNaN(latitude) || isNaN(longitude)) {
@@ -962,26 +960,72 @@ export default {
                 return;
                 return;
             }
             }
 
 
-            if (this.isWechatBrowser && this.wechatSDK.isInitialized) {
-                try {
-                    await this.wechatSDK.openLocation({
-                        latitude: latitude,
+            // 声明变量在外部作用域,确保finally块可以访问
+            let formattedAddress = '';
+
+            // 调用高德sdk逆地理编码
+            try {
+                // 调用后台API进行逆地理编码
+                const geocodingResponse = await request({
+                    url: '/system/SysRegion/reverse-geocode',
+                    method: 'POST',
+                    data: {
                         longitude: longitude,
                         longitude: longitude,
-                        name: '实习签到位置',
-                        address: this.currentLocation.address || '当前位置',
-                        scale: 16,
-                    });
-                } catch (error) {
-                    console.error('微信地图打开失败:', error);
+                        latitude: latitude,
+                    },
+                });
+
+                if (geocodingResponse.code === 200 && geocodingResponse.data) {
+                    formattedAddress = geocodingResponse.data.regeocode?.formattedAddress || '';
+                    if (formattedAddress) {
+                        console.log('逆地理编码成功:', formattedAddress);
+                        uni.showToast({
+                            title: formattedAddress,
+                            icon: 'none',
+                            duration: 2000,
+                        });
+                    }
+                } else {
+                    console.warn('逆地理编码失败:', geocodingResponse.msg);
+                }
+            } catch (error) {
+                console.error('逆地理编码请求失败:', error);
+                // 逆地理编码失败不影响地图打开功能
+            } finally {
+                console.log('=== finally块开始执行 ===');
+                console.log('formattedAddress:', formattedAddress);
+                console.log('isWechatBrowser:', this.checkIsWechatBrowser());
+                console.log('wechatSDK.isInitialized:', this.wechatSDK?.isInitialized);
+
+                if (this.checkIsWechatBrowser() && this.wechatSDK?.isInitialized) {
+                    try {
+                        console.log('尝试使用微信SDK打开地图...');
+                        await this.wechatSDK.openLocation({
+                            latitude: latitude,
+                            longitude: longitude,
+                            name: formattedAddress || '实习签到位置',
+                            address: formattedAddress || '当前位置',
+                            scale: 16,
+                        });
+                        console.log('微信地图打开成功');
+                    } catch (error) {
+                        console.error('微信地图打开失败:', error);
+                        this.fallbackOpenMap(latitude, longitude);
+                    }
+                } else {
+                    console.log('使用备用地图打开方式...');
                     this.fallbackOpenMap(latitude, longitude);
                     this.fallbackOpenMap(latitude, longitude);
                 }
                 }
-            } else {
-                this.fallbackOpenMap(latitude, longitude);
+                console.log('=== finally块执行完成 ===');
             }
             }
         },
         },
 
 
-        // 备用地图打开方式
+        // 备用地图打开方式(参考请假页面实现)
         fallbackOpenMap(latitude, longitude) {
         fallbackOpenMap(latitude, longitude) {
+            const url = `https://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude};title:实习签到位置;addr:${encodeURIComponent(
+                this.currentLocation.address || '当前位置',
+            )}&referer=智慧校园`;
+
             // 首先尝试使用uni.openLocation(原生地图)
             // 首先尝试使用uni.openLocation(原生地图)
             if (typeof uni.openLocation === 'function') {
             if (typeof uni.openLocation === 'function') {
                 uni.showLoading({
                 uni.showLoading({
@@ -1059,7 +1103,7 @@ export default {
                     confirmText: '重新获取',
                     confirmText: '重新获取',
                     success: (res) => {
                     success: (res) => {
                         if (res.confirm) {
                         if (res.confirm) {
-                            this.initLocation();
+                            this.handleGetLocation();
                         }
                         }
                     }
                     }
                 });
                 });
@@ -1269,6 +1313,24 @@ export default {
         checkIsWechatBrowser() {
         checkIsWechatBrowser() {
             const ua = navigator.userAgent.toLowerCase();
             const ua = navigator.userAgent.toLowerCase();
             return ua.includes('micromessenger');
             return ua.includes('micromessenger');
+        },
+
+        /**
+         * 刷新数据
+         */
+        async refreshData() {
+            try {
+                // 刷新位置信息
+                if (!this.currentLocation) {
+                    await this.getCurrentLocationInfo();
+                }
+                
+                // 检查今日签到状态
+                await this.checkTodayCheckInStatus();
+                
+            } catch (error) {
+                console.error('数据刷新失败:', error);
+            }
         }
         }
     },
     },
 
 
@@ -1295,8 +1357,8 @@ export default {
         // 设置当前日期
         // 设置当前日期
         this.currentDate = this.formatDate(new Date());
         this.currentDate = this.formatDate(new Date());
         
         
-        // 检测微信环境
-        this.isWechatBrowser = this.checkIsWechatBrowser();
+        // 检测微信环境(在methods中有相应方法)
+        // this.checkIsWechatBrowser() 在需要时调用
         
         
         // 获取用户信息(不阻塞)
         // 获取用户信息(不阻塞)
         this.loadUserInfo().catch(error => {
         this.loadUserInfo().catch(error => {
@@ -1308,33 +1370,15 @@ export default {
             console.error('实习信息加载失败:', error);
             console.error('实习信息加载失败:', error);
         });
         });
         
         
-        // 获取位置信息(核心功能,但不阻塞页面显示)
-        this.getCurrentLocationInfo().catch(error => {
-            console.error('位置信息获取失败:', error);
-        });
+                        // 初始化位置权限检查(不阻塞页面显示)
+                this.initLocation().catch(error => {
+                    console.error('位置信息初始化失败:', error);
+                });
         
         
         // 检查今日签到状态(不阻塞)
         // 检查今日签到状态(不阻塞)
         this.checkTodayCheckInStatus().catch(error => {
         this.checkTodayCheckInStatus().catch(error => {
             console.error('签到状态检查失败:', error);
             console.error('签到状态检查失败:', error);
         });
         });
-    },
-
-    /**
-     * 刷新数据
-     */
-    async refreshData() {
-        try {
-            // 刷新位置信息
-            if (!this.currentLocation) {
-                await this.getCurrentLocationInfo();
-            }
-            
-            // 检查今日签到状态
-            await this.checkTodayCheckInStatus();
-            
-        } catch (error) {
-            console.error('数据刷新失败:', error);
-        }
     }
     }
 };
 };
 </script>
 </script>
@@ -1517,68 +1561,56 @@ export default {
     margin-left: 4px;
     margin-left: 4px;
 }
 }
 
 
-/* 位置信息 */
-.location-address {
-    display: flex;
-    align-items: flex-start;
+/* 位置信息(参考请假页面样式) */
+.location-row {
     margin-bottom: 16px;
     margin-bottom: 16px;
-    padding: 12px;
+}
+
+.location-btn {
+    width: 100%;
+    height: 44px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 8px;
+    border: 1px solid #2979ff;
+    background: #fff;
+    color: #2979ff;
+}
+
+.location-info-section {
+    margin-top: 16px;
+    padding: 16px;
     background: #f8f9fa;
     background: #f8f9fa;
     border-radius: 8px;
     border-radius: 8px;
-    border-left: 3px solid #67c23a;
+    border: 1px solid #e4e7ed;
 }
 }
 
 
-.address-icon {
-    margin-right: 8px;
-    margin-top: 2px;
-    flex-shrink: 0;
+.location-coords-container {
+    margin-bottom: 12px;
 }
 }
 
 
-.address-text {
+.location-coords {
     font-size: 14px;
     font-size: 14px;
     color: #303133;
     color: #303133;
+    font-family: monospace;
     line-height: 1.5;
     line-height: 1.5;
-    flex: 1;
+    word-break: break-all;
 }
 }
 
 
-/* 坐标信息 */
-.coordinates-section {
-    margin-bottom: 16px;
+.location-action-container {
+    display: flex;
+    justify-content: center;
+    margin-top: 12px;
 }
 }
 
 
-.coord-row {
+.view-map-btn {
+    min-width: 120px;
+    height: 36px;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
-    background: #f8f9fa;
-    border-radius: 8px;
-    padding: 12px;
-}
-
-.coord-item {
-    flex: 1;
-    text-align: center;
-}
-
-.coord-divider {
-    width: 1px;
-    height: 32px;
-    background: #e4e7ed;
-    margin: 0 16px;
-}
-
-.coord-label {
-    display: block;
-    font-size: 12px;
-    color: #909399;
-    margin-bottom: 4px;
-}
-
-.coord-value {
-    display: block;
-    font-size: 14px;
-    color: #303133;
-    font-weight: 500;
-    font-family: monospace;
+    justify-content: center;
+    gap: 6px;
 }
 }
 
 
 /* 精度信息 */
 /* 精度信息 */

+ 4 - 0
web/src/views/zsjy/graduateInfo/form.vue

@@ -749,6 +749,10 @@ const rules = reactive({
     { pattern: /^1[3-9]\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
     { pattern: /^1[3-9]\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
   ],
   ],
   email: [{ type: 'email', message: '邮箱格式不正确', trigger: 'blur' }],
   email: [{ type: 'email', message: '邮箱格式不正确', trigger: 'blur' }],
+  postalCode: [
+    { max: 10, message: '邮政编码长度不能超过10个字符', trigger: 'blur' },
+    { pattern: /^\d{6}$/, message: '邮政编码格式不正确,应为6位数字', trigger: 'blur' }
+  ],
   employmentStatus: [{ required: true, message: '就业状态不能为空', trigger: 'change' }]
   employmentStatus: [{ required: true, message: '就业状态不能为空', trigger: 'change' }]
 });
 });
 
 

+ 2 - 2
web/src/views/zsjy/graduateInfo/index.vue

@@ -297,13 +297,13 @@
               <el-tooltip content="查看详情" placement="top">
               <el-tooltip content="查看详情" placement="top">
                 <el-button link type="info" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['zsjy:graduate:query']"></el-button>
                 <el-button link type="info" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['zsjy:graduate:query']"></el-button>
               </el-tooltip>
               </el-tooltip>
-              <el-tooltip content="编辑" placement="top" v-if="scope.row.auditStatus !== '1'">
+              <el-tooltip content="编辑" placement="top">
                 <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['zsjy:graduate:edit']"></el-button>
                 <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['zsjy:graduate:edit']"></el-button>
               </el-tooltip>
               </el-tooltip>
               <el-tooltip content="审核" placement="top" v-if="scope.row.auditStatus === '0'">
               <el-tooltip content="审核" placement="top" v-if="scope.row.auditStatus === '0'">
                 <el-button link type="success" icon="Check" @click="handleAudit(scope.row)" v-hasPermi="['zsjy:graduate:audit']"></el-button>
                 <el-button link type="success" icon="Check" @click="handleAudit(scope.row)" v-hasPermi="['zsjy:graduate:audit']"></el-button>
               </el-tooltip>
               </el-tooltip>
-              <el-tooltip content="删除" placement="top" v-if="scope.row.auditStatus !== '1'">
+              <el-tooltip content="删除" placement="top">
                 <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['zsjy:graduate:remove']"></el-button>
                 <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['zsjy:graduate:remove']"></el-button>
               </el-tooltip>
               </el-tooltip>
             </template>
             </template>

+ 0 - 19
web/src/views/zsjy/internship/daily/index.vue

@@ -168,23 +168,6 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
 
 
-          <el-table-column label="签退时间" min-width="120" align="center">
-            <template #default="scope">
-              <div v-if="scope.row.checkOutTime">
-                <div>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</div>
-                <div class="time-detail">{{ scope.row.checkOutTime }}</div>
-              </div>
-              <span v-else class="text-muted">未签退</span>
-            </template>
-          </el-table-column>
-
-          <el-table-column label="工作时长" min-width="100" align="center">
-            <template #default="scope">
-              <span v-if="scope.row.workDuration">{{ scope.row.workDuration }}小时</span>
-              <span v-else>-</span>
-            </template>
-          </el-table-column>
-
           <el-table-column label="签到状态" min-width="100" align="center">
           <el-table-column label="签到状态" min-width="100" align="center">
             <template #default="scope">
             <template #default="scope">
               <dict-tag :options="attendanceStatusOptions" :value="scope.row.status" />
               <dict-tag :options="attendanceStatusOptions" :value="scope.row.status" />
@@ -193,8 +176,6 @@
 
 
           <el-table-column label="签到地点" prop="checkInLocation" min-width="150" align="left" show-overflow-tooltip />
           <el-table-column label="签到地点" prop="checkInLocation" min-width="150" align="left" show-overflow-tooltip />
 
 
-          <el-table-column label="工作内容" prop="workContent" min-width="200" align="left" show-overflow-tooltip />
-
           <el-table-column label="操作" width="120" align="center" class-name="small-padding fixed-width">
           <el-table-column label="操作" width="120" align="center" class-name="small-padding fixed-width">
             <template #default="scope">
             <template #default="scope">
               <div class="action-buttons">
               <div class="action-buttons">