队伍人员:点击人员名称展示人员详情

main
15036302109 9 months ago
parent 88ca8e3c88
commit 0800860368

@ -88,7 +88,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="队伍名称" align="center" prop="rescueTeamName" :show-overflow-tooltip="true"/> <el-table-column label="队伍名称" align="center" prop="rescueTeamName" :show-overflow-tooltip="true"/>
<el-table-column label="人员姓名" align="center" prop="workerName" :show-overflow-tooltip="true"/> <el-table-column label="人员姓名" align="center" prop="workerName" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span
@click="getWorkerDetail(scope.row)"
style="color: blue; cursor: pointer"
>{{scope.row.workerName}}</span>
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="workerAge" :show-overflow-tooltip="true"/> <el-table-column label="年龄" align="center" prop="workerAge" :show-overflow-tooltip="true"/>
<el-table-column label="性别" align="center" prop="gender" :show-overflow-tooltip="true"> <el-table-column label="性别" align="center" prop="gender" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
@ -104,6 +111,10 @@
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/> <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
</el-table> </el-table>
<workerDetail
ref="workerDetailRef"
:detailData="detailDataWorker"
></workerDetail>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
@ -119,7 +130,10 @@
<script> <script>
import { getWorkerInfo } from '@/api/ehs/realdata' import { getWorkerInfo } from '@/api/ehs/realdata'
import { getEhsRescueTeamWorker } from '@/api/ehs/ehsRescueTeamWorker'
import workerDetail from '@/views/ehs/ehsRescueTeamWorker/workerDetail.vue'
export default { export default {
components: { workerDetail },
dicts: ['team_property','team_level','sys_user_sex'], dicts: ['team_property','team_level','sys_user_sex'],
props: { props: {
detailData: { detailData: {
@ -136,6 +150,8 @@ export default {
total: 0, total: 0,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
//
detailDataWorker: {},
} }
}, },
@ -150,7 +166,18 @@ export default {
this.workerList = res.rows; this.workerList = res.rows;
this.loading = false; this.loading = false;
}) })
} },
getWorkerDetail(row) {
//
getEhsRescueTeamWorker(row.id).then((res) => {
if (res.code == 200) {
this.detailDataWorker = res.data;
this.$refs.workerDetailRef.open = true;
} else {
this.$message.warning(res.msg);
}
})
},
} }
}; };
</script> </script>

@ -152,7 +152,14 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="应急救援队伍id" align="center" prop="rescueTeamId" />--> <!-- <el-table-column label="应急救援队伍id" align="center" prop="rescueTeamId" />-->
<el-table-column label="队伍名称" align="center" prop="rescueTeamName" /> <el-table-column label="队伍名称" align="center" prop="rescueTeamName" />
<el-table-column label="人员姓名" align="center" prop="workerName" /> <el-table-column label="人员姓名" align="center" prop="workerName" >
<template slot-scope="scope">
<span
@click="getWorkerDetail(scope.row)"
style="color: blue; cursor: pointer"
>{{scope.row.workerName}}</span>
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="workerAge" /> <el-table-column label="年龄" align="center" prop="workerAge" />
<el-table-column label="性别" align="center" prop="gender"> <el-table-column label="性别" align="center" prop="gender">
<template slot-scope="scope"> <template slot-scope="scope">
@ -281,6 +288,11 @@
downUrl="/ehs/ehsRescueTeamWorker/importTemplate" downUrl="/ehs/ehsRescueTeamWorker/importTemplate"
temName="应急救援队伍人员导入模板" temName="应急救援队伍人员导入模板"
></importUpload> ></importUpload>
<workerDetail
ref="workerDetailRef"
:detailData="detailDataWorker"
></workerDetail>
</div> </div>
</template> </template>
@ -294,11 +306,13 @@ import {
getTeamInfo getTeamInfo
} from '@/api/ehs/ehsRescueTeamWorker' } from '@/api/ehs/ehsRescueTeamWorker'
import importUpload from "@/components/upload/upload"; import importUpload from "@/components/upload/upload";
import workerDetail from "./workerDetail.vue";
export default { export default {
name: "EhsRescueTeamWorker", name: "EhsRescueTeamWorker",
components: { components: {
importUpload, importUpload,
workerDetail,
}, },
dicts: ['sys_user_sex'], dicts: ['sys_user_sex'],
data() { data() {
@ -339,6 +353,10 @@ export default {
}, },
// //
form: {}, form: {},
// id
workerId: null,
//
detailDataWorker: {},
// //
rules: { rules: {
workerName: [ workerName: [
@ -507,6 +525,17 @@ export default {
this.$refs.uploadRef.upload.url = this.$refs.uploadRef.upload.url =
process.env.VUE_APP_BASE_API + "/ehs/ehsRescueTeamWorker/importData"; process.env.VUE_APP_BASE_API + "/ehs/ehsRescueTeamWorker/importData";
}, },
getWorkerDetail(row) {
//
getEhsRescueTeamWorker(row.id).then((res) => {
if (res.code == 200) {
this.detailDataWorker = res.data;
this.$refs.workerDetailRef.open = true;
} else {
this.$message.warning(res.msg);
}
})
},
/** 导入成功 */ /** 导入成功 */
upLoadOk() { upLoadOk() {
// console.log("") // console.log("")

Loading…
Cancel
Save