feat: 新增人员结构管理模块

mengfanliang-0726-businessPerson_table
DESKTOP-2ESM03N\zcloud 2024-07-26 17:18:52 +08:00
parent 4b6d518621
commit 1e28240f58
7 changed files with 862 additions and 4 deletions

View File

@ -9,7 +9,15 @@ module.exports = {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
proxyTable: {
'/api': {
target: 'http://192.168.0.29:8088/',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST

View File

@ -5,7 +5,7 @@
"author": "",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.151.43",
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"e2e": "node test/e2e/runner.js",
@ -24,10 +24,15 @@
"jspdf": "^2.5.1",
"moment": "^2.29.1",
"nprogress": "^0.2.0",
"path-to-regexp": "^7.1.0",
"qs": "^6.12.3",
"relation-graph": "^2.0.26",
"throttle-debounce": "^5.0.2",
"viewerjs": "^1.11.6",
"vue": "^2.5.2",
"vue-baidu-map": "^0.21.22",
"vue-count-to": "^1.0.13",
"vue-hot-reload-api": "^2.3.4",
"vue-particles": "^1.0.9",
"vue-pdf": "^4.3.0",
"vue-print-nb": "^1.7.4",

View File

@ -196,7 +196,7 @@ export default {
{ required: true, message: '请输入旧密码', trigger: 'blur' }
],
newpwd: [
{ required: true,message: '请输入新密码', trigger: 'blur' },
{ required: true, message: '请输入新密码', trigger: 'blur' },
{
pattern: /^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[!#@*&.])[a-zA-Z\d!#@*&.]*.{8,16}$/,
message: '请输入长度8-16位密码必须由大写字母小写字母数字特殊符号(!#@*&.)组成'

View File

@ -0,0 +1,22 @@
<template>
<component :is="activeName" />
</template>
<script>
import List from './components/list'
export default {
components: {
List: List
},
data() {
return {
activeName: 'List',
SUPERVISE_CORPINFO_ID: ''
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -0,0 +1,588 @@
<template>
<div class="app-container">
<el-form :model="searchParmas" label-width="130px">
<el-row>
<el-col :span="6">
<el-form-item label="企业名称">
<el-input v-model="searchParmas.enterpriseName" placeholder="请输入企业名称"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="集团单位">
<el-input v-model="searchParmas.groupUnit" placeholder="请输入集团单位" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="股份主管部门" style="margin-right: 20px;">
<el-input v-model="searchParmas.shareSuperdepart" placeholder="请输入股份主管部门" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 多级表格 -->
<el-table
v-loading="strucManageListLoading"
ref="multipleTable"
:data="varList"
:header-cell-style="{ 'font-weight': 'bold', 'color': '#000' }"
:max-height="tableMaxHeight"
tooltip-effect="dark"
border
fit
stripe
highlight-current-row
@selection-change="selectionChange"
@select-all="selectAll"
@row-click="rowClick"
>
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" fixed align="center" />
<el-table-column type="index" label="序号" align="center" width="50" />
<el-table-column prop="enterpriseName" label="企业名称" align="center" show-overflow-tooltip width="120" />
<el-table-column prop="groupUnit" label="集团单位" show-overflow-tooltip align="center" width="120" />
<el-table-column prop="shareSuperdepart" label="股份主管部门" align="center" width="120" />
<el-table-column prop="scale" label="企业规模" align="center" width="120" />
<el-table-column prop="mainerPerson" label="主要负责人" align="center" width="120" />
<el-table-column prop="mainerPersonPhone" label="主要负责人联系电话" align="center" width="120" />
<el-table-column prop="enrollment" label="注册人数" align="center" width="120" />
<el-table-column prop="numQualiTrain" label="培训合格人数" align="center" width="120" />
<el-table-column prop="personAgeStruc" label="人员年龄结构" align="center">
<el-table-column prop="averageAge" label="平均年龄" align="center" width="120" />
<el-table-column prop="ageUpperSixty" label="大于60岁人数" align="center" width="120" />
<el-table-column prop="fiftyFiveAndSixty" label="55-60岁人数" align="center" width="120" />
<el-table-column prop="ageUnderFiftyFive" label="55岁以下人数" align="center" width="120" />
</el-table-column>
<el-table-column prop="workExprien" label="在港工作经历(年)" align="center" width="120" />
<el-table-column prop="personEdcaton" label="人员学历" align="center">
<el-table-column prop="belowHigh" label="高中以下" align="center" width="120" />
<el-table-column prop="high" label="高中" align="center" width="120" />
<el-table-column prop="mechanic" label="技工" align="center" width="120" />
<el-table-column prop="technicalOrSecondary" label="中专或中等技术学校" align="center" width="130" />
<el-table-column prop="collegeOrCollege" label="大学专科或专科院校" align="center" width="130" />
<el-table-column prop="graduateCollege" label="大学本科" align="center" width="120" />
<el-table-column prop="undergraduateCollege" label="大学本科以上" align="center" width="120" />
</el-table-column>
<el-table-column prop="man" label="男职工" align="center">
<el-table-column prop="manpersonNum" label="人数" align="center" width="120" />
<el-table-column prop="manRatio" label="占比" align="center" width="120" />
</el-table-column>
<el-table-column prop="woman" label="女职工" align="center">
<el-table-column prop="womanPersonNum" label="人数" align="center" width="120" />
<el-table-column prop="womanRatio" label="占比" align="center" width="120" />
</el-table-column>
<el-table-column prop="insurance" label="保险相关" align="center">
<el-table-column prop="numOfSecure" label="有社保人数" align="center" width="120" />
<el-table-column prop="numOfworkRelated" label="有工伤保险人数" align="center" width="120" />
<el-table-column prop="numOfCommercial" label="有商业保险人数" align="center" width="120" />
<el-table-column prop="numOfOther" label="其他保险人数" align="center" width="120" />
<el-table-column prop="numOfNone" label="无保险人数" align="center" width="120" />
</el-table-column>
<el-table-column prop="numOfSpecialOperation" label="取得特种作业证书人数" align="center">
<el-table-column prop="totalPerson" label="总人数" align="center" width="120" />
<el-table-column prop="electricianWork" label="电工作业" align="center" width="120" />
<el-table-column prop="weldingAndHotCuttingWork" label="焊接与热切割作业" align="center" width="120" />
<el-table-column prop="heightsWork" label="高处作业" align="center" width="120" />
<el-table-column prop="hoistingMachineryWork" label="起重机械作业" align="center" width="120" />
<el-table-column prop="motorVehiclesWork" label="企业内机动车辆作业" align="center" width="130" />
<el-table-column prop="otherSpecialWork" label="其他特种作业" align="center" width="120" />
</el-table-column>
<el-table-column align="center" label="操作" min-width="100" fixed="right">
<template slot="header">
<el-popover
ref="tablePopover"
v-model="popoverVisible"
width="240"
trigger="manual"
>
<span slot="reference" style="cursor: pointer;" @click="openPopover">
操作
<i class="el-icon-arrow-down" style="font-weight: bold;" />
</span>
<div class="popoverCheckBoxArea">
<el-checkbox :indeterminate="isIndeterminate" @change="handleCheckAllChange"></el-checkbox>
<div style="margin: 10px 0;" />
<el-tree
ref="treeRef"
:data="optionsColumns"
:props="defaultProps"
:default-expand-all="true"
:default-checked-keys="checkedColumns"
show-checkbox
node-key="id"
class="treeColumnStyle"
@check-change="handleCheckChange"
/>
</div>
<div class="popoverCheckBoxButton">
<el-button size="mini" @click="canclePopover"></el-button>
<el-button type="primary" size="mini" @click="confirmPopover"></el-button>
</div>
</el-popover>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button type="primary" icon="el-icon-upload2" @click="handleExportBtn"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { mockVarList } from './../mock/dataSource'
export default {
components: { Pagination },
data() {
return {
searchParmas: {
enterpriseName: '',
groupUnit: '',
shareSuperdepart: ''
},
varList: mockVarList,
// el-table
tableMaxHeight: 0,
//
strucManageListLoading: false,
//
listQuery: {
page: 1,
limit: 10
},
total: 0,
//
optionsColumns: [
{
id: '1',
label: '企业名称',
value: 'enterpriseName',
show: true,
children: []
},
{
id: '2',
label: '集团单位',
value: 'groupUnit',
show: true,
children: []
},
{
id: '3',
label: '股份主管部门',
value: 'shareSuperdepart',
show: true,
children: []
},
{
id: '4',
label: '企业规模',
value: 'scale',
show: true,
children: []
},
{
id: '5',
label: '企业名称',
value: 'enterpriseName',
show: true,
children: []
},
{
id: '6',
label: '主要负责人',
value: 'mainerPerson',
show: true,
children: []
},
{
id: '7',
label: '注册人数',
value: 'enrollment',
show: true,
children: []
},
{
id: '8',
label: '培训合格人数',
value: 'numQualiTrain',
show: true,
children: []
},
{
id: '9',
label: '人员年龄结构',
value: 'personAgeStruc',
show: true,
children: [
{
id: '9-1',
label: '平均年龄',
value: 'averageAge',
show: true,
children: []
},
{
id: '9-2',
label: '大于60岁人数',
value: 'ageUpperSixty',
show: true,
children: []
},
{
id: '9-3',
label: '55-60岁人数:',
value: 'fiftyFiveAndSixty',
show: true,
children: []
},
{
id: '9-4',
label: '55岁以下人数',
value: 'ageUnderFiftyFive',
show: true,
children: []
}
]
},
{
id: '10',
label: '在港工作经历(年)',
value: 'workExprien',
show: true,
children: []
},
{
id: '11',
label: '人员学历',
value: 'personEdcaton',
show: true,
children: [
{
id: '11-1',
label: '高中以下',
value: 'belowHigh',
show: true,
children: []
},
{
id: '11-2',
label: '高中',
value: 'high',
show: true,
children: []
},
{
id: '11-3',
label: '技工',
value: 'mechanic',
show: true,
children: []
},
{
id: '11-4',
label: '中专或中等技术学校',
value: 'technicalOrSecondary',
show: true,
children: []
},
{
id: '11-5',
label: '大学专科或专科院校',
value: 'collegeOrCollege',
show: true,
children: []
},
{
id: '11-6',
label: '大学本科',
value: 'graduateCollege',
show: true,
children: []
},
{
id: '11-7',
label: '大学本科以上',
value: 'undergraduateCollege',
show: true,
children: []
}
]
},
{
id: '12',
label: '男职工',
value: 'man',
show: true,
children: [
{
id: '12-1',
label: '人数',
value: 'manpersonNum',
show: true,
children: []
},
{
id: '12-2',
label: '占比',
value: 'manRatio',
show: true,
children: []
}
]
},
{
id: '13',
label: '女职工',
value: 'woman',
show: true,
children: [
{
id: '13-1',
label: '人数',
value: 'womanPersonNum',
show: true,
children: []
},
{
id: '13-2',
label: '占比',
value: 'womanRatio',
show: true,
children: []
}
]
},
{
id: '14',
label: '保险相关',
value: 'insurance',
show: true,
children: [
{
id: '14-1',
label: '有社保人数',
value: 'numOfSecure',
show: true,
children: []
},
{
id: '14-2',
label: '有工伤保险人数',
value: 'numOfworkRelated',
show: true,
children: []
},
{
id: '14-3',
label: '有商业保险人数',
value: 'numOfCommercial',
show: true,
children: []
},
{
id: '14-4',
label: '其他保险人数',
value: 'numOfOther',
show: true,
children: []
},
{
id: '14-5',
label: '无保险人数',
value: 'numOfNone',
show: true,
children: []
}
]
},
{
id: '15',
label: '取得特种作业证书人数',
value: 'numOfSpecialOperation',
show: true,
children: [
{
id: '15-1',
label: '总人数',
value: 'totalPerson',
show: true,
children: []
},
{
id: '15-2',
label: '电工作业',
value: 'electricianWork',
show: true,
children: []
},
{
id: '15-3',
label: '焊接与热切割作业',
value: 'weldingAndHotCuttingWork',
show: true,
children: []
},
{
id: '15-4',
label: '高处作业',
value: 'heightsWork',
show: true,
children: []
},
{
id: '15-5',
label: '起重机械作业',
value: 'hoistingMachineryWork',
show: true,
children: []
},
{
id: '15-6',
label: '企业内机动车辆作业',
value: 'motorVehiclesWork',
show: true,
children: []
},
{
id: '15-7',
label: '其他特种作业',
value: 'otherSpecialWork',
show: true,
children: []
}
]
}
],
defaultProps: {
children: 'children',
label: 'label'
},
popoverVisible: false,
checkedColumns: [], // id
isIndeterminate: false
}
},
created() {
// el-table
this.tableMaxHeight = window.innerHeight - 230
},
mounted() {
// el-table
this.$nextTick(() => {
window.onresize = () => {
this.tableMaxHeight = window.innerHeight - 230
}
})
this.checkedColumns = this.getIds(this.optionsColumns)
},
methods: {
getIds(optionsColumns) {
let ids = []
for (const column of optionsColumns) {
ids.push(column.id)
if (column.children && column.children.length > 0) {
ids = ids.concat(this.getIds(column.children))
}
}
return ids
},
handleSelectWithDifferentStatus(row, rowIndex) {
return true
},
getQuery() {
if (this.$refs.multipleTable) {
this.$refs.multipleTable.clearSelection()
}
this.listQuery = {
page: 1,
limit: 10
}
this.getList()
},
goKeyReset() {
this.searchParmas = {
enterpriseName: '',
groupUnit: '',
shareSuperdepart: ''
}
this.getQuery()
},
getList() {
console.log('this.searchParmas :>> ', this.searchParmas)
},
selectionChange(row) {
console.log('row :>> ', row)
},
selectAll(selection) {
console.log('selection :>> ', selection)
},
rowClick(row, column, event) {
console.log('row :>> ', row)
},
handleExportBtn() {
console.log('批量导出暂未开发!')
},
//
openPopover() {
this.popoverVisible = true
},
//
handleCheckAllChange(val) {
const treeRef = this.$refs.treeRef
if (val) {
treeRef.setCheckedNodes(this.getIds(this.optionsColumns))
} else {
treeRef.setCheckedNodes([])
}
},
canclePopover() {
this.popoverVisible = false
},
//
handleCheckChange(currentRow, selfCheck, subCheck) {
// console.log('currentRow :>> ', currentRow)
},
//
confirmPopover() {
this.popoverVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.treeColumnStyle {
height: 400px;
overflow-y: auto;
overflow-x: auto;
&::-webkit-scrollbar {
display: none;
}
}
</style>

View File

@ -0,0 +1,234 @@
var mockVarList = [
{
enterpriseName: '风力杭天',
groupUnit: '集团企业',
shareSuperdepart: '供水除尘部',
scale: '大型',
mainerPerson: '小美',
mainerPersonPhone: '13933293932',
enrollment: 90,
numQualiTrain: 120,
averageAge: 55,
ageUpperSixty: 4,
fiftyFiveAndSixty: 8,
ageUnderFiftyFive: 18,
workExprien: null,
belowHigh: 50,
high: 4,
mechanic: 40,
technicalOrSecondary: 20,
collegeOrCollege: 39,
graduateCollege: 1,
undergraduateCollege: 9,
manpersonNum: 2,
manRatio: '80%',
womanPersonNum: 9,
womanRatio: '30%',
numOfSecure: 40,
numOfworkRelated: 98,
numOfCommercial: 20,
numOfOther: 12,
numOfNone: 6,
totalPerson: 1200,
electricianWork: 9,
weldingAndHotCuttingWork: 3,
heightsWork: 1,
hoistingMachineryWork: 90,
motorVehiclesWork: 130,
otherSpecialWork: 34
},
{
enterpriseName: '行里力杭天',
groupUnit: '集团企业',
shareSuperdepart: '火力除尘部',
scale: '中小型',
mainerPerson: '轩里',
mainerPersonPhone: '150244938491',
enrollment: 90,
numQualiTrain: 120,
averageAge: 55,
ageUpperSixty: 4,
fiftyFiveAndSixty: 8,
ageUnderFiftyFive: 18,
workExprien: null,
belowHigh: 50,
high: 4,
mechanic: 40,
technicalOrSecondary: 20,
collegeOrCollege: 39,
graduateCollege: 1,
undergraduateCollege: 9,
manpersonNum: 2,
manRatio: '80%',
womanPersonNum: 9,
womanRatio: '30%',
numOfSecure: 40,
numOfworkRelated: 98,
numOfCommercial: 20,
numOfOther: 12,
numOfNone: 6,
totalPerson: 1200,
electricianWork: 9,
weldingAndHotCuttingWork: 3,
heightsWork: 1,
hoistingMachineryWork: 90,
motorVehiclesWork: 130,
otherSpecialWork: 34
},
{
enterpriseName: '意下提取',
groupUnit: '集团企业',
shareSuperdepart: '火力除尘部',
scale: '中小型',
mainerPerson: '轩里',
mainerPersonPhone: '150244938491',
enrollment: 90,
numQualiTrain: 120,
averageAge: 55,
ageUpperSixty: 4,
fiftyFiveAndSixty: 8,
ageUnderFiftyFive: 18,
workExprien: null,
belowHigh: 50,
high: 4,
mechanic: 40,
technicalOrSecondary: 20,
collegeOrCollege: 39,
graduateCollege: 1,
undergraduateCollege: 9,
manpersonNum: 2,
manRatio: '80%',
womanPersonNum: 9,
womanRatio: '30%',
numOfSecure: 40,
numOfworkRelated: 98,
numOfCommercial: 20,
numOfOther: 12,
numOfNone: 6,
totalPerson: 1200,
electricianWork: 9,
weldingAndHotCuttingWork: 3,
heightsWork: 1,
hoistingMachineryWork: 90,
motorVehiclesWork: 130,
otherSpecialWork: 34
},
{
enterpriseName: '燕来客机民众',
groupUnit: '集团企业',
shareSuperdepart: '火力除尘部',
scale: '中小型',
mainerPerson: '轩里',
mainerPersonPhone: '150244938491',
enrollment: 90,
numQualiTrain: 120,
averageAge: 55,
ageUpperSixty: 4,
fiftyFiveAndSixty: 8,
ageUnderFiftyFive: 18,
workExprien: null,
belowHigh: 50,
high: 4,
mechanic: 40,
technicalOrSecondary: 20,
collegeOrCollege: 39,
graduateCollege: 1,
undergraduateCollege: 9,
manpersonNum: 2,
manRatio: '80%',
womanPersonNum: 9,
womanRatio: '30%',
numOfSecure: 40,
numOfworkRelated: 98,
numOfCommercial: 20,
numOfOther: 12,
numOfNone: 6,
totalPerson: 1200,
electricianWork: 9,
weldingAndHotCuttingWork: 3,
heightsWork: 1,
hoistingMachineryWork: 90,
motorVehiclesWork: 130,
otherSpecialWork: 34
},
{
enterpriseName: '天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星',
groupUnit: '集团企业',
shareSuperdepart: '火力除尘部',
scale: '中小型',
mainerPerson: '轩里',
mainerPersonPhone: '150244938491',
enrollment: 90,
numQualiTrain: 120,
averageAge: 55,
ageUpperSixty: 4,
fiftyFiveAndSixty: 8,
ageUnderFiftyFive: 18,
workExprien: null,
belowHigh: 50,
high: 4,
mechanic: 40,
technicalOrSecondary: 20,
collegeOrCollege: 39,
graduateCollege: 1,
undergraduateCollege: 9,
manpersonNum: 2,
manRatio: '80%',
womanPersonNum: 9,
womanRatio: '30%',
numOfSecure: 40,
numOfworkRelated: 98,
numOfCommercial: 20,
numOfOther: 12,
numOfNone: 6,
totalPerson: 1200,
electricianWork: 9,
weldingAndHotCuttingWork: 3,
heightsWork: 1,
hoistingMachineryWork: 90,
motorVehiclesWork: 130,
otherSpecialWork: 34
},
{
enterpriseName: '天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星天河夜星',
groupUnit: '集团企业',
shareSuperdepart: '火力除尘部',
scale: '中小型',
mainerPerson: '轩里',
mainerPersonPhone: '150244938491',
enrollment: 90,
numQualiTrain: 120,
averageAge: 55,
ageUpperSixty: 4,
fiftyFiveAndSixty: 8,
ageUnderFiftyFive: 18,
workExprien: null,
belowHigh: 50,
high: 4,
mechanic: 40,
technicalOrSecondary: 20,
collegeOrCollege: 39,
graduateCollege: 1,
undergraduateCollege: 9,
manpersonNum: 2,
manRatio: '80%',
womanPersonNum: 9,
womanRatio: '30%',
numOfSecure: 40,
numOfworkRelated: 98,
numOfCommercial: 20,
numOfOther: 12,
numOfNone: 6,
totalPerson: 1200,
electricianWork: 9,
weldingAndHotCuttingWork: 3,
heightsWork: 1,
hoistingMachineryWork: 90,
motorVehiclesWork: 130,
otherSpecialWork: 34
}
]
export {
mockVarList
}

View File

@ -1,6 +1,7 @@
const config = {
weburl: 'http://192.168.151.43:8088/', // 前台地址
httpurl: 'http://192.168.151.43:8088/', // 后台地址
// httpurl: 'http://192.168.151.43:8088/', // 后台地址
httpurl: '/api', // 后台地址
qyurl: 'http://192.168.151.43:8088/', // 企业前台
adminurl: 'https://www.qdkjchina.com/qa-prevention-admin/',
// 正式