| @@ -5,7 +5,7 @@ | |||
| <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-CXI1x4Wq.js"></script> | |||
| <script type="module" crossorigin src="/assets/index-e7zg8XfO.js"></script> | |||
| <link rel="stylesheet" crossorigin href="/assets/index-T0OdbSEw.css"> | |||
| </head> | |||
| <body> | |||
| @@ -14,7 +14,7 @@ | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { ref, onMounted, watch, computed, onBeforeUnmount } from 'vue'; | |||
| import DepartmentSearch from '@/views/company/department/search/index.vue'; | |||
| import DepartmentAdd from '@/views/company/department/add/add.vue'; | |||
| import { GetCompanyDepartmentList } from '@/apis/models'; | |||
| @@ -24,8 +24,15 @@ | |||
| let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| if(sessionStorage.getItem('company_id')) { | |||
| commomParams.value.search.company_id = sessionStorage.getItem('company_id') | |||
| } | |||
| getData(commomParams.value.search); | |||
| }) | |||
| onBeforeUnmount(() => { | |||
| sessionStorage.removeItem('company_id') | |||
| }) | |||
| const searchData = (data : object) => { | |||
| commomParams.value.search = data | |||
| @@ -96,6 +103,7 @@ | |||
| // getData(); | |||
| // }) | |||
| // } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| @@ -32,11 +32,10 @@ | |||
| let props = defineProps(['search_params']); | |||
| const emit = defineEmits(); | |||
| onMounted(() => { | |||
| companySearch() | |||
| }) | |||
| openSearchModel = computed(() => { | |||
| companySearch() | |||
| return store.state.openSearchModel; | |||
| }) | |||
| @@ -33,6 +33,7 @@ | |||
| import { getCompanyList } from '@/apis/models'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { cols } from '@/views/company/list/columns'; | |||
| import { router } from '@/router'; | |||
| let { store, commomParams, showModal, showOtherModal1, imageprefix, message } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| @@ -102,19 +103,27 @@ | |||
| // 查看部门 | |||
| let department_record = ref<Object>(null) | |||
| const showDepartment = (record : object) => { | |||
| department_record.value = record; | |||
| store.commit('getShowDepartmentModel', { | |||
| showDepartmentModel: true | |||
| sessionStorage.setItem('company_id', record.id) | |||
| router.push({ | |||
| path: '/department', | |||
| }) | |||
| // department_record.value = record; | |||
| // store.commit('getShowDepartmentModel', { | |||
| // showDepartmentModel: true | |||
| // }) | |||
| } | |||
| // 查看职位 | |||
| let position_record = ref<Object>(null) | |||
| const showPosition = (record : object) => { | |||
| position_record.value = record; | |||
| store.commit('getShowPositionModel', { | |||
| showPositionModel: true | |||
| sessionStorage.setItem('company_id', record.id) | |||
| router.push({ | |||
| path: '/job', | |||
| }) | |||
| // position_record.value = record; | |||
| // store.commit('getShowPositionModel', { | |||
| // showPositionModel: true | |||
| // }) | |||
| } | |||
| // 删除 | |||
| @@ -17,7 +17,7 @@ | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { ref, onMounted, watch, computed, onBeforeUnmount } from 'vue'; | |||
| import PositionSearch from '@/views/company/position/search/index.vue'; | |||
| import PositionAdd from '@/views/company/position/add/add.vue'; | |||
| import { GetCompanyJobList } from '@/apis/models'; | |||
| @@ -27,8 +27,15 @@ | |||
| let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | |||
| let loading = ref<Boolean>(true); | |||
| onMounted(() => { | |||
| if(sessionStorage.getItem('company_id')) { | |||
| commomParams.value.search.company_id = sessionStorage.getItem('company_id') | |||
| } | |||
| getData(commomParams.value.search); | |||
| }) | |||
| onBeforeUnmount(() => { | |||
| sessionStorage.removeItem('company_id') | |||
| }) | |||
| const searchData = (data : object) => { | |||
| commomParams.value.search = data | |||
| @@ -30,6 +30,13 @@ | |||
| </a-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| <a-col span="24"> | |||
| <a-form-item> | |||
| <search-select placeholder="请搜索选择企业" :list="company_list" | |||
| :select_value="commomParams.search.company_id" @searchData="companySearch" | |||
| @getSelectValue="getCompanyValue"></search-select> | |||
| </a-form-item> | |||
| </a-col> | |||
| </a-row> | |||
| </a-form> | |||
| </a-drawer> | |||
| @@ -38,23 +45,29 @@ | |||
| <script lang="ts" setup> | |||
| import { ref, onMounted, watch, computed } from 'vue'; | |||
| import { useCommon } from '@/hooks/useCommon'; | |||
| import { getCompanyList } from '@/apis/models'; | |||
| let { store, commomParams, openSearchModel, hideSearch } = useCommon(); | |||
| let props = defineProps(['search_params']); | |||
| const emit = defineEmits(); | |||
| openSearchModel = computed(() => { | |||
| companySearch() | |||
| return store.state.openSearchModel; | |||
| }) | |||
| interface listType { | |||
| expired : Number | 0, | |||
| status : Number | 0 | |||
| status : Number | 0, | |||
| company_id : Number | 0, | |||
| } | |||
| commomParams.value.search = commomParams.value.search as listType; | |||
| commomParams.value.search.expired = null; | |||
| commomParams.value.search.status = null; | |||
| commomParams.value.search.company_id = null; | |||
| // watch(() => props.search_params, (newVal) => { | |||
| // emit('searchData', commomParams.value.search) | |||
| @@ -90,6 +103,22 @@ | |||
| const statusChange = (val) => { | |||
| getData() | |||
| } | |||
| // 选择企业 | |||
| let company_list = ref<Object[]>([]) | |||
| const companySearch = (val : Object) => { | |||
| getCompanyList(val).then((res : object) => { | |||
| const data = res.data.list.map((item : object) => ({ | |||
| label: item.full_name, | |||
| value: item.id, | |||
| })); | |||
| company_list.value = data; | |||
| }) | |||
| } | |||
| const getCompanyValue = (val : Object) => { | |||
| commomParams.value.search.company_id = val.key; | |||
| getData() | |||
| } | |||
| </script> | |||
| <style> | |||