<link rel="icon" type="image/svg+xml" href="/logo_1.jpg" /> | <link rel="icon" type="image/svg+xml" href="/logo_1.jpg" /> | ||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||||
<title>菊城人才市场后台管理</title> | <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"> | <link rel="stylesheet" crossorigin href="/assets/index-T0OdbSEw.css"> | ||||
</head> | </head> | ||||
<body> | <body> |
</template> | </template> | ||||
<script lang="ts" setup> | <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 DepartmentSearch from '@/views/company/department/search/index.vue'; | ||||
import DepartmentAdd from '@/views/company/department/add/add.vue'; | import DepartmentAdd from '@/views/company/department/add/add.vue'; | ||||
import { GetCompanyDepartmentList } from '@/apis/models'; | import { GetCompanyDepartmentList } from '@/apis/models'; | ||||
let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | ||||
let loading = ref<Boolean>(true); | let loading = ref<Boolean>(true); | ||||
onMounted(() => { | onMounted(() => { | ||||
if(sessionStorage.getItem('company_id')) { | |||||
commomParams.value.search.company_id = sessionStorage.getItem('company_id') | |||||
} | |||||
getData(commomParams.value.search); | getData(commomParams.value.search); | ||||
}) | }) | ||||
onBeforeUnmount(() => { | |||||
sessionStorage.removeItem('company_id') | |||||
}) | |||||
const searchData = (data : object) => { | const searchData = (data : object) => { | ||||
commomParams.value.search = data | commomParams.value.search = data | ||||
// getData(); | // getData(); | ||||
// }) | // }) | ||||
// } | // } | ||||
</script> | </script> | ||||
<style lang="less" scoped> | <style lang="less" scoped> |
let props = defineProps(['search_params']); | let props = defineProps(['search_params']); | ||||
const emit = defineEmits(); | const emit = defineEmits(); | ||||
onMounted(() => { | |||||
companySearch() | |||||
}) | |||||
openSearchModel = computed(() => { | openSearchModel = computed(() => { | ||||
companySearch() | |||||
return store.state.openSearchModel; | return store.state.openSearchModel; | ||||
}) | }) | ||||
import { getCompanyList } from '@/apis/models'; | import { getCompanyList } from '@/apis/models'; | ||||
import { useCommon } from '@/hooks/useCommon'; | import { useCommon } from '@/hooks/useCommon'; | ||||
import { cols } from '@/views/company/list/columns'; | import { cols } from '@/views/company/list/columns'; | ||||
import { router } from '@/router'; | |||||
let { store, commomParams, showModal, showOtherModal1, imageprefix, message } = useCommon(); | let { store, commomParams, showModal, showOtherModal1, imageprefix, message } = useCommon(); | ||||
let loading = ref<Boolean>(true); | let loading = ref<Boolean>(true); | ||||
onMounted(() => { | onMounted(() => { | ||||
// 查看部门 | // 查看部门 | ||||
let department_record = ref<Object>(null) | let department_record = ref<Object>(null) | ||||
const showDepartment = (record : object) => { | 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) | let position_record = ref<Object>(null) | ||||
const showPosition = (record : object) => { | 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 | |||||
// }) | |||||
} | } | ||||
// 删除 | // 删除 |
</template> | </template> | ||||
<script lang="ts" setup> | <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 PositionSearch from '@/views/company/position/search/index.vue'; | ||||
import PositionAdd from '@/views/company/position/add/add.vue'; | import PositionAdd from '@/views/company/position/add/add.vue'; | ||||
import { GetCompanyJobList } from '@/apis/models'; | import { GetCompanyJobList } from '@/apis/models'; | ||||
let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | let { store, commomParams, showModal, showOtherModal1 } = useCommon(); | ||||
let loading = ref<Boolean>(true); | let loading = ref<Boolean>(true); | ||||
onMounted(() => { | onMounted(() => { | ||||
if(sessionStorage.getItem('company_id')) { | |||||
commomParams.value.search.company_id = sessionStorage.getItem('company_id') | |||||
} | |||||
getData(commomParams.value.search); | getData(commomParams.value.search); | ||||
}) | }) | ||||
onBeforeUnmount(() => { | |||||
sessionStorage.removeItem('company_id') | |||||
}) | |||||
const searchData = (data : object) => { | const searchData = (data : object) => { | ||||
commomParams.value.search = data | commomParams.value.search = data |
</a-select> | </a-select> | ||||
</a-form-item> | </a-form-item> | ||||
</a-col> | </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-row> | ||||
</a-form> | </a-form> | ||||
</a-drawer> | </a-drawer> | ||||
<script lang="ts" setup> | <script lang="ts" setup> | ||||
import { ref, onMounted, watch, computed } from 'vue'; | import { ref, onMounted, watch, computed } from 'vue'; | ||||
import { useCommon } from '@/hooks/useCommon'; | import { useCommon } from '@/hooks/useCommon'; | ||||
import { getCompanyList } from '@/apis/models'; | |||||
let { store, commomParams, openSearchModel, hideSearch } = useCommon(); | let { store, commomParams, openSearchModel, hideSearch } = useCommon(); | ||||
let props = defineProps(['search_params']); | let props = defineProps(['search_params']); | ||||
const emit = defineEmits(); | const emit = defineEmits(); | ||||
openSearchModel = computed(() => { | openSearchModel = computed(() => { | ||||
companySearch() | |||||
return store.state.openSearchModel; | return store.state.openSearchModel; | ||||
}) | }) | ||||
interface listType { | interface listType { | ||||
expired : Number | 0, | expired : Number | 0, | ||||
status : Number | 0 | |||||
status : Number | 0, | |||||
company_id : Number | 0, | |||||
} | } | ||||
commomParams.value.search = commomParams.value.search as listType; | commomParams.value.search = commomParams.value.search as listType; | ||||
commomParams.value.search.expired = null; | commomParams.value.search.expired = null; | ||||
commomParams.value.search.status = null; | commomParams.value.search.status = null; | ||||
commomParams.value.search.company_id = null; | |||||
// watch(() => props.search_params, (newVal) => { | // watch(() => props.search_params, (newVal) => { | ||||
// emit('searchData', commomParams.value.search) | // emit('searchData', commomParams.value.search) | ||||
const statusChange = (val) => { | const statusChange = (val) => { | ||||
getData() | 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> | </script> | ||||
<style> | <style> |