From 2a70b01a3fbe27d0b76779254465f8b040f35796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Thu, 17 Aug 2023 19:39:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ImagePreview/index.vue | 12 +- .../project/surProjectAttendance/index.vue | 161 +++-- .../project/surProjectInsurance/index.vue | 302 +++++--- .../surProjectInsurance/insuranceDrawer.vue | 8 +- .../surProjectSchedule/ProjectScheduleDlg.vue | 348 +++++---- .../project/surProjectSchedule/index.vue | 526 +++++++++----- .../views/project/surProjectSpecial/index.vue | 349 ++++++--- .../surProjectSpecialDrawer.vue | 35 +- .../emergencyDrill/emergencyDrillDrawer.vue | 667 +++++++++++------- .../src/views/work/emergencyDrill/index.vue | 383 ++++++---- ruoyi-ui/src/views/work/workTrain/index.vue | 379 ++++++---- .../views/work/workTrain/workTrainDrawer.vue | 667 +++++++++++------- .../project/domain/SurProjectInsurance.java | 18 + .../domain/SurProjectWorkAttendance.java | 19 + .../project/SurProjectInsuranceMapper.xml | 52 +- .../project/SurProjectUnitInfoMapper.xml | 3 +- .../project/SurProjectUserinfoMapper.xml | 13 +- .../SurProjectWorkAttendanceMapper.xml | 21 +- .../project/SurProjectWorkSpecialMapper.xml | 13 +- .../resources/mapper/work/WorkTrainMapper.xml | 2 +- 20 files changed, 2504 insertions(+), 1474 deletions(-) diff --git a/ruoyi-ui/src/components/ImagePreview/index.vue b/ruoyi-ui/src/components/ImagePreview/index.vue index 3c770c70..756d5fd4 100644 --- a/ruoyi-ui/src/components/ImagePreview/index.vue +++ b/ruoyi-ui/src/components/ImagePreview/index.vue @@ -19,16 +19,16 @@ export default { props: { src: { type: String, - default: "" + default: "", }, width: { type: [Number, String], - default: "" + default: "", }, height: { type: [Number, String], - default: "" - } + default: "", + }, }, computed: { realSrc() { @@ -47,7 +47,7 @@ export default { } let real_src_list = this.src.split(","); let srcList = []; - real_src_list.forEach(item => { + real_src_list.forEach((item) => { if (isExternal(item)) { return srcList.push(item); } @@ -60,7 +60,7 @@ export default { }, realHeight() { return typeof this.height == "string" ? this.height : `${this.height}px`; - } + }, }, }; diff --git a/ruoyi-ui/src/views/project/surProjectAttendance/index.vue b/ruoyi-ui/src/views/project/surProjectAttendance/index.vue index 19f6acbe..12118e6a 100644 --- a/ruoyi-ui/src/views/project/surProjectAttendance/index.vue +++ b/ruoyi-ui/src/views/project/surProjectAttendance/index.vue @@ -1,23 +1,30 @@ diff --git a/ruoyi-ui/src/views/project/surProjectInsurance/index.vue b/ruoyi-ui/src/views/project/surProjectInsurance/index.vue index bfafcab6..91aaa6c9 100644 --- a/ruoyi-ui/src/views/project/surProjectInsurance/index.vue +++ b/ruoyi-ui/src/views/project/surProjectInsurance/index.vue @@ -1,44 +1,25 @@ diff --git a/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue b/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue index 025d2401..9a604f4c 100644 --- a/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue +++ b/ruoyi-ui/src/views/project/surProjectInsurance/insuranceDrawer.vue @@ -50,7 +50,7 @@ - + diff --git a/ruoyi-ui/src/views/project/surProjectSpecial/index.vue b/ruoyi-ui/src/views/project/surProjectSpecial/index.vue index f4dbb403..6bc8cf33 100644 --- a/ruoyi-ui/src/views/project/surProjectSpecial/index.vue +++ b/ruoyi-ui/src/views/project/surProjectSpecial/index.vue @@ -1,6 +1,13 @@ diff --git a/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue b/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue index 2082dd03..b3563dd5 100644 --- a/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue +++ b/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue @@ -114,16 +114,17 @@ p-id="1380" > - + ref="preview" + style="width: 50px; height: 50px" + :src="getImageUrl(scope.row.credentialFile)" + @click="onPreview(scope.row.credentialFile)" + > + @@ -255,9 +262,12 @@ import { addSurProjectSpecial, updateSurProjectSpecial, } from "@/api/project/surProjectSpecial"; +import ElImageViewer from "element-ui/packages/image/src/image-viewer"; export default { - components: {}, + components: { + ElImageViewer, + }, props: { formData: { projectId: String, @@ -267,6 +277,7 @@ export default { dicts: ["sys_yes_no", "sys_user_sex"], data() { return { + showViewer: false, // 遮罩层 loading: true, // 选中数组 @@ -327,6 +338,7 @@ export default { { maxlength: 200, message: "备注最多200字符", trigger: "blur" }, ], }, + previewList: [], }; }, computed: {}, @@ -342,6 +354,17 @@ export default { mounted() {}, beforeDestroy() {}, methods: { + getImageUrl(url) { + return process.env.VUE_APP_BASE_API + url + ".min.jpg"; + }, + onPreview(url) { + this.previewList = []; + this.previewList.push(process.env.VUE_APP_BASE_API + url); + this.showViewer = true; + }, + closeViewer() { + this.showViewer = false; + }, fileInput(files) { if (files.length > 0) { this.form.credentialFile = files[0].url; diff --git a/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue b/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue index 8ddb6410..8c763e88 100644 --- a/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue +++ b/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue @@ -1,241 +1,360 @@ + + + + - - diff --git a/ruoyi-ui/src/views/work/emergencyDrill/index.vue b/ruoyi-ui/src/views/work/emergencyDrill/index.vue index 10167c27..4f0477a6 100644 --- a/ruoyi-ui/src/views/work/emergencyDrill/index.vue +++ b/ruoyi-ui/src/views/work/emergencyDrill/index.vue @@ -1,6 +1,13 @@ \ No newline at end of file + diff --git a/ruoyi-ui/src/views/work/workTrain/index.vue b/ruoyi-ui/src/views/work/workTrain/index.vue index a77db3c9..d414e3ae 100644 --- a/ruoyi-ui/src/views/work/workTrain/index.vue +++ b/ruoyi-ui/src/views/work/workTrain/index.vue @@ -1,6 +1,13 @@ \ No newline at end of file + diff --git a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue index a5d75df8..4851f314 100644 --- a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue +++ b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue @@ -1,241 +1,360 @@ + + + + - - diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectInsurance.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectInsurance.java index 2a74278a..477bff58 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectInsurance.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectInsurance.java @@ -63,6 +63,8 @@ public class SurProjectInsurance extends BaseEntity private String isDel; private String insuranceTypeName; + private String projectName; + private String deptName; public void setId(Long id) { @@ -172,6 +174,22 @@ public class SurProjectInsurance extends BaseEntity this.insuranceTypeName = insuranceTypeName; } + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectWorkAttendance.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectWorkAttendance.java index 2b20ad13..538b289c 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectWorkAttendance.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectWorkAttendance.java @@ -49,6 +49,9 @@ public class SurProjectWorkAttendance extends BaseEntity @Excel(name = "删除标识") private Long isDel; + private String projectName; + private String deptName; + public void setId(Long id) { this.id = id; @@ -122,6 +125,22 @@ public class SurProjectWorkAttendance extends BaseEntity return isDel; } + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectInsuranceMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectInsuranceMapper.xml index 85248364..e9b2ae4b 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectInsuranceMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectInsuranceMapper.xml @@ -7,7 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -29,17 +31,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + and del_flag=0 and projectId = #{projectId} and unitId = #{unitId} and unitType = #{unitType} diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml index 8b345441..3026d9f4 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUserinfoMapper.xml @@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_user su on spu.user_id = su.user_id + and spu.is_del=0 and spu.project_id = #{projectId} and sp.projectName like concat('%', #{projectName}, '%') and (su.nick_name like concat('%', #{nickName}, '%') or su.phonenumber like concat('%', #{nickName}, '%') ) @@ -110,16 +111,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from sur_project_userinfo where id = #{id} - + + update sur_project_userinfo set is_del=1 where id = #{id} + - - delete from sur_project_userinfo where id in + + update sur_project_userinfo set is_del=1 where id in #{id} - + diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectWorkAttendanceMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectWorkAttendanceMapper.xml index 72910493..bbb669da 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectWorkAttendanceMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectWorkAttendanceMapper.xml @@ -7,7 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -28,7 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT spwa.id, spwa.project_id, + sp.projectName as project_name, spwa.dept_id, + d.dept_name, IFNULL(spwa.service_personnel, 0) AS service_personnel, IFNULL(spwa.supervisor_personnel, 0) AS supervisor_personnel, IFNULL(spwa.contractor_personnel, 0) AS contractor_personnel, @@ -41,10 +45,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" spwa.remark FROM sur_project_work_attendance spwa + left join sur_project sp on sp.id=spwa.project_id + left join sys_dept d on d.dept_id=spwa.dept_id and spwa.is_del=0 and spwa.project_id = #{projectId} + and sp.projectName like concat('%', #{projectName}, '%') and spwa.dept_id = #{deptId} + and d.dept_name like concat('%', #{deptName}, '%') and spwa.work_date between #{params.beginWorkDate} and #{params.endWorkDate} and DATE_FORMAT(spwa.work_date,'%Y-%m-%d')=DATE_FORMAT(#{workDate},'%Y-%m-%d') @@ -125,16 +133,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from sur_project_work_attendance where id = #{id} - + + update sur_project_work_attendance set is_del=1 where id = #{id} + - - delete from sur_project_work_attendance where id in + + update sur_project_work_attendance set is_del=1 where id in #{id} - + +