修复字典键值为bool类型和字符串类型时,下拉列表逻辑Bug
parent
f67b0b2579
commit
689669a9e3
8
.env
8
.env
|
|
@ -2,19 +2,19 @@
|
||||||
VITE_PORT = 80
|
VITE_PORT = 80
|
||||||
|
|
||||||
# 网站标题
|
# 网站标题
|
||||||
VITE_GLOB_APP_TITLE = 招聘管理系统
|
VITE_GLOB_APP_TITLE = 芋道管理系统
|
||||||
|
|
||||||
# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符
|
# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符
|
||||||
VITE_GLOB_APP_SHORT_NAME = Yudao_Admin
|
VITE_GLOB_APP_SHORT_NAME = Yudao_Admin
|
||||||
|
|
||||||
# 租户开关
|
# 租户开关
|
||||||
VITE_GLOB_APP_TENANT_ENABLE = false
|
VITE_GLOB_APP_TENANT_ENABLE = true
|
||||||
|
|
||||||
# 验证码的开关
|
# 验证码的开关
|
||||||
VITE_GLOB_APP_CAPTCHA_ENABLE = false
|
VITE_GLOB_APP_CAPTCHA_ENABLE = true
|
||||||
|
|
||||||
# 文档地址的开关
|
# 文档地址的开关
|
||||||
VITE_APP_DOCALERT_ENABLE=false
|
VITE_APP_DOCALERT_ENABLE=true
|
||||||
|
|
||||||
# 百度统计
|
# 百度统计
|
||||||
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777
|
VITE_APP_BAIDU_CODE = eb21166668bf766b9d059a6fd1c10777
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@
|
||||||
"@/": "${workspaceRoot}/src"
|
"@/": "${workspaceRoot}/src"
|
||||||
},
|
},
|
||||||
"eslint.experimental.useFlatConfig": true,
|
"eslint.experimental.useFlatConfig": true,
|
||||||
"prettier.enable": true,
|
"prettier.enable": false,
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": false,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
"source.organizeImports": "never"
|
"source.organizeImports": "never"
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||||
},
|
},
|
||||||
"[typescriptreact]": {
|
"[typescriptreact]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
|
@ -116,11 +116,10 @@
|
||||||
},
|
},
|
||||||
"[vue]": {
|
"[vue]": {
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": "explicit",
|
"source.fixAll.eslint": true,
|
||||||
"source.organizeImports": "never",
|
"source.organizeImports": false,
|
||||||
"source.fixAll.stylelint": "explicit"
|
"source.fixAll.stylelint": true
|
||||||
},
|
}
|
||||||
"editor.defaultFormatter": "Vue.volar"
|
|
||||||
},
|
},
|
||||||
"i18n-ally.localesPaths": ["src/locales/lang"],
|
"i18n-ally.localesPaths": ["src/locales/lang"],
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"postcss-html": "^1.5.0",
|
"postcss-html": "^1.5.0",
|
||||||
"postcss-less": "^6.0.0",
|
"postcss-less": "^6.0.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.1.0",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"rollup": "^4.4.0",
|
"rollup": "^4.4.0",
|
||||||
"rollup-plugin-visualizer": "^5.9.2",
|
"rollup-plugin-visualizer": "^5.9.2",
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ devDependencies:
|
||||||
specifier: ^6.0.0
|
specifier: ^6.0.0
|
||||||
version: 6.0.0(postcss@8.4.44)
|
version: 6.0.0(postcss@8.4.44)
|
||||||
prettier:
|
prettier:
|
||||||
specifier: ^3.3.3
|
specifier: ^3.1.0
|
||||||
version: 3.3.3
|
version: 3.3.3
|
||||||
rimraf:
|
rimraf:
|
||||||
specifier: ^5.0.5
|
specifier: ^5.0.5
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
printWidth: 100, // 每行代码长度(默认80)
|
|
||||||
tabWidth: 2, // 每个tab相当于多少个空格(默认2)ab进行缩进(默认false)
|
|
||||||
useTabs: false, // 是否使用tab
|
|
||||||
semi: false, // 声明结尾使用分号(默认true)
|
|
||||||
vueIndentScriptAndStyle: false,
|
|
||||||
singleQuote: true, // 使用单引号(默认false)
|
|
||||||
quoteProps: 'as-needed',
|
|
||||||
bracketSpacing: true, // 对象字面量的大括号间使用空格(默认true)
|
|
||||||
trailingComma: 'none', // 多行使用拖尾逗号(默认none)
|
|
||||||
jsxSingleQuote: false,
|
|
||||||
// 箭头函数参数括号 默认avoid 可选 avoid| always
|
|
||||||
// avoid 能省略括号的时候就省略 例如x => x
|
|
||||||
// always 总是有括号
|
|
||||||
arrowParens: 'always',
|
|
||||||
insertPragma: false,
|
|
||||||
requirePragma: false,
|
|
||||||
proseWrap: 'never',
|
|
||||||
htmlWhitespaceSensitivity: 'strict',
|
|
||||||
endOfLine: 'auto',
|
|
||||||
rangeStart: 0
|
|
||||||
}
|
|
||||||
|
|
@ -17,7 +17,7 @@ const { themeConfig } = storeToRefs(appStore)
|
||||||
|
|
||||||
const componentSize = computed(() => appStore.getComponentSize)
|
const componentSize = computed(() => appStore.getComponentSize)
|
||||||
// Listening to page changes and dynamically changing site titles
|
// Listening to page changes and dynamically changing site titles
|
||||||
useTitle();
|
useTitle()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ export interface ApiErrorLogVO {
|
||||||
resultCode: number
|
resultCode: number
|
||||||
createTime: Date
|
createTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiErrorLogPageReqVO extends PageParam {
|
export interface ApiErrorLogPageReqVO extends PageParam {
|
||||||
userId?: number
|
userId?: number
|
||||||
userType?: number
|
userType?: number
|
||||||
|
|
@ -34,6 +35,7 @@ export interface ApiErrorLogPageReqVO extends PageParam {
|
||||||
exceptionTime?: Date[]
|
exceptionTime?: Date[]
|
||||||
processStatus: number
|
processStatus: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiErrorLogExportReqVO {
|
export interface ApiErrorLogExportReqVO {
|
||||||
userId?: number
|
userId?: number
|
||||||
userType?: number
|
userType?: number
|
||||||
|
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
import { defHttp } from '@/utils/http/axios'
|
|
||||||
|
|
||||||
// 查询求职者信息列表
|
|
||||||
export function getApplicantPage(params) {
|
|
||||||
return defHttp.get({ url: '/recruit/applicant/page', params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询求职者信息详情
|
|
||||||
export function getApplicant(id: number) {
|
|
||||||
return defHttp.get({ url: `/recruit/applicant/get?id=${id}` })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增求职者信息
|
|
||||||
export function createApplicant(data) {
|
|
||||||
return defHttp.post({ url: '/recruit/applicant/create', data })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改求职者信息
|
|
||||||
export function updateApplicant(data) {
|
|
||||||
return defHttp.put({ url: '/recruit/applicant/update', data })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除求职者信息
|
|
||||||
export function deleteApplicant(id: number) {
|
|
||||||
return defHttp.delete({ url: `/recruit/applicant/delete?id=${id}` })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导出求职者信息 Excel
|
|
||||||
export function exportApplicant(params) {
|
|
||||||
return defHttp.download({ url: '/recruit/applicant/export-excel', params }, '求职者信息.xls')
|
|
||||||
}
|
|
||||||
|
|
@ -54,9 +54,9 @@ function determineType(dictType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') {
|
export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') {
|
||||||
if(!valueType){
|
// if(!valueType){
|
||||||
valueType = determineType(dictType);
|
// valueType = determineType(dictType);
|
||||||
}
|
// }
|
||||||
const dictOption: DictDataType[] = []
|
const dictOption: DictDataType[] = []
|
||||||
const dictOptions: DictDataType[] = getDictDatas(dictType)
|
const dictOptions: DictDataType[] = getDictDatas(dictType)
|
||||||
if (dictOptions && dictOptions.length > 0) {
|
if (dictOptions && dictOptions.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -297,9 +297,8 @@ export class VAxios {
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
reject(err || new Error('request error!'))
|
reject(err || new Error('request error!'))
|
||||||
return
|
|
||||||
}
|
}
|
||||||
// return
|
return
|
||||||
}
|
}
|
||||||
resolve(res as unknown as Promise<T>)
|
resolve(res as unknown as Promise<T>)
|
||||||
// download file
|
// download file
|
||||||
|
|
|
||||||
|
|
@ -120,19 +120,33 @@ async function handleLogin(params) {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<LoginFormTitle v-show="getShow" class="enter-x" />
|
<LoginFormTitle v-show="getShow" class="enter-x" />
|
||||||
<Form v-show="getShow" ref="formRef" class="enter-x p-4" :model="formData" :rules="getFormRules"
|
<Form
|
||||||
@keypress.enter="handleLogin">
|
v-show="getShow" ref="formRef" class="enter-x p-4" :model="formData" :rules="getFormRules"
|
||||||
|
@keypress.enter="handleLogin"
|
||||||
|
>
|
||||||
<FormItem name="tenantName" class="enter-x">
|
<FormItem name="tenantName" class="enter-x">
|
||||||
<Input v-if="tenantEnable === 'true'" v-model:value="formData.tenantName" size="large"
|
<Input
|
||||||
:placeholder="t('sys.login.tenantName')" class="fix-auto-fill" />
|
v-if="tenantEnable === 'true'"
|
||||||
|
v-model:value="formData.tenantName"
|
||||||
|
size="large"
|
||||||
|
:placeholder="t('sys.login.tenantName')"
|
||||||
|
class="fix-auto-fill"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="username" class="enter-x">
|
<FormItem name="username" class="enter-x">
|
||||||
<Input v-model:value="formData.username" size="large" :placeholder="t('sys.login.userName')"
|
<Input
|
||||||
class="fix-auto-fill" />
|
v-model:value="formData.username" size="large" :placeholder="t('sys.login.userName')"
|
||||||
|
class="fix-auto-fill"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="password" class="enter-x">
|
<FormItem name="password" class="enter-x">
|
||||||
<InputPassword v-model:value="formData.password" size="large" visibility-toggle
|
<InputPassword
|
||||||
:placeholder="t('sys.login.password')" class="fix-auto-fill" />
|
v-model:value="formData.password"
|
||||||
|
size="large"
|
||||||
|
visibility-toggle
|
||||||
|
:placeholder="t('sys.login.password')"
|
||||||
|
class="fix-auto-fill"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<Row class="enter-x">
|
<Row class="enter-x">
|
||||||
|
|
@ -153,6 +167,7 @@ async function handleLogin(params) {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<FormItem class="enter-x">
|
<FormItem class="enter-x">
|
||||||
<a-button type="primary" size="large" block :loading="loading" @click="getCode">
|
<a-button type="primary" size="large" block :loading="loading" @click="getCode">
|
||||||
{{ t('sys.login.loginButton') }}
|
{{ t('sys.login.loginButton') }}
|
||||||
|
|
@ -161,7 +176,6 @@ async function handleLogin(params) {
|
||||||
{{ t('sys.login.registerButton') }}
|
{{ t('sys.login.registerButton') }}
|
||||||
</a-button> -->
|
</a-button> -->
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<div v-if="false">
|
|
||||||
<Row class="enter-x" :gutter="[16, 16]">
|
<Row class="enter-x" :gutter="[16, 16]">
|
||||||
<Col :md="8" :xs="24">
|
<Col :md="8" :xs="24">
|
||||||
<a-button block @click="setLoginState(LoginStateEnum.MOBILE)">
|
<a-button block @click="setLoginState(LoginStateEnum.MOBILE)">
|
||||||
|
|
@ -210,11 +224,6 @@ async function handleLogin(params) {
|
||||||
🤝外包咨询
|
🤝外包咨询
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</Form>
|
</Form>
|
||||||
<Verify ref="verify" mode="pop" :captcha-type="captchaType" :img-size="{ width: '360px', height: '180px' }"
|
<Verify ref="verify" mode="pop" :captcha-type="captchaType" :img-size="{ width: '360px', height: '180px' }" @success="handleLogin" />
|
||||||
@success="handleLogin" />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref, unref } from 'vue'
|
|
||||||
import { createFormSchema, updateFormSchema } from './applicant.data'
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
|
||||||
import { BasicForm, useForm } from '@/components/Form'
|
|
||||||
import { BasicModal, useModalInner } from '@/components/Modal'
|
|
||||||
import { createApplicant, getApplicant, updateApplicant } from '@/api/recruit/applicant'
|
|
||||||
|
|
||||||
defineOptions({ name: 'ApplicantModal' })
|
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'register'])
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
|
||||||
const { createMessage } = useMessage()
|
|
||||||
const isUpdate = ref(true)
|
|
||||||
|
|
||||||
const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({
|
|
||||||
labelWidth: 120,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
schemas: createFormSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
actionColOptions: { span: 23 },
|
|
||||||
})
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
resetFields()
|
|
||||||
setModalProps({ confirmLoading: false })
|
|
||||||
isUpdate.value = !!data?.isUpdate
|
|
||||||
if (unref(isUpdate)) {
|
|
||||||
resetSchema(updateFormSchema)
|
|
||||||
const res = await getApplicant(data.record.id)
|
|
||||||
setFieldsValue({ ...res })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
async function handleSubmit() {
|
|
||||||
try {
|
|
||||||
const values = await validate()
|
|
||||||
setModalProps({ confirmLoading: true })
|
|
||||||
if (unref(isUpdate))
|
|
||||||
await updateApplicant(values)
|
|
||||||
else
|
|
||||||
await createApplicant(values)
|
|
||||||
|
|
||||||
closeModal()
|
|
||||||
emit('success')
|
|
||||||
createMessage.success(t('common.saveSuccessText'))
|
|
||||||
} finally {
|
|
||||||
setModalProps({ confirmLoading: false })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<BasicModal v-bind="$attrs" :title="isUpdate ? t('action.edit') : t('action.create')" @register="registerModal" @ok="handleSubmit">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
<script lang="ts" setup>
|
|
||||||
import ApplicantModal from './ApplicantModal.vue'
|
|
||||||
import { columns, searchFormSchema } from './applicant.data'
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
|
||||||
import { useModal } from '@/components/Modal'
|
|
||||||
import { IconEnum } from '@/enums/appEnum'
|
|
||||||
import { BasicTable, TableAction, useTable } from '@/components/Table'
|
|
||||||
import { deleteApplicant, exportApplicant, getApplicantPage } from '@/api/recruit/applicant'
|
|
||||||
|
|
||||||
defineOptions({ name: 'Applicant' })
|
|
||||||
|
|
||||||
const { t } = useI18n()
|
|
||||||
const { createConfirm, createMessage } = useMessage()
|
|
||||||
const [registerModal, { openModal }] = useModal()
|
|
||||||
|
|
||||||
const [registerTable, { getForm, reload }] = useTable({
|
|
||||||
title: '求职者信息列表',
|
|
||||||
api: getApplicantPage,
|
|
||||||
columns,
|
|
||||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
|
||||||
useSearchForm: true,
|
|
||||||
showTableSetting: true,
|
|
||||||
actionColumn: {
|
|
||||||
width: 140,
|
|
||||||
title: t('common.action'),
|
|
||||||
dataIndex: 'action',
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
function handleCreate() {
|
|
||||||
openModal(true, { isUpdate: false })
|
|
||||||
}
|
|
||||||
|
|
||||||
// function handleEdit(record: Recordable) {
|
|
||||||
// openModal(true, { record, isUpdate: true })
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function handleExport() {
|
|
||||||
createConfirm({
|
|
||||||
title: t('common.exportTitle'),
|
|
||||||
iconType: 'warning',
|
|
||||||
content: t('common.exportMessage'),
|
|
||||||
async onOk() {
|
|
||||||
await exportApplicant(getForm().getFieldsValue())
|
|
||||||
createMessage.success(t('common.exportSuccessText'))
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleDelete(record: Recordable) {
|
|
||||||
await deleteApplicant(record.id)
|
|
||||||
createMessage.success(t('common.delSuccessText'))
|
|
||||||
reload()
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!-- 表格 -->
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #toolbar>
|
|
||||||
<a-button type="primary" v-auth="['recruit:applicant:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
|
||||||
{{ t('action.create') }}
|
|
||||||
</a-button>
|
|
||||||
<a-button v-auth="['recruit:applicant:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
|
||||||
{{ t('action.export') }}
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.key === 'action'">
|
|
||||||
<TableAction :actions="[
|
|
||||||
// { icon: IconEnum.EDIT, label: t('action.edit'), auth: 'recruit:applicant:update', onClick: handleEdit.bind(null, record) },
|
|
||||||
{
|
|
||||||
icon: IconEnum.DELETE,
|
|
||||||
danger: true,
|
|
||||||
label: t('action.delete'),
|
|
||||||
auth: 'recruit:applicant:delete',
|
|
||||||
popConfirm: {
|
|
||||||
title: t('common.delMessage'),
|
|
||||||
placement: 'left',
|
|
||||||
confirm: handleDelete.bind(null, record),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<ApplicantModal @register="registerModal" @success="reload()" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
Loading…
Reference in New Issue