Browse Source

deploy

master
Soleilw 1 year ago
parent
commit
c47fcec1b7
42 changed files with 1860 additions and 230 deletions
  1. 0
    1
      dist/assets/index-T7d3tWJo.css
  2. 1
    0
      dist/assets/index-gaoqHXDk.css
  3. 165
    165
      dist/assets/index-r0jWs-NT.js
  4. 2
    2
      dist/index.html
  5. 3
    1
      src/apis/models/index.ts
  6. 20
    20
      src/apis/types/url.d.ts
  7. 3
    0
      src/apis/url.ts
  8. 4
    2
      src/components/layout/sider/aSider.vue
  9. 5
    1
      src/hooks/useAsRouter.ts
  10. 87
    3
      src/router/dynamic.ts
  11. 20
    1
      src/router/routerList.ts
  12. 1
    1
      src/store/usePermissionStore.ts
  13. 2
    2
      src/views/login/login.vue
  14. 10
    1
      src/views/permission/list/add/add.vue
  15. 8
    0
      src/views/statistics/company/index.vue
  16. 10
    0
      src/views/statistics/company/job/columns/index.ts
  17. 62
    0
      src/views/statistics/company/job/index.vue
  18. 77
    0
      src/views/statistics/company/job/search/index.vue
  19. 10
    0
      src/views/statistics/resume/ageSex/columns/index.ts
  20. 159
    0
      src/views/statistics/resume/ageSex/index.vue
  21. 77
    0
      src/views/statistics/resume/ageSex/search/index.vue
  22. 10
    0
      src/views/statistics/resume/certificateSkill/columns/index.ts
  23. 62
    0
      src/views/statistics/resume/certificateSkill/index.vue
  24. 77
    0
      src/views/statistics/resume/certificateSkill/search/index.vue
  25. 10
    0
      src/views/statistics/resume/education/columns/index.ts
  26. 62
    0
      src/views/statistics/resume/education/index.vue
  27. 77
    0
      src/views/statistics/resume/education/search/index.vue
  28. 10
    0
      src/views/statistics/resume/holidaysAccommodation/columns/index.ts
  29. 159
    0
      src/views/statistics/resume/holidaysAccommodation/index.vue
  30. 77
    0
      src/views/statistics/resume/holidaysAccommodation/search/index.vue
  31. 10
    0
      src/views/statistics/resume/jobIntention/columns/index.ts
  32. 62
    0
      src/views/statistics/resume/jobIntention/index.vue
  33. 77
    0
      src/views/statistics/resume/jobIntention/search/index.vue
  34. 10
    0
      src/views/statistics/resume/major/columns/index.ts
  35. 9
    19
      src/views/statistics/resume/major/index.vue
  36. 31
    11
      src/views/statistics/resume/major/search/index.vue
  37. 10
    0
      src/views/statistics/resume/titleSkill/columns/index.ts
  38. 155
    0
      src/views/statistics/resume/titleSkill/index.vue
  39. 77
    0
      src/views/statistics/resume/titleSkill/search/index.vue
  40. 10
    0
      src/views/statistics/resume/workExperience/columns/index.ts
  41. 62
    0
      src/views/statistics/resume/workExperience/index.vue
  42. 77
    0
      src/views/statistics/resume/workExperience/search/index.vue

+ 0
- 1
dist/assets/index-T7d3tWJo.css
File diff suppressed because it is too large
View File


+ 1
- 0
dist/assets/index-gaoqHXDk.css
File diff suppressed because it is too large
View File


dist/assets/index-r0jWs-NT.js
File diff suppressed because it is too large
View File


+ 2
- 2
dist/index.html View File

@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/logo_1.jpg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>后台管理系统</title>
<script type="module" crossorigin src="/assets/index-XPjI18tg.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-T7d3tWJo.css">
<script type="module" crossorigin src="/assets/index-r0jWs-NT.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-gaoqHXDk.css">
</head>
<body>
<div id="app"></div>

+ 3
- 1
src/apis/models/index.ts View File

@@ -201,4 +201,6 @@ export const GetStatsWorkExperience = getModel(url.StatsWorkExperience);
export const GetStatsHa = getModel(url.StatsHa);
export const GetStatsAgeandgender = getModel(url.StatsAgeandgender);
export const GetStatsEducation = getModel(url.StatsEducation);
export const GetStatsPosition = getModel(url.StatsPosition);
export const GetStatsPosition = getModel(url.StatsPosition);
export const GetStatsTitleAndSkill = getModel(url.StatsTitleAndSkill);
export const GetStatsJobMajor = getModel(url.StatsJobMajor);

+ 20
- 20
src/apis/types/url.d.ts View File

@@ -99,17 +99,17 @@ declare namespace urlType {
advertscheduleUpdate : String,
advertscheduleList : String,
advertscheduleDetail : String,
// 活动
activityExportUsers: String,
activityaddressAdd: String,
activityaddressDel: String,
activityaddressUpdate: String,
activityaddressList: String,
activityaddressDetail: String,
activityaddressCate: String,
activityExportUsers : String,
activityaddressAdd : String,
activityaddressDel : String,
activityaddressUpdate : String,
activityaddressList : String,
activityaddressDetail : String,
activityaddressCate : String,
// 简历
// 列表
'JobseekerList' : String, // 查看
@@ -173,17 +173,17 @@ declare namespace urlType {
'JobapplicantUpdateexperience' : String,
'JobapplicantListexperience' : String,
'JobapplicantExperiencedetail' : String,
// 统计
StatsMajor: String,
StatsCertificate: String,
StatsWorkExperience: String,
StatsHa: String,
StatsAgeandgender: String,
StatsEducation: String,
StatsPosition: String,


// 统计
StatsMajor : String,
StatsCertificate : String,
StatsWorkExperience : String,
StatsHa : String,
StatsAgeandgender : String,
StatsEducation : String,
StatsPosition : String,
StatsTitleAndSkill : String,
StatsJobMajor : String,

}
}

+ 3
- 0
src/apis/url.ts View File

@@ -191,4 +191,7 @@ export const url : urlType.url = {
StatsAgeandgender: admin + '/stats/ageandgender', // 求职者年龄与性别统计
StatsEducation: admin + '/stats/education', // 求职者学历统计
StatsPosition: admin + '/stats/position', // 求职者求职意向统计
StatsTitleAndSkill: admin + '/stats/titleandskill', // 求职者职称与技能统计
StatsJobMajor: admin + '/stats/job_major', // 企业职位统计
}

+ 4
- 2
src/components/layout/sider/aSider.vue View File

@@ -37,14 +37,15 @@
import { ref, onMounted, computed } from 'vue';
import { useMenu } from '@/hooks/useMenu';
let { menuList, onMenu, routerCur, routerArrayCur } = useMenu();
console.log(menuList)
const selectedMenu = computed(() => {
let newSelectedMenu = [routerCur()];
return newSelectedMenu;
})

const openSubMenu = computed(() => {
let newOpenSubMenu = [routerArrayCur()];
console.log(routerArrayCur())
let newOpenSubMenu = routerArrayCur();
return newOpenSubMenu;
})

@@ -61,6 +62,7 @@ console.log(menuList)
::-webkit-scrollbar {
/* 设置滚动条宽度 */
width: 0px;
height: 0px;
}

.ant-menu {

+ 5
- 1
src/hooks/useAsRouter.ts View File

@@ -9,7 +9,11 @@ export const useAsRouter = () => {

// 获取当前路由父路由
function routerArrayCur() {
return router.currentRoute.value.matched[1].path;
if(router.currentRoute.value.matched.length > 3) {
return [router.currentRoute.value.matched[1].path, router.currentRoute.value.matched[2].path]
} else {
return [router.currentRoute.value.matched[1].path]
}
}

// 跳转路由

+ 87
- 3
src/router/dynamic.ts View File

@@ -142,7 +142,7 @@ const HomemakeRoute : AppRouteRecordRaw = {

// 求职者管理
const JokSeekerRoute : AppRouteRecordRaw = {
path: '/job-seeker',
path: '/job/seeker',
name: 'jobSeeker',
component: routerList.JobSeeker,
meta: {
@@ -164,7 +164,7 @@ const JokSeekerRoute : AppRouteRecordRaw = {

// 招聘会管理
const JokFairRoute : AppRouteRecordRaw = {
path: '/job-fair',
path: '/job/fair',
name: 'jobFair',
component: routerList.JokFair,
meta: {
@@ -312,12 +312,96 @@ const StatisticsRoute : AppRouteRecordRaw = {
path: '/statistics/resume/major',
name: 'statisticsResumeMajor',
component: routerList.StatisticsResumeMajor,
meta: {
title: '专业',
icon: HomeOutlined
},
},
{
path: '/statistics/resume/age/sex',
name: 'statisticsResumeAgeSex',
component: routerList.StatisticsResumeAgeSex,
meta: {
title: '年龄与性别',
icon: HomeOutlined
},
},
{
path: '/statistics/resume/certificate/skill',
name: 'statisticsResumeCertificateSkill',
component: routerList.StatisticsResumeCertificateSkill,
meta: {
title: '技能证书',
icon: HomeOutlined
},
},
{
path: '/statistics/resume/education',
name: 'statisticsResumeEducation',
component: routerList.StatisticsResumeEducation,
meta: {
title: '学历',
icon: HomeOutlined
},
},
{
path: '/statistics/resume/holidays/accommodation',
name: 'statisticsResumeHolidaysAccommodation',
component: routerList.StatisticsResumeHolidaysAccommodation,
meta: {
title: '节假日与食宿',
icon: HomeOutlined
},
},
{
path: '/statistics/resume/job/intention',
name: 'statisticsResumeJobIntention',
component: routerList.StatisticsResumeJobIntention,
meta: {
title: '求职意向',
icon: HomeOutlined
},
},
{
path: '/statistics/resume/title/skill',
name: 'statisticsResumeTitleSkill',
component: routerList.StatisticsResumeTitleSkill,
meta: {
title: '职称与技能',
icon: HomeOutlined
},
}
},
{
path: '/statistics/resume/work/experience',
name: 'statisticsResumeWorkExperience',
component: routerList.StatisticsResumeWorkExperience,
meta: {
title: '工作经验',
icon: HomeOutlined
},
},
],
},
{
path: '/statistics/company',
name: 'statisticsCompany',
component: routerList.StatisticsCompany,
meta: {
title: '企业统计',
icon: HomeOutlined
},
children: [
{
path: '/statistics/company/job',
name: 'statisticsCompanyJob',
component: routerList.StatisticsCompanyJob,
meta: {
title: '职位',
icon: HomeOutlined
},
},
]
}
],

+ 20
- 1
src/router/routerList.ts View File

@@ -44,6 +44,16 @@ import ActivityAddress from '@/views/activity/address/index.vue';
import Statistics from '@/views/statistics/index.vue';
import StatisticsResume from '@/views/statistics/resume/index.vue';
import StatisticsResumeMajor from '@/views/statistics/resume/major/index.vue';
import StatisticsResumeAgeSex from '@/views/statistics/resume/ageSex/index.vue';
import StatisticsResumeCertificateSkill from '@/views/statistics/resume/certificateSkill/index.vue';
import StatisticsResumeEducation from '@/views/statistics/resume/education/index.vue';
import StatisticsResumeHolidaysAccommodation from '@/views/statistics/resume/holidaysAccommodation/index.vue';
import StatisticsResumeJobIntention from '@/views/statistics/resume/jobIntention/index.vue';
import StatisticsResumeTitleSkill from '@/views/statistics/resume/titleSkill/index.vue';
import StatisticsResumeWorkExperience from '@/views/statistics/resume/workExperience/index.vue';

import StatisticsCompany from '@/views/statistics/company/index.vue';
import StatisticsCompanyJob from '@/views/statistics/company/job/index.vue';

export const routerList = {
Permission,
@@ -76,5 +86,14 @@ export const routerList = {
ActivityAddress,
Statistics,
StatisticsResume,
StatisticsResumeMajor
StatisticsResumeMajor,
StatisticsResumeAgeSex,
StatisticsResumeCertificateSkill,
StatisticsResumeEducation,
StatisticsResumeHolidaysAccommodation,
StatisticsResumeJobIntention,
StatisticsResumeTitleSkill,
StatisticsResumeWorkExperience,
StatisticsCompany,
StatisticsCompanyJob
}

+ 1
- 1
src/store/usePermissionStore.ts View File

@@ -42,7 +42,7 @@ const actions = {
pushItem(item)
})
let arr = state.arrresult;
// let arr = ['permission', 'role', 'account', 'company', 'vip', 'member', 'homemake', 'homemakeType', 'homemakePosition', 'homemakeDemand', 'homemakeAppointment', 'job', 'department', 'jobSeeker', 'jobResume', 'jobFair', 'jobFairList', 'jobFairCompany', 'information', 'section', 'article', 'list', 'putIn', 'advertisementList', 'advertisement', 'activity', 'activityList', 'activityAddress', 'statistics', 'statisticsResume', 'statisticsResumeMajor'];
// let arr = ['permission', 'role', 'account', 'company', 'vip', 'member', 'homemake', 'homemakeType', 'homemakePosition', 'homemakeDemand', 'homemakeAppointment', 'job', 'department', 'jobSeeker', 'jobResume', 'jobFair', 'jobFairList', 'jobFairCompany', 'information', 'section', 'article', 'list', 'putIn', 'advertisementList', 'advertisement', 'activity', 'activityList', 'activityAddress', 'statistics', 'statisticsResume', 'statisticsResumeMajor','statisticsResumeAgeSex','statisticsResumeCertificateSkill','statisticsResumeEducation','statisticsResumeHolidaysAccommodation','statisticsResumeJobIntention','statisticsResumeTitleSkill','statisticsResumeWorkExperience'];
let routes = routerDynamic(routesModuleList, arr);
LayoutRoute.children.push(...routes);
commit('SET_MENU', LayoutRoute.children);

+ 2
- 2
src/views/login/login.vue View File

@@ -76,8 +76,8 @@
const { routerTo } = useAsRouter();
const createForm = ref<Object>({
mobile: '13215816085',
password: '123456'
mobile: '',
password: ''
})
const toLogin = () => {
if (!createForm.value.mobile) {

+ 10
- 1
src/views/permission/list/add/add.vue View File

@@ -171,23 +171,32 @@
}
if(newVal[0].parent_id == -1) {
cascaderParentId.value.push(newVal[0].id);
addOtherForm.value.isAddLevel = true;
addOtherForm.value.isTopLevel = true;
addOtherForm.value.parent_id = -1;
} else {
cascaderParentId.value.push(newVal[0].parent_id);
cascaderParentId.value.push(newVal[0].id);
addOtherForm.value.isAddLevel = true
addOtherForm.value.isTopLevel = false
addOtherForm.value.parent_id = 0;
}
} else if(newVal[1]){
title.value = "添加下级权限/菜单";
console.log(newVal[1])
createForm.value.p_type = newVal[1].p_type
cascaderParentId.value = [];
if(newVal[1].parent_id == -1) {
cascaderParentId.value.push(newVal[1].id);
addOtherForm.value.isAddLevel = true;
addOtherForm.value.isTopLevel = true;
addOtherForm.value.parent_id = -1;
} else {
cascaderParentId.value.push(newVal[1].parent_id);
cascaderParentId.value.push(newVal[1].id);
addOtherForm.value.isAddLevel = true
addOtherForm.value.isTopLevel = false
addOtherForm.value.parent_id = 0;
}
createForm.value.parent_id = newVal[1].id
} else {

+ 8
- 0
src/views/statistics/company/index.vue View File

@@ -0,0 +1,8 @@
<template>
<router-view></router-view>
</template>
<script>
</script>

<style>
</style>

+ 10
- 0
src/views/statistics/company/job/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '职位',
dataIndex: 'major'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 62
- 0
src/views/statistics/company/job/index.vue View File

@@ -0,0 +1,62 @@
<template>
<job-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></job-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import JobSearch from '@/views/statistics/company/job/search/index.vue';
import { GetStatsJobMajor } from '@/apis/models';
import { cols } from '@/views/statistics/company/job/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);


onMounted(() => {
getData(commomParams.value.search);
})
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsJobMajor(commomParams.value.search);
loading.value = false;
commomParams.value.table.data = res.data.list;
commomParams.value.table.columns = cols;
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/company/job/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'major';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'major',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/ageSex/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '专业名',
dataIndex: 'major'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 159
- 0
src/views/statistics/resume/ageSex/index.vue View File

@@ -0,0 +1,159 @@
<template>
<age-sex-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></age-sex-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-row>
<a-col :span="12">
<div ref="agePie" style="width: 100%; height: 480px;"></div>
</a-col>
<a-col :span="12">
<div ref="sexPie" style="width: 100%; height: 480px;"></div>
</a-col>
</a-row>
<!--
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table> -->

</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import AgeSexSearch from '@/views/statistics/resume/ageSex/search/index.vue';
import { GetStatsAgeandgender } from '@/apis/models';
import { init } from 'echarts';
import { cols } from '@/views/statistics/resume/ageSex/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);
const agePie = ref(null);
const sexPie = ref(null);
// 设置环形图的数据
const ageData = ref([
{ name: '0-18岁', value: 20 },
{ name: '19-30岁', value: 30 },
{ name: '31-45岁', value: 40 },
{ name: '46岁以上', value: 10 },
])
const sexData = ref([
{ name: '男', value: 20 },
{ name: '女', value: 30 }
])

onMounted(() => {
getData(commomParams.value.search);
getAgePieInit()
getSexPieInit()
})
const getAgePieInit = () => {
const agePieOption = init(agePie.value)
const option = {
legend: {
orient: 'vertical',
top: '10%',
left: 'left'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
name: '年龄分布',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
data: ageData.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
};
agePieOption.setOption(option)
}
const getSexPieInit = () => {
const sexPieOption = init(sexPie.value)
const option = {
legend: {
orient: 'vertical',
top: '10%',
left: 'left'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
name: '性别分布',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
data: sexData.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
};
sexPieOption.setOption(option)
}

const searchData = (data : object) => {
commomParams.value.search = data
getData();
}

const clearData = (data : object) => {
commomParams.value.search = data
getData();
}

const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}

const getData = async () => {
try {
loading.value = true;
let res = await GetStatsAgeandgender(commomParams.value.search);
loading.value = false;
ageData.value = res.data.age_group_list.map(item => {
return {name: item.age_group, value: item.total}
})
getAgePieInit()
sexData.value = res.data.gender_list.map(item => {
return {name: item.gender, value: item.total}
})
getSexPieInit()
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/ageSex/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'work_experience';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'work_experience',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/certificateSkill/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '证书名',
dataIndex: 'certificate'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 62
- 0
src/views/statistics/resume/certificateSkill/index.vue View File

@@ -0,0 +1,62 @@
<template>
<certificate-skill-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></certificate-skill-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import CertificateSkillSearch from '@/views/statistics/resume/certificateSkill/search/index.vue';
import { GetStatsCertificate } from '@/apis/models';
import { cols } from '@/views/statistics/resume/certificateSkill/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);


onMounted(() => {
getData(commomParams.value.search);
})
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsCertificate(commomParams.value.search);
loading.value = false;
commomParams.value.table.data = res.data.list;
commomParams.value.table.columns = cols;
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/certificateSkill/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'certificate';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'certificate',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/education/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '学历',
dataIndex: 'education'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 62
- 0
src/views/statistics/resume/education/index.vue View File

@@ -0,0 +1,62 @@
<template>
<major-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></major-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import MajorSearch from '@/views/statistics/resume/education/search/index.vue';
import { GetStatsEducation } from '@/apis/models';
import { cols } from '@/views/statistics/resume/education/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);


onMounted(() => {
getData(commomParams.value.search);
})
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsEducation(commomParams.value.search);
loading.value = false;
commomParams.value.table.data = res.data.list;
commomParams.value.table.columns = cols;
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/education/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'education';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'education',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/holidaysAccommodation/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '专业名',
dataIndex: 'major'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 159
- 0
src/views/statistics/resume/holidaysAccommodation/index.vue View File

@@ -0,0 +1,159 @@
<template>
<major-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></major-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<!-- <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table> -->
<a-row>
<a-col :span="12">
<div ref="holidayPie" style="width: 100%; height: 400px;"></div>
</a-col>
<a-col :span="12">
<div ref="accommodationPie" style="width: 100%; height: 400px;"></div>
</a-col>
</a-row>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import MajorSearch from '@/views/statistics/resume/holidaysAccommodation/search/index.vue';
import { GetStatsHa } from '@/apis/models';
import { init } from 'echarts';
import { cols } from '@/views/statistics/resume/holidaysAccommodation/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);
const holidayPie = ref(null);
const accommodationPie = ref(null);
// 设置环形图的数据
const holidayData = ref([
{ name: '提供食宿', value: 20 },
{ name: '包住', value: 30 },
{ name: '31-45岁', value: 40 },
{ name: '46岁以上', value: 10 },
])
const accommodationData = ref([
{ name: '月休4日', value: 20 },
{ name: '三班倒', value: 30 }
])
onMounted(() => {
getData(commomParams.value.search);
getHolidayPieInit()
getAccommodationPieInit()
})
const getHolidayPieInit = () => {
const holidayPieOption = init(holidayPie.value)
const option = {
legend: {
orient: 'vertical',
top: '10%',
left: 'left'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
name: '节假日休息分布',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
data: holidayData.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
};
holidayPieOption.setOption(option)
}
const getAccommodationPieInit = () => {
const accommodationPieOption = init(accommodationPie.value)
const option = {
legend: {
orient: 'vertical',
top: '10%',
left: 'left'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
name: '食宿情况分布',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
data: accommodationData.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
};
accommodationPieOption.setOption(option)
}
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsHa(commomParams.value.search);
loading.value = false;
holidayData.value = res.data.holiday_rest_list.map(item => {
return {name: item.holiday_rest, value: item.total}
})
getHolidayPieInit()
accommodationData.value = res.data.accommodation_list.map(item => {
return {name: item.AccommodationRequirement, value: item.Total}
})
getAccommodationPieInit()
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/holidaysAccommodation/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'holiday_rest';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'holiday_rest',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/jobIntention/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '岗位',
dataIndex: 'position_name'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 62
- 0
src/views/statistics/resume/jobIntention/index.vue View File

@@ -0,0 +1,62 @@
<template>
<job-intention-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></job-intention-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import JobIntentionSearch from '@/views/statistics/resume/jobIntention/search/index.vue';
import { GetStatsPosition } from '@/apis/models';
import { cols } from '@/views/statistics/resume/jobIntention/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);


onMounted(() => {
getData(commomParams.value.search);
})
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsPosition(commomParams.value.search);
loading.value = false;
commomParams.value.table.data = res.data.list;
commomParams.value.table.columns = cols;
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/jobIntention/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'level1';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'level1',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/major/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '专业名',
dataIndex: 'major'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 9
- 19
src/views/statistics/resume/major/index.vue View File

@@ -1,16 +1,16 @@
<template>
<a-card title="求职者专业统计">
<major-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></major-search>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</a-card>
<major-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></major-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import MajorSearch from '@/views/statistics/resume/major/search/index.vue';
import { GetStatsHa } from '@/apis/models';
import { GetStatsMajor } from '@/apis/models';
import { cols } from '@/views/statistics/resume/major/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
@@ -27,17 +27,7 @@
}
const clearData = (data : object) => {
if (data) {
commomParams.value.search = data
} else {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'work_experience',
sortby: 'asc',
keyword: ''
}
}
commomParams.value.search = data
getData();
}
@@ -50,7 +40,7 @@
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsHa(commomParams.value.search);
let res = await GetStatsMajor(commomParams.value.search);
loading.value = false;
commomParams.value.table.data = res.data.list;
commomParams.value.table.columns = cols;

+ 31
- 11
src/views/statistics/resume/major/search/index.vue View File

@@ -1,15 +1,33 @@
<template>
<a-range-picker @Change="getRange" />
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { commomParams, dayjs } = useCommon();
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
@@ -18,7 +36,7 @@
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'work_experience';
commomParams.value.search.sort = 'major';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
@@ -26,14 +44,11 @@
immediate: true
})
const getRange = (val) => {
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
}
const getData = () => {
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
@@ -41,17 +56,22 @@
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'work_experience',
sortby: 'asc',
sort: 'major',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>
</style>


+ 10
- 0
src/views/statistics/resume/titleSkill/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '专业名',
dataIndex: 'major'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 155
- 0
src/views/statistics/resume/titleSkill/index.vue View File

@@ -0,0 +1,155 @@
<template>
<title-skill-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></title-skill-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<!-- <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table> -->
<a-row>
<a-col :span="12">
<div ref="titlePie" style="width: 100%; height: 400px;"></div>
</a-col>
<a-col :span="12">
<div ref="skillPie" style="width: 100%; height: 400px;"></div>
</a-col>
</a-row>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import TitleSkillSearch from '@/views/statistics/resume/titleSkill/search/index.vue';
import { GetStatsTitleAndSkill } from '@/apis/models';
import { init } from 'echarts';
import { cols } from '@/views/statistics/resume/holidaysAccommodation/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);
const titlePie = ref(null);
const skillPie = ref(null);
// 设置环形图的数据
const titleData = ref([
{ name: '初级', value: 20 },
{ name: '中级', value: 30 }
])
const skillData = ref([
{ name: '初级工', value: 20 },
{ name: '中级工', value: 30 }
])
onMounted(() => {
getData(commomParams.value.search);
getTitlePieInit()
getSkillPieInit()
})
const getTitlePieInit = () => {
const titlePieOption = init(titlePie.value)
const option = {
legend: {
orient: 'vertical',
top: '10%',
left: 'left'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
name: '职称分布',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
data: titleData.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
};
titlePieOption.setOption(option)
}
const getSkillPieInit = () => {
const skillPieOption = init(skillPie.value)
const option = {
legend: {
orient: 'vertical',
top: '10%',
left: 'left'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
series: [
{
name: '技能分布',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
data: skillData.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
};
skillPieOption.setOption(option)
}
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsTitleAndSkill(commomParams.value.search);
loading.value = false;
skillData.value = res.data.skill_cert_list.map(item => {
return {name: item.skill_cert, value: item.total}
})
getSkillPieInit()
titleData.value = res.data.title_stat_list.map(item => {
return {name: item.title, value: item.total}
})
getTitlePieInit()
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/titleSkill/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'level1';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'level1',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


+ 10
- 0
src/views/statistics/resume/workExperience/columns/index.ts View File

@@ -0,0 +1,10 @@
export const cols = <ColType.type[]>[
{
title: '工作经验',
dataIndex: 'work_experience'
},
{
title: '总数',
dataIndex: 'total'
}
];

+ 62
- 0
src/views/statistics/resume/workExperience/index.vue View File

@@ -0,0 +1,62 @@
<template>
<work-experience-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></work-experience-search>
<a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
<a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
@page="getPage" :loading="loading">
</a-c-table>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import WorkExperienceSearch from '@/views/statistics/resume/workExperience/search/index.vue';
import { GetStatsWorkExperience } from '@/apis/models';
import { cols } from '@/views/statistics/resume/workExperience/columns';
import { useCommon } from '@/hooks/useCommon';
let { commomParams } = useCommon();
let loading = ref<Boolean>(true);


onMounted(() => {
getData(commomParams.value.search);
})
const searchData = (data : object) => {
commomParams.value.search = data
getData();
}
const clearData = (data : object) => {
commomParams.value.search = data
getData();
}
const getPage = (data : object) => {
commomParams.value.search.page = data.current;
commomParams.value.search.pagesize = data.pageSize;
getData();
}
const getData = async () => {
try {
loading.value = true;
let res = await GetStatsWorkExperience(commomParams.value.search);
loading.value = false;
commomParams.value.table.data = res.data.list;
commomParams.value.table.columns = cols;
commomParams.value.page = {
current: commomParams.value.search.page,
pageSize: commomParams.value.search.pagesize,
total: res.data.total,
pageSizeOptions: ['10', '20', '30', '40'],
hideOnSinglePage: false,
showSizeChanger: true
};
} catch {
loading.value = false;
}
}
</script>

<style>
</style>

+ 77
- 0
src/views/statistics/resume/workExperience/search/index.vue View File

@@ -0,0 +1,77 @@
<template>
<a-drawer :width="500" title="搜索" placement="right" :open="openSearchModel" @close="onClose">
<template #extra>
<a-button style="margin-right: 8px" @click="clearSearch">清空搜索</a-button>
<a-button type="primary" @click="getData">搜索</a-button>
</template>
<a-form :model="commomParams.search">
<a-row :gutter="[10]">
<a-col span="24">
<a-form-item label="选择时间">
<a-range-picker @Change="getRange" style="width: 100%;"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-drawer>
</template>

<script lang="ts" setup>
import { ref, onMounted, watch, computed } from 'vue';
import { useCommon } from '@/hooks/useCommon';
let { store, commomParams, openSearchModel, hideSearch, dayjs } = useCommon();
const dayjsRef = ref(dayjs);
let props = defineProps(['search_params']);
const emit = defineEmits();
openSearchModel = computed(() => {
return store.state.openSearchModel;
})
interface listType {
start_date: String,
end_date: String
}
commomParams.value.search = commomParams.value.search as listType;
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
commomParams.value.search.sort = 'work_experience';
watch(() => props.search_params, (newVal) => {
emit('searchData', commomParams.value.search)
}, {
immediate: true
})
const getData = () => {
commomParams.value.search.start_date = dayjsRef.value(val[0]).format('YYYY-MM-DD');
commomParams.value.search.end_date = dayjsRef.value(val[1]).format('YYYY-MM-DD');
emit('searchData', commomParams.value.search);
hideSearch()
}
// 清空搜索
const clearSearch = () => {
commomParams.value.search = {
page: 1,
pagesize: 10,
sort: 'work_experience',
sortby: 'desc',
keyword: ''
}
commomParams.value.search.start_date = '2020-01-01';
commomParams.value.search.end_date = dayjs().format('YYYY-MM-DD');
emit('clearData', commomParams.value.search);
hideSearch()
}
const onClose = () => {
clearSearch()
hideSearch()
}
</script>

<style>
</style>


Loading…
Cancel
Save