🐛 修复 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 userId: number
userType: number userType: number
username: string username: string
result: number
status: number status: number
userIp: string userIp: string
userAgent: string userAgent: string

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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