91 lines
1.7 KiB
Vue
91 lines
1.7 KiB
Vue
<!-- -->
|
|
<template>
|
|
<div class="report-archives">
|
|
<el-main :loding="true">
|
|
<el-card>
|
|
<query-form @submit="submit" />
|
|
</el-card>
|
|
<div class="result-own-charts">
|
|
<el-card v-if="dataInfo.genderDistribution">
|
|
<chart-form :dataInfo="dataInfo.genderDistribution" title="成长曲线分析" />
|
|
</el-card>
|
|
</div>
|
|
</el-main>
|
|
</div>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
import chartForm from './componments/chart-form'
|
|
import queryForm from './componments/query-form'
|
|
|
|
import { apiEmployeessItuation } from '@/api/api_staff'
|
|
export default {
|
|
components: {
|
|
chartForm,
|
|
queryForm
|
|
},
|
|
data () {
|
|
return {
|
|
monthLetter: {},
|
|
dataInfo: {}
|
|
}
|
|
},
|
|
computed: {},
|
|
beforeMount () { },
|
|
mounted () {
|
|
},
|
|
methods: {
|
|
async handleGetEmployeessItuation (data = {}) {
|
|
const loading = this.$loading({
|
|
lock: true,
|
|
text: 'Loading',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
})
|
|
let result = await apiEmployeessItuation(data)
|
|
setTimeout(() => {
|
|
loading.close()
|
|
}, 500)
|
|
if (result.code === 0) {
|
|
this.dataInfo = result.data
|
|
} else {
|
|
this.$message.error(result.mgs)
|
|
}
|
|
},
|
|
submit (data, monthLetter) {
|
|
this.monthLetter = monthLetter
|
|
this.handleGetEmployeessItuation(data)
|
|
}
|
|
},
|
|
watch: {}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style >
|
|
.el-card {
|
|
margin: 0 0 7px 0 !important;
|
|
}
|
|
.report-archives {
|
|
overflow: hidden;
|
|
}
|
|
.staff-archives-title {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
.staff-archives-form {
|
|
margin: 20px 0 0 0;
|
|
}
|
|
</style>
|
|
<style lang="scss">
|
|
.result-own-charts {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
> div {
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|