🐛 修复 operateLog 和 loginLog 在 IDEA 报错的问题

This commit is contained in:
YunaiV 2023-12-02 19:25:50 +08:00
parent 757fbddef2
commit 1066551fd1
7 changed files with 9 additions and 8 deletions

View File

@ -7,6 +7,7 @@ export interface LoginLogVO {
userId: number
userType: number
username: string
result: number
status: number
userIp: string
userAgent: string

View File

@ -62,7 +62,7 @@ export const defaultShortcuts = [
* @description format + + "YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ"
* @returns
*/
export function formatDate(date: dayjs.ConfigType, format?: string): string {
export function formatDate(date: Date, format?: string): string {
// 日期不存在,则返回空
if (!date) {
return ''

View File

@ -161,7 +161,7 @@ const queryParams = reactive({
name: '',
type: '',
status: undefined,
createTime: [undefined, undefined]
createTime: []
})
const queryFormRef = ref() //
const exportLoading = ref(false) //

View File

@ -14,7 +14,7 @@
<el-select v-model="queryParams.type" placeholder="请选择错误码类型" clearable>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_ERROR_CODE_TYPE)"
:key="dict.value"
:key="dict.value as number"
:label="dict.label"
:value="dict.value"
class="!w-240px"

View File

@ -34,7 +34,7 @@ defineOptions({ name: 'SystemLoginLogDetail' })
const dialogVisible = ref(false) //
const detailLoading = ref(false) //
const detailData = ref({}) //
const detailData = ref({} as LoginLogApi.LoginLogVO) //
/** 打开弹窗 */
const open = async (data: LoginLogApi.LoginLogVO) => {

View File

@ -65,7 +65,7 @@ defineOptions({ name: 'SystemOperateLogDetail' })
const dialogVisible = ref(false) //
const detailLoading = ref(false) //
const detailData = ref() //
const detailData = ref({} as OperateLogApi.OperateLogVO) //
/** 打开弹窗 */
const open = async (data: OperateLogApi.OperateLogVO) => {

View File

@ -37,7 +37,7 @@
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE)"
:key="dict.value"
:key="dict.value as number"
:label="dict.label"
:value="dict.value"
/>
@ -50,8 +50,8 @@
clearable
class="!w-240px"
>
<el-option :key="true" label="成功" :value="true" />
<el-option :key="false" label="失败" :value="false" />
<el-option key="true" label="成功" :value="true" />
<el-option key="false" label="失败" :value="false" />
</el-select>
</el-form-item>
<el-form-item label="操作时间" prop="startTime">