From 71baa4f1aea2289fc7bfc5afe1ae40d872ad4237 Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Fri, 10 Oct 2025 15:31:18 +0800 Subject: [PATCH] =?UTF-8?q?10.10=E5=9F=BA=E5=9D=91=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/domain/ProProjectInfoSetting.java | 13 + .../mapper/manage/ProProjectInfoMapper.xml | 3 +- .../manage/ProProjectInfoSettingMapper.xml | 6 +- yanzhu-ui-vue3/.prettierrc | 12 + yanzhu-ui-vue3/README.md | 3 + yanzhu-ui-vue3/src/directive/common/move.js | 65 +++++ yanzhu-ui-vue3/src/directive/index.js | 2 + .../src/views/device/pitAlarm/index.vue | 20 +- .../views/device/pitData/surveyPointData.vue | 257 ++--------------- .../src/views/device/pitDevice/index.vue | 39 ++- .../src/views/device/pitElement/index.vue | 84 +++--- .../src/views/device/pitSurveyPoint/index.vue | 89 ++++-- .../surveyPointPositionDrawer.vue | 193 +++++++------ .../src/views/device/pitThreshold/index.vue | 259 +++--------------- .../src/views/manage/proProjectInfo/index.vue | 64 ++--- 15 files changed, 427 insertions(+), 682 deletions(-) create mode 100644 yanzhu-ui-vue3/.prettierrc create mode 100644 yanzhu-ui-vue3/src/directive/common/move.js diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSetting.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSetting.java index 594f3eca..79c767ed 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSetting.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSetting.java @@ -50,6 +50,19 @@ public class ProProjectInfoSetting extends BaseEntity @Excel(name = "删除标识") private Long isDel; + /** 项目基坑平面图 */ + @Excel(name = "项目基坑平面图") + private String pitImgUrl; + + public void setPitImgUrl(String pitImgUrl) + { + this.pitImgUrl = pitImgUrl; + } + + public String getPitImgUrl() + { + return pitImgUrl; + } public void setId(Long id) { this.id = id; diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoMapper.xml index 4905b42b..fe7c7619 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoMapper.xml @@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -125,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" pi.floor_area, pi.total_output_value, pi.planned_completion_time, pi.scheduled_start_time, pi.actual_operating_time, pi.actual_completion_time, pi.contract_amount, pi.paid_amount, pi.on_account_amount, pi.project_schedule, pi.project_summarize, pi.project_qr_code, pi.project_status, pi.project_sort, pi.is_del, pi.create_by, pi.create_time, pi.update_by, pi.update_time, pi.remark, - pd.id pd_id,pd.dept_type pd_type,pd.dept_name pd_name,pd.dept_code pd_code,pd.leader pd_leader,pd.phone pd_phone,pi.bim_config, + pd.id pd_id,pd.dept_type pd_type,pd.dept_name pd_name,pd.dept_code pd_code,pd.leader pd_leader,pd.phone pd_phone,pi.bim_config,ps.pit_img_url ps_pit_img_url, ps.id ps_id,ps.org_name ps_org_name,ps.org_logo ps_org_logo,ps.org_image ps_org_image,ps.org_video ps_org_video,ps.org_plane ps_org_plane,ac.vendors_code from pro_project_info pi left join sys_dept sd on sd.dept_id = pi.com_id diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSettingMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSettingMapper.xml index 5bec34e1..0434d2ea 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSettingMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSettingMapper.xml @@ -18,11 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select ps.id, ps.project_id, pi.project_name, ps.org_name, ps.org_logo, ps.org_image, ps.org_video, ps.org_plane, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark from pro_project_info_setting ps + select ps.id, ps.project_id, pi.project_name, ps.org_name, ps.org_logo,ps.pit_img_url, ps.org_image, ps.org_video, ps.org_plane, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark from pro_project_info_setting ps left join pro_project_info pi on pi.id = ps.project_id left join sys_dept sd on sd.dept_id = pi.com_id @@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, update_by, update_time, + pit_img_url, remark, @@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createTime}, #{updateBy}, #{updateTime}, + #{pitImgUrl}, #{remark}, @@ -89,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, + pit_img_url = #{pitImgUrl}, remark = #{remark}, where id = #{id} diff --git a/yanzhu-ui-vue3/.prettierrc b/yanzhu-ui-vue3/.prettierrc new file mode 100644 index 00000000..84420159 --- /dev/null +++ b/yanzhu-ui-vue3/.prettierrc @@ -0,0 +1,12 @@ +{ + "singleQuote": true, + "semi": false, + "tabWidth": 2, + "printWidth": 400, + "trailingComma": "none", + "bracketSpacing": true, + "arrowParens": "avoid", + "htmlWhitespaceSensitivity": "ignore", + "vueIndentScriptAndStyle": false, + "endOfLine": "lf" +} \ No newline at end of file diff --git a/yanzhu-ui-vue3/README.md b/yanzhu-ui-vue3/README.md index 6366228c..fa139c6e 100644 --- a/yanzhu-ui-vue3/README.md +++ b/yanzhu-ui-vue3/README.md @@ -1,3 +1,6 @@ +2025.10.10 +pro_project_info_setting 表增加字段 pit_img_url varchar(512) 项目基坑平面图 + 2025.9.16 1.增加表pro_user_inout_record 员工出入场记录 diff --git a/yanzhu-ui-vue3/src/directive/common/move.js b/yanzhu-ui-vue3/src/directive/common/move.js new file mode 100644 index 00000000..bbbd5f4a --- /dev/null +++ b/yanzhu-ui-vue3/src/directive/common/move.js @@ -0,0 +1,65 @@ +/** + * 拖拽移动指令 - Vue3 版本 + * 使用方法: v-move + * 功能: 使元素可以通过鼠标拖拽移动 + */ +export default { + mounted(el, binding, vnode) { + let dragging = false; + let startX, startY, deltaX, deltaY; + + // 设置初始样式 + el.style.position = 'absolute'; + el.style.cursor = 'pointer'; + + // 鼠标按下事件 + const mouseDownHandler = function(e) { + dragging = true; + startX = e.clientX - parseInt(el.style.left || 0); + startY = e.clientY - parseInt(el.style.top || 0); + + document.addEventListener('mousemove', mouseMoveHandler); + document.addEventListener('mouseup', mouseUpHandler); + + // 阻止默认行为,避免选中文本 + e.preventDefault(); + }; + + // 鼠标移动事件 + const mouseMoveHandler = function(e) { + if (dragging) { + deltaX = e.clientX - startX; + deltaY = e.clientY - startY; + el.style.left = deltaX + 'px'; + el.style.top = deltaY + 'px'; + } + }; + + // 鼠标释放事件 + const mouseUpHandler = function() { + dragging = false; + document.removeEventListener('mousemove', mouseMoveHandler); + document.removeEventListener('mouseup', mouseUpHandler); + }; + + // 绑定事件监听器 + el.addEventListener('mousedown', mouseDownHandler); + + // 存储事件处理器引用,便于清理 + el._moveHandlers = { + mouseDownHandler, + mouseMoveHandler, + mouseUpHandler + }; + }, + + // 组件卸载时清理事件监听器 + beforeUnmount(el) { + if (el._moveHandlers) { + el.removeEventListener('mousedown', el._moveHandlers.mouseDownHandler); + document.removeEventListener('mousemove', el._moveHandlers.mouseMoveHandler); + document.removeEventListener('mouseup', el._moveHandlers.mouseUpHandler); + delete el._moveHandlers; + } + } +}; \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/directive/index.js b/yanzhu-ui-vue3/src/directive/index.js index cb468a5e..999db0ba 100644 --- a/yanzhu-ui-vue3/src/directive/index.js +++ b/yanzhu-ui-vue3/src/directive/index.js @@ -2,10 +2,12 @@ import hasRole from './permission/hasRole' import hasPermi from './permission/hasPermi' import notHasPermi from './permission/notHasPermi' import copyText from './common/copyText' +import move from './common/move' export default function directive(app){ app.directive('hasRole', hasRole) app.directive('hasPermi', hasPermi) app.directive('notHasPermi', notHasPermi) app.directive('copyText', copyText) + app.directive('move', move) } \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue b/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue index 0be6cdfc..c8c4eb30 100644 --- a/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue +++ b/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue @@ -1,6 +1,6 @@ - - diff --git a/yanzhu-ui-vue3/src/views/device/pitDevice/index.vue b/yanzhu-ui-vue3/src/views/device/pitDevice/index.vue index a6ed705f..fec4bb5c 100644 --- a/yanzhu-ui-vue3/src/views/device/pitDevice/index.vue +++ b/yanzhu-ui-vue3/src/views/device/pitDevice/index.vue @@ -1,52 +1,49 @@ - - \ No newline at end of file + } + } +} + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/device/pitThreshold/index.vue b/yanzhu-ui-vue3/src/views/device/pitThreshold/index.vue index a5cc038d..602a4788 100644 --- a/yanzhu-ui-vue3/src/views/device/pitThreshold/index.vue +++ b/yanzhu-ui-vue3/src/views/device/pitThreshold/index.vue @@ -1,119 +1,45 @@ - diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue index cf20f83f..ab1d8ace 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue @@ -14,7 +14,6 @@ 重置 - 新增 @@ -30,7 +29,6 @@ - @@ -56,23 +54,17 @@ @@ -98,7 +90,9 @@ - - - - + + @@ -190,7 +183,6 @@ - @@ -322,16 +314,21 @@ - + - + + + + + + @@ -361,7 +358,6 @@ -