From e03ab83f07ba16e8295e78f69598a4b2b1b1deec Mon Sep 17 00:00:00 2001 From: suerwei <18810552194@163.com> Date: 星期四, 16 五月 2024 16:44:23 +0800 Subject: [PATCH] 人员管理挂载project --- javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceMapper.xml | 2 +- javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectPersonController.java | 3 ++- javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html | 16 ++++++++-------- javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html | 4 +++- javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml | 4 +++- javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html | 3 ++- javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html | 2 +- javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/DeviceLogController.java | 3 ++- javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectDataMapper.xml | 3 ++- javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml | 3 ++- javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html | 9 ++++++++- 11 files changed, 34 insertions(+), 18 deletions(-) diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/DeviceLogController.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/DeviceLogController.java index 8e1a447..10cc8a0 100644 --- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/DeviceLogController.java +++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/DeviceLogController.java @@ -36,7 +36,8 @@ @RequiresPermissions("geo:deviceLog:view") @GetMapping() - public String deviceLog() { + public String deviceLog(String id, ModelMap mmap) { + mmap.put("projectId", id); return prefix + "/deviceLog"; } diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectPersonController.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectPersonController.java index cee23fd..143cb28 100644 --- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectPersonController.java +++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectPersonController.java @@ -71,7 +71,8 @@ * 鏂板椤圭洰浜哄憳 */ @GetMapping("/add") - public String add() { + public String add(String projectId, ModelMap mmap) { + mmap.put("project_Id", projectId); return prefix + "/add"; } diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml index 16ec34c..4313582 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml +++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml @@ -26,7 +26,9 @@ <select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult"> <include refid="selectDeviceLogVo"/> - <where> + <where> + <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if> + <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if> <if test="code != null and code != ''"> and code = #{code}</if> <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if> <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceMapper.xml index 1311038..ab5f2f0 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceMapper.xml +++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceMapper.xml @@ -22,7 +22,7 @@ <select id="selectDeviceList" parameterType="Device" resultMap="DeviceResult"> <include refid="selectDeviceVo"/> - <where> + <where> <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if> diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectDataMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectDataMapper.xml index 070168f..8b2cb56 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectDataMapper.xml +++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectDataMapper.xml @@ -26,7 +26,8 @@ <select id="selectProjectDataList" parameterType="ProjectData" resultMap="ProjectDataResult"> <include refid="selectProjectDataVo"/> - <where> + <where> + <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if> <if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml index 3044abd..800a99a 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml +++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml @@ -28,7 +28,8 @@ <select id="selectProjectPersonList" parameterType="ProjectPerson" resultMap="ProjectPersonResult"> <include refid="selectProjectPersonVo"/> - <where> + <where> + <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="type != null and type != ''"> and type = #{type}</if> <if test="phone != null and phone != ''"> and phone = #{phone}</if> diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html index f8f04dc..12b106c 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html +++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html @@ -70,11 +70,12 @@ var editFlag = [[${@permission.hasPermi('geo:deviceLog:edit')}]]; var removeFlag = [[${@permission.hasPermi('geo:deviceLog:remove')}]]; var typeDatas = [[${@dict.getType('device_log_type')}]]; + var projectId=[[${projectId}]]; var prefix = ctx + "geo/deviceLog"; $(function() { var options = { - url: prefix + "/list", + url: prefix + "/list?projectId="+projectId, createUrl: prefix + "/add", updateUrl: prefix + "/edit/{id}", removeUrl: prefix + "/remove", diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html index 59fd409..b0a4c4a 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html +++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html @@ -36,42 +36,42 @@ </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/deviceLog(id=${project.ids})}" target="mainFrame" onclick="selected(this)">杩涘嚭搴撶鐞�</a> + <i class="glyphicon glyphicon-retweet"></i> <a class="afont" th:href="@{/geo/deviceLog(id=${project.ids})}" target="mainFrame" onclick="selected(this)">杩涘嚭搴撶鐞�</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='1')}" target="mainFrame" onclick="selected(this)">璐ㄩ噺绠$悊</a> + <i class="glyphicon glyphicon-object-align-horizontal"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='1')}" target="mainFrame" onclick="selected(this)">璐ㄩ噺绠$悊</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='2')}" target="mainFrame" onclick="selected(this)">瀹夊叏绠$悊</a> + <i class="glyphicon glyphicon-lock"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='2')}" target="mainFrame" onclick="selected(this)">瀹夊叏绠$悊</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='3')}" target="mainFrame" onclick="selected(this)">娴嬩簳</a> + <i class="glyphicon glyphicon-th-list"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='3')}" target="mainFrame" onclick="selected(this)">娴嬩簳</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='4')}" target="mainFrame" onclick="selected(this)">鏂滄祴</a> + <i class="glyphicon glyphicon-align-justify"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='4')}" target="mainFrame" onclick="selected(this)">鏂滄祴</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='5')}" target="mainFrame" onclick="selected(this)">瀹ゅ唴璇曢獙</a> + <i class="glyphicon glyphicon-home"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='5')}" target="mainFrame" onclick="selected(this)">瀹ゅ唴璇曢獙</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='6')}" target="mainFrame" onclick="selected(this)">宸ョ▼娴嬬粯</a> + <i class="glyphicon glyphicon-object-align-left"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='6')}" target="mainFrame" onclick="selected(this)">宸ョ▼娴嬬粯</a> </div> </div> <div class="box-header "> <div class="box-title"> - <i class="glyphicon glyphicon-modal-window"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='7')}" target="mainFrame" onclick="selected(this)">姘磋川鍒嗘瀽</a> + <i class="glyphicon glyphicon-tint"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='7')}" target="mainFrame" onclick="selected(this)">姘磋川鍒嗘瀽</a> </div> </div> </div> diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html index ec854eb..bb97ca8 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html +++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html @@ -66,11 +66,13 @@ var removeFlag = [[${@permission.hasPermi('geo:projectData:remove')}]]; var dataTypeDatas = [[${@dict.getType('project_data_type')}]]; var fileTypeDatas = [[${@dict.getType('project_data_file_type')}]]; + var projectId=[[${projectId}]]; + var type=[[${type}]]; var prefix = ctx + "geo/projectData"; $(function() { var options = { - url: prefix + "/list", + url: prefix + "/list?projectId="+projectId + "&dataType=" + type, createUrl: prefix + "/add", updateUrl: prefix + "/edit/{id}", removeUrl: prefix + "/remove", diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html index bd90031..c6a0e41 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html +++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html @@ -43,13 +43,20 @@ <th:block th:include="include :: footer" /> <script type="text/javascript"> var prefix = ctx + "geo/projectPerson" + var project_Id = [[${project_Id}]]; + console.log("projectId",project_Id); + $("#form-projectPerson-add").validate({ focusCleanup: true }); function submitHandler() { if ($.validate.form()) { - $.operate.save(prefix + "/add", $('#form-projectPerson-add').serialize()); + let formData = $('#form-projectPerson-add').serialize(); + let data = formData + "&projectId=" + project_Id + console.log("projectId",project_Id); + console.log("data",data); + $.operate.save(prefix + "/add", data); } } </script> diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html index 4bcc484..8a22aee 100644 --- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html +++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html @@ -64,7 +64,7 @@ $(function() { var options = { url: prefix + "/list?projectId="+projectId, - createUrl: prefix + "/add", + createUrl: prefix + "/add?projectId="+projectId, updateUrl: prefix + "/edit/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", -- Gitblit v1.9.1