添加人员培训列表页面

This commit is contained in:
杜海鹏 2022-06-09 12:55:22 +08:00
parent 63431c0a8e
commit 242a897d22
6 changed files with 343 additions and 22 deletions

22
package-lock.json generated
View File

@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "zhgdyun",
"version": "0.1.0",
"dependencies": {
"axios": "^0.19.2",
@ -2213,7 +2214,6 @@
"merge-source-map": "^1.1.0",
"postcss": "^7.0.14",
"postcss-selector-parser": "^6.0.2",
"prettier": "^1.18.2",
"source-map": "~0.6.1",
"vue-template-es2015-compiler": "^1.9.0"
},
@ -4729,7 +4729,6 @@
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@ -9588,9 +9587,6 @@
"resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"dependencies": {
"graceful-fs": "^4.1.6"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
@ -9666,13 +9662,6 @@
"integrity": "sha1-FX5t0ypohp34hZMUrTjnAhGvOrQ=",
"dev": true,
"dependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"native-request": "^1.0.5",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
},
"bin": {
@ -10531,7 +10520,6 @@
"resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz",
"integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==",
"dependencies": {
"encoding": "^0.1.12",
"minipass": "^3.1.0",
"minipass-sized": "^1.0.3",
"minizlib": "^2.0.0"
@ -17143,7 +17131,6 @@
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
"braces": "^2.3.2",
"fsevents": "^1.2.7",
"glob-parent": "^3.1.0",
"inherits": "^2.0.3",
"is-binary-path": "^1.0.0",
@ -18513,7 +18500,6 @@
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"dependencies": {
"source-map": "~0.5.1",
"uglify-to-browserify": "~1.0.0",
"yargs": "~3.10.0"
},
"bin": {
@ -19135,10 +19121,8 @@
"resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.4.tgz?cache=0&sync_timestamp=1595633550112&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwatchpack%2Fdownload%2Fwatchpack-1.7.4.tgz",
"integrity": "sha1-bp2lOzyAuy1lCBiPWyAEEIZs0ws=",
"dependencies": {
"chokidar": "^3.4.1",
"graceful-fs": "^4.1.2",
"neo-async": "^2.5.0",
"watchpack-chokidar2": "^2.0.0"
"neo-async": "^2.5.0"
},
"optionalDependencies": {
"chokidar": "^3.4.1",
@ -19198,7 +19182,6 @@
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
"braces": "^2.3.2",
"fsevents": "^1.2.7",
"glob-parent": "^3.1.0",
"inherits": "^2.0.3",
"is-binary-path": "^1.0.0",
@ -19515,7 +19498,6 @@
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
"braces": "^2.3.2",
"fsevents": "^1.2.7",
"glob-parent": "^3.1.0",
"inherits": "^2.0.3",
"is-binary-path": "^1.0.0",

View File

@ -84,6 +84,9 @@ export const workerSafeEducationDeleteApi = data => post('xmgl/workerSafeEducati
export const workerSafeEducationDetailApi = data => post('xmgl/workerSafeEducation/queryById', data);
export const workerSafeEducationDetailApi2 = data => post('xmgl/workerSafeEducation/selectAnswerWorkerPage', data);
//项目下人员安全教育记录
export const selectSafeEducationWorkerPageApi = data => post('xmgl/workerSafeEducationWorker/selectSafeEducationWorkerPage', data);
//黑名单管理
export const workerBlacklistListApi = data => post('xmgl/workerBlacklist/list', data);

View File

@ -37,9 +37,9 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'https://zhgd-uat.logan.com.cn/'
// axios.defaults.baseURL = 'http://36.137.53.203:9090/'; // 南昌地铁 17512009894 123456789 gdjt 123456789
axios.defaults.baseURL = 'http://124.71.178.44:100/'
// axios.defaults.baseURL = 'http://124.71.178.44:100/'
// tag: 本地
// axios.defaults.baseURL = 'http://192.168.34.125:6023/'; //本地 http/1.1
axios.defaults.baseURL = 'http://192.168.34.125:6023/'; //本地 http/1.1
// axios.defaults.baseURL = 'http://182.90.224.237:7000/'; // 广西

View File

@ -284,6 +284,11 @@ const routes2 = [{
name: '劳务管理_安全培训管理',
component: () => import('@/views/projectFront/laborManage/safetyTrainManage.vue'),
},
{
path: '/project/labor/safeeducation',
name: '劳务管理_人员安全培训记录',
component: () => import('@/views/projectFront/laborManage/safeeducation/index.vue'),
},
{
path: '/project/labor/blackList',
name: '劳务管理_黑名单管理',

View File

@ -0,0 +1,24 @@
// 人员类型选项
export const personTypeOptions = [
{
label: '全部',
value: "",
},
{
label: '培训学校培训',
value: 0,
},
{
label: '入场三级教育',
value: 1,
}, {
label: '定期安全教育',
value: 2,
}, {
label: '安全技术交底',
value: 3,
}, {
label: 'VR安全教育',
value: 4,
}
]

View File

@ -0,0 +1,307 @@
/* 人员培训记录 */
<template>
<div class="epidemicPrevention">
<div class="query">
<el-form ref="queryParams" :model="queryParams" :inline="true" label-width="120px">
<el-form-item label="培训类型" prop="personType">
<el-select v-model="queryParams.personType" placeholder="请选择培训类型" clearable
:style="{width: '100%'}">
<el-option v-for="item in personTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="姓名" prop="workerName">
<el-input v-model="queryParams.workerName" placeholder="请输入姓名" clearable :style="{width: '100%'}">
</el-input>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="content">
<vue-scroll>
<div class="scroll">
<el-table v-loading="loading" :show-header="false" :data="userList">
<el-table-column align="center" prop="month">
<template #default="{ row }">
<!-- 用户信息 -->
<div class="user-info cell-height">
<div class="user-photo">
<el-image :preview-src-list="[$store.state.FILEURL + row.idCardBigPhotoUrl]" :src="$store.state.FILEURL + row.idCardBigPhotoUrl" fit="cover" />
</div>
<div class="user-info-right">
<!-- 人员名称和健康码 -->
<div class="top">
<span class="user-name">{{ row.workerName }}</span>
<span :class="['health-code', returnCodeClass(row.codeState)]">{{ codeStateEnum[row.codeState] }}</span>
</div>
<div class="user-info-bottom">
<span class="user-sex">{{ row.sex == 1 ? '男' : '女' }}</span>
<div class="user-age">
<span class="value">{{ row.age }}</span>
<span class="label"></span>
</div>
<span class="user-nation">{{ row.nation }}</span>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="name">
<template #default="{ row }">
<!-- 联系电话和班组 -->
<div class="space-around cell-height">
<div class="telephone">
<span class="label">联系电话</span>
<span class="value">{{ row.phoneNumber }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="idCard">
<template #default="{ row }">
<!-- 进场日期和在职状态 -->
<div class="space-around cell-height">
<div class="entry-date">
<span class="label">进场日期</span>
<span class="value">{{ row.enterDate }}</span>
</div>
<div class="job-status">
<span class="label">在职状态</span>
<span class="value">{{ workingStateEnum[row.inserviceType] }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="team">
<template #default="{ row }">
<!-- 身份证号和人员类型 -->
<div class="space-around cell-height">
<div class="id-card">
<span class="label">身份证号</span>
<span class="value">{{ row.idCard }}</span>
</div>
<div class="user-type">
<span class="label">人员类型</span>
<span class="value">{{ personTypeEnum[row.personType] }}</span>
</div>
</div>
</template>
</el-table-column>
<!-- 所属企业 -->
<el-table-column align="center" prop="enterpriseName">
<template #default="{ row }">
<div class="space-around cell-height">
<div class="company">
<span class="label">所属企业</span>
<span class="value">{{ row.enterpriseName }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column align="center">
<template #default="{ row }">
<!-- 核酸时间和疫苗接种针次 -->
<div class="space-around cell-height">
<div class="dna-time">
<span class="label">核酸时间</span>
<span class="value">{{ row.nadTime }}</span>
<el-button style="margin-left: 5px" type="text" icon="el-icon-edit" @click="handleUpdate(row, '核酸检测记录')">编辑</el-button>
</div>
<div class="number-of-vaccination">
<span class="label">疫苗接种针次</span>
<span class="value">{{ vaccineStatusEnum[row.vaccineStatus] }}</span>
<el-button style="margin-left: 5px" type="text" icon="el-icon-edit" @click="handleUpdate(row, '疫苗接种记录')">编辑</el-button>
</div>
</div>
</template>
</el-table-column>
</el-table>
<el-row type="flex" justify="center">
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
layout="total, prev, pager, next, jumper"
/>
</el-row>
</div>
</vue-scroll>
</div>
</div>
</template>
<script>
import { selectSafeEducationWorkerPageApi } from '@/assets/js/api/laborPerson'
//
import {
personTypeOptions
} from "./data";
export default {
components: {},
data: () => ({
personTypeOptions:personTypeOptions,
// SN
projectSn: '',
//
queryParams: {
pageNo: 1,
pageSize: 10,
projectSn: undefined, // SN
workerName: undefined //
},
}),
computed: {
headers() {
return { Authorization: this.$store.state.userInfo.token }
}
},
created() {
this.projectSn = this.$store.state.projectSn;
this.uploadUrl = this.$store.state.UPLOADURL;
this.getList()
},
methods: {
/** 查询用户数据 */
getList() {
this.loading = true;
this.queryParams.projectSn = this.projectSn;
selectSafeEducationWorkerPageApi(this.queryParams).then(res => {
this.userList = res.result.records;
this.total = res.result.total
this.loading = false;
})
},
/** 查询 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
}
}
</script>
<style lang="scss" scoped>
.epidemicPrevention {
display: flex;
flex-direction: column;
height: 100%;
background-color: #fff;
.query {
box-sizing: border-box;
padding: 20px;
width: 100%;
height: 155px;
background-color: #fff;
border-bottom: 2px solid #f3f5fd;
}
.content {
flex: 1;
height: calc(100% - 155px);
.cell-height {
height: 80px !important;
}
.label {
color: #737996;
font-size: 14px;
}
.value {
color: #2A2E3F;
font-size: 14px;
}
//
.user-info {
display: flex;
justify-content: space-around;
height: 100%;
//
.el-image {
width: 60px;
height: 80px;
border-radius: 4px;
margin-right: 10px;
cursor: pointer
}
//
.user-info-right {
width: 120px;
display: flex;
flex-direction: column;
justify-content: space-around;
.top {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 10px;
.user-name {
font-size: 15px;
font-weight: bold;
white-space: nowrap;
color: #5181F6;
}
.health-code {
display: grid;
place-items: center;
width: 42px;
height: 25px;
&.empty-code {
background-color: #f0f0f0;
color: #999;
}
&.green-code {
background-color: #edf7e8;
color: #58B024;
}
&.yellow-code {
background-color: #fcf7e5;
color: #FFCA00;
}
&.red-code {
background-color: #fbecec;
color: #B02424;
}
}
}
.user-info-bottom {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
color: #737996;
}
}
}
//
.space-around {
display: flex;
flex-direction: column;
justify-content: space-around;
height: 100%;
}
}
}
/* 查询表单 按钮样式 */
.query ::v-deep .el-button,
::v-deep .border-btn.el-button {
border-color: #4E7CFF;
color: #4E7CFF;
}
.scroll {
overflow-y: auto;
}
::v-deep .el-input__inner {
height: 40px !important;
}
</style>