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

main
15036302109 9 months ago
parent 88ca8e3c88
commit 0800860368

@ -88,7 +88,14 @@
</template>
</el-table-column>
<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="gender" :show-overflow-tooltip="true">
<template slot-scope="scope">
@ -104,6 +111,10 @@
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
</el-table>
<workerDetail
ref="workerDetailRef"
:detailData="detailDataWorker"
></workerDetail>
<pagination
v-show="total > 0"
@ -119,7 +130,10 @@
<script>
import { getWorkerInfo } from '@/api/ehs/realdata'
import { getEhsRescueTeamWorker } from '@/api/ehs/ehsRescueTeamWorker'
import workerDetail from '@/views/ehs/ehsRescueTeamWorker/workerDetail.vue'
export default {
components: { workerDetail },
dicts: ['team_property','team_level','sys_user_sex'],
props: {
detailData: {
@ -136,6 +150,8 @@ export default {
total: 0,
pageNum: 1,
pageSize: 10,
//
detailDataWorker: {},
}
},
@ -150,7 +166,18 @@ export default {
this.workerList = res.rows;
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>

@ -152,7 +152,14 @@
</el-table-column>
<!-- <el-table-column label="应急救援队伍id" align="center" prop="rescueTeamId" />-->
<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="gender">
<template slot-scope="scope">
@ -281,6 +288,11 @@
downUrl="/ehs/ehsRescueTeamWorker/importTemplate"
temName="应急救援队伍人员导入模板"
></importUpload>
<workerDetail
ref="workerDetailRef"
:detailData="detailDataWorker"
></workerDetail>
</div>
</template>
@ -294,11 +306,13 @@ import {
getTeamInfo
} from '@/api/ehs/ehsRescueTeamWorker'
import importUpload from "@/components/upload/upload";
import workerDetail from "./workerDetail.vue";
export default {
name: "EhsRescueTeamWorker",
components: {
importUpload,
workerDetail,
},
dicts: ['sys_user_sex'],
data() {
@ -339,6 +353,10 @@ export default {
},
//
form: {},
// id
workerId: null,
//
detailDataWorker: {},
//
rules: {
workerName: [
@ -507,6 +525,17 @@ export default {
this.$refs.uploadRef.upload.url =
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() {
// console.log("")

Loading…
Cancel
Save