From 89ef223214f4bba4e513bc7b830161ec6ddf4d30 Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Sun, 18 Feb 2024 10:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=98=9F=E4=BC=8D=E5=90=8D?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E9=98=9F=E4=BC=8D=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8F=8A=E6=88=90=E5=91=98=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ehs/EhsRescueTeamWorkerController.java | 11 ++ .../impl/EhsRescueTeamServiceImpl.java | 8 +- .../mapper/EhsRescueTeamWorkerMapper.java | 2 + .../service/IEhsRescueTeamWorkerService.java | 5 + .../impl/EhsRescueTeamWorkerServiceImpl.java | 8 + .../mapper/ehs/EhsRescueTeamWorkerMapper.xml | 4 + ruoyi-ui/src/api/ehs/realdata.js | 18 ++ .../src/views/ehs/ehsRescueTeam/index.vue | 49 +++++- .../views/ehs/ehsRescueTeam/realDetail.vue | 67 ++++++++ .../views/ehs/ehsRescueTeam/tabs_first.vue | 160 ++++++++++++++++++ 10 files changed, 329 insertions(+), 3 deletions(-) create mode 100644 ruoyi-ui/src/api/ehs/realdata.js create mode 100644 ruoyi-ui/src/views/ehs/ehsRescueTeam/realDetail.vue create mode 100644 ruoyi-ui/src/views/ehs/ehsRescueTeam/tabs_first.vue diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamWorkerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamWorkerController.java index d7be150..6404fb2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamWorkerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamWorkerController.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.ehs; +import com.baomidou.mybatisplus.core.metadata.TableInfo; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; @@ -83,6 +84,16 @@ public class EhsRescueTeamWorkerController extends BaseController { return success(teamResponseVo); } + /** + * 根据队伍id获取人员信息(分页) + */ + @GetMapping("/listWorker/{rescueTeamId}") + public TableDataInfo listWorker(@PathVariable("rescueTeamId") Long rescueTeamId) { + startPage(); + List list = ehsRescueTeamWorkerService.listWorker(rescueTeamId); + return getDataTable(list); + } + /** * 新增应急救援队人员信息 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeam/service/impl/EhsRescueTeamServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeam/service/impl/EhsRescueTeamServiceImpl.java index 45307c0..af0dc0a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeam/service/impl/EhsRescueTeamServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeam/service/impl/EhsRescueTeamServiceImpl.java @@ -37,7 +37,13 @@ public class EhsRescueTeamServiceImpl extends ServiceImpl listWorker(Long rescueTeamId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/IEhsRescueTeamWorkerService.java b/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/IEhsRescueTeamWorkerService.java index d8fd88a..49e6854 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/IEhsRescueTeamWorkerService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/IEhsRescueTeamWorkerService.java @@ -39,4 +39,9 @@ public interface IEhsRescueTeamWorkerService extends IService listWorker(Long rescueTeamId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/impl/EhsRescueTeamWorkerServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/impl/EhsRescueTeamWorkerServiceImpl.java index b880611..fb9251d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/impl/EhsRescueTeamWorkerServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsRescueTeamWorker/service/impl/EhsRescueTeamWorkerServiceImpl.java @@ -126,6 +126,14 @@ public class EhsRescueTeamWorkerServiceImpl extends ServiceImpl listWorker(Long rescueTeamId) { + return ehsRescueTeamWorkerMapper.listWorker(rescueTeamId); + } + private LambdaQueryWrapper buildQueryWrapper(EhsRescueTeamWorker query) { Map params = query.getParams(); diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamWorkerMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamWorkerMapper.xml index 754d70b..bb0d084 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamWorkerMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamWorkerMapper.xml @@ -62,6 +62,10 @@ where id = #{id} + delete from ehs_rescue_team_worker diff --git a/ruoyi-ui/src/api/ehs/realdata.js b/ruoyi-ui/src/api/ehs/realdata.js new file mode 100644 index 0000000..e570824 --- /dev/null +++ b/ruoyi-ui/src/api/ehs/realdata.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +// 详情 +export const getXq = (id) => { + return request({ + url: '/ehs/ehsRescueTeam/'+id, + method: 'get', + }) +} + +// 获取人员信息 + +export const getWorkerInfo = (rescueTeamId) => { + return request({ + url: '/ehs/ehsRescueTeamWorker/listWorker/' + rescueTeamId, + method: 'get', + }) +} diff --git a/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue b/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue index 4386133..67d3618 100644 --- a/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue @@ -145,7 +145,22 @@ {{ Number(scope.$index) + 1 }} - + + + + + + @@ -282,11 +304,14 @@ import { listEhsRescueTeamWorker, getEhsRescueTeamWorker, delEhsRescueTeamWorker import importUpload from "@/components/upload/upload"; import tdh from "../ehsRescueTeamWorker/index.vue" import {listAllDept,selectPartDept } from "@/api/system/dept"; +import { getXq } from "@/api/ehs/realdata.js"; +import realDetail from "./realDetail.vue"; export default { name: "EhsRescueTeam", dicts: ['team_property','team_level'], components: { importUpload, + realDetail, tdh, }, data() { @@ -334,6 +359,9 @@ export default { }, // 表单参数 form: {}, + readParams: {}, + // 队伍表详细数据 + detailDataTeam: {}, // 表单校验 rules: { teamName: [ @@ -401,6 +429,24 @@ export default { this.loading = false; }); }, + + /** 获取队伍和人员信息 */ + getTeamInfoDetail(row) { + this.readParams = { + pageNum: 1, + pageSize: 10, + rescueTeamId: row.id, + }; + // 获取队伍详情 + getXq(row.id).then((res) => { + if (res.code == 200) { + this.detailDataTeam = res.data; + this.$refs.realDetailRef.open = true; + } else { + this.$message.warning(res.msg); + } + }); + }, // 取消按钮 cancel() { this.open = false; @@ -451,7 +497,6 @@ export default { this.open = true; this.title = "添加应急救援队伍管理"; if (this.curDeptId != 100){ - console.log("hello:"+this.partDeptInfo[0]); this.form.unit = this.partDeptInfo[0].deptName; } }, diff --git a/ruoyi-ui/src/views/ehs/ehsRescueTeam/realDetail.vue b/ruoyi-ui/src/views/ehs/ehsRescueTeam/realDetail.vue new file mode 100644 index 0000000..21c3a5b --- /dev/null +++ b/ruoyi-ui/src/views/ehs/ehsRescueTeam/realDetail.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/ruoyi-ui/src/views/ehs/ehsRescueTeam/tabs_first.vue b/ruoyi-ui/src/views/ehs/ehsRescueTeam/tabs_first.vue new file mode 100644 index 0000000..d9bdcbd --- /dev/null +++ b/ruoyi-ui/src/views/ehs/ehsRescueTeam/tabs_first.vue @@ -0,0 +1,160 @@ + + + + +