diff --git a/.env.dev b/.env.dev index bcb46e7..bb781b0 100644 --- a/.env.dev +++ b/.env.dev @@ -12,8 +12,8 @@ VITE_ROUTER_BASE=/ VITE_ROUTER_HISTORY=hash # api -#VITE_API_BASIC=https://api.hailin-keji.com -VITE_API_BASIC=http://10.10.1.6:8060 +VITE_API_BASIC=https://api.hailin-keji.com +#VITE_API_BASIC=http://10.10.1.6:8060 VITE_API_HTTP=/api/v1/ # storage VITE_STORAGE_NAMESPACE = gin-admin_local_ diff --git a/src/views/recruitment/index.vue b/src/views/recruitment/index.vue index fd604ac..3f0c74c 100644 --- a/src/views/recruitment/index.vue +++ b/src/views/recruitment/index.vue @@ -110,7 +110,13 @@ const columns = [ { title: '状态', dataIndex: 'status',width:80 , align: 'center'}, { title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' }, ] - +const areaList = ref([]); // 列表数据 +const editDialogVisible = ref(false); // 弹框开关 +const editForm = reactive({ + name: '', + sequence: 0, + status: 'disabled', +}); const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination() @@ -205,9 +211,32 @@ async function onOk() { /** * 编辑基地 */ -function handleCreateJD() { - console.log('createJD') +async function handleCreateJD() { + console.log('createJD'); + try { + showLoading(); + const { pageSize, current } = paginationState; + const { success, data, total } = await apis.recruitment + .getAreasList({ + pageSize, + current: current, + ...searchFormData.value, + }) + .catch(() => { + throw new Error(); + }); + hideLoading(); + if (config('http.code.success') === success) { + areaList.value = data; + console.log(areaList.value); + paginationState.total = total; + } + } catch (error) { + hideLoading(); + console.error('Error in handleCreateJD:', error); + } } +