This commit is contained in:
qingyu 2025-07-02 10:02:52 +08:00
parent 79b340236d
commit f4c72e7859
3 changed files with 18 additions and 4 deletions

View File

@ -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_

View File

@ -35,6 +35,11 @@
<a-input v-model:value="formData.salary" :placeholder="'请输入薪资范畴'" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item :label="'福利'" >
<a-input v-model:value="formData.benefits" :placeholder="'请输入福利'" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item :label="'岗位排序'" name="sequence">
<a-input-number v-model:value="formData.sequence" :placeholder="'请输入排序'"
@ -115,6 +120,7 @@ formRules.value = {
introduce: { required: true, message: '请输入岗位要求' },
duty: [{ required: true, message: '请输入岗位职责' }],
salary: [{ required: true, message: '请输入薪资范畴' }],
benefits: [{ required: true, message: '请输入薪资范畴' }],
sequence: [{ required: true, message: '请输入岗位排序' }],
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
}
@ -198,9 +204,11 @@ function handleOk() {
const params = {
...values,
img: formData.value.img,
benefits: formData.value.benefits,
pushAt: dayjs().format('YYYY-MM-DD'),
type: 'news'
// type: 'news'
}
console.log(params.value)
let result = null
switch (modal.value.type) {
case 'create':

View File

@ -55,12 +55,16 @@
<div class="text-ellipsis">{{ record.introduce }}</div>
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'benefits'">
<a-tooltip :title="record.benefits">
<div class="text-ellipsis">{{ record.benefits }}</div>
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'duty'">
<a-tooltip :title="record.duty">
<div class="text-ellipsis">{{ record.duty }}</div>
</a-tooltip>
</template>
<template v-if="'status' === column.dataIndex">
<a-tag v-if="record.status === 'enabled'" :color="'green'">启用</a-tag>
<a-tag v-if="record.status === 'disabled'" :color="'red'">停用</a-tag>
@ -155,6 +159,7 @@ const columns = [
{ title: '岗位要求', dataIndex: 'introduce', key: 'introduce'},
{ title: '岗位职责', dataIndex: 'duty',ellipsis: true,},
{ title: '薪资范畴', dataIndex: 'salary', width: 120, align: 'center'},
{ title: '福利', dataIndex: 'benefits', width: 120, align: 'center'},
{ title: '岗位排序', dataIndex: 'sequence', width: 120, align: 'center'},
{ title: '状态', dataIndex: 'status',width:80 , align: 'center'},
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
@ -194,6 +199,7 @@ async function getPageList() {
hideLoading()
if (config('http.code.success') === success) {
listData.value = data
console.log(listData.value)
paginationState.total = total
}
} catch (error) {