diff --git a/src/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/views/system/log/list.log.vue b/src/views/system/log/list.log.vue index 4d40eef..a060881 100644 --- a/src/views/system/log/list.log.vue +++ b/src/views/system/log/list.log.vue @@ -63,7 +63,7 @@ fetchData(true) // 打开详情对话框 -const detail = (row) => { +const detail = (row: any) => { getBizLogDetail(row.id).then((res) => { if (res.code === 200) { ElMessageBox.alert(res.data, '详情', { @@ -80,7 +80,7 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - delLog(this.query).then((response) => { + delLog().then((response) => { if (response.code === 200) { ElMessage({ message: '删除成功', @@ -101,13 +101,13 @@ // 获取日志类型 const fetchLogType = () => { - getLogType(listQuery).then((response) => { + getLogType().then((response) => { logTypeList.value = response.data }) } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 -const changePage = (val) => { +const changePage = (val: any) => { if (val && val.size) { listQuery.limit = val.size } diff --git a/src/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/views/system/log/list.log.vue b/src/views/system/log/list.log.vue index 4d40eef..a060881 100644 --- a/src/views/system/log/list.log.vue +++ b/src/views/system/log/list.log.vue @@ -63,7 +63,7 @@ fetchData(true) // 打开详情对话框 -const detail = (row) => { +const detail = (row: any) => { getBizLogDetail(row.id).then((res) => { if (res.code === 200) { ElMessageBox.alert(res.data, '详情', { @@ -80,7 +80,7 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - delLog(this.query).then((response) => { + delLog().then((response) => { if (response.code === 200) { ElMessage({ message: '删除成功', @@ -101,13 +101,13 @@ // 获取日志类型 const fetchLogType = () => { - getLogType(listQuery).then((response) => { + getLogType().then((response) => { logTypeList.value = response.data }) } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 -const changePage = (val) => { +const changePage = (val: any) => { if (val && val.size) { listQuery.limit = val.size } diff --git a/src/views/system/log/listErrorLog.vue b/src/views/system/log/listErrorLog.vue index afd1ee7..f32659a 100644 --- a/src/views/system/log/listErrorLog.vue +++ b/src/views/system/log/listErrorLog.vue @@ -44,7 +44,7 @@ fetchData(true) // 打开详情对话框 -const detail = (row) => { +const detail = (row: any) => { getErrorLogDetail(row.id).then((res) => { if (res.code === 200) { ElMessageBox.alert(res.data, '详情', { @@ -61,7 +61,7 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - delErrorLog(listQuery).then((response) => { + delErrorLog().then((response) => { if (response.code === 200) { ElMessage({ message: '删除成功', @@ -79,7 +79,7 @@ } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 -const changePage = (val) => { +const changePage = (val: any) => { if (val && val.size) { listQuery.limit = val.size } diff --git a/src/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/views/system/log/list.log.vue b/src/views/system/log/list.log.vue index 4d40eef..a060881 100644 --- a/src/views/system/log/list.log.vue +++ b/src/views/system/log/list.log.vue @@ -63,7 +63,7 @@ fetchData(true) // 打开详情对话框 -const detail = (row) => { +const detail = (row: any) => { getBizLogDetail(row.id).then((res) => { if (res.code === 200) { ElMessageBox.alert(res.data, '详情', { @@ -80,7 +80,7 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - delLog(this.query).then((response) => { + delLog().then((response) => { if (response.code === 200) { ElMessage({ message: '删除成功', @@ -101,13 +101,13 @@ // 获取日志类型 const fetchLogType = () => { - getLogType(listQuery).then((response) => { + getLogType().then((response) => { logTypeList.value = response.data }) } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 -const changePage = (val) => { +const changePage = (val: any) => { if (val && val.size) { listQuery.limit = val.size } diff --git a/src/views/system/log/listErrorLog.vue b/src/views/system/log/listErrorLog.vue index afd1ee7..f32659a 100644 --- a/src/views/system/log/listErrorLog.vue +++ b/src/views/system/log/listErrorLog.vue @@ -44,7 +44,7 @@ fetchData(true) // 打开详情对话框 -const detail = (row) => { +const detail = (row: any) => { getErrorLogDetail(row.id).then((res) => { if (res.code === 200) { ElMessageBox.alert(res.data, '详情', { @@ -61,7 +61,7 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - delErrorLog(listQuery).then((response) => { + delErrorLog().then((response) => { if (response.code === 200) { ElMessage({ message: '删除成功', @@ -79,7 +79,7 @@ } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 -const changePage = (val) => { +const changePage = (val: any) => { if (val && val.size) { listQuery.limit = val.size } diff --git a/src/views/system/log/loginLog.vue b/src/views/system/log/loginLog.vue index 0f40674..904f51c 100644 --- a/src/views/system/log/loginLog.vue +++ b/src/views/system/log/loginLog.vue @@ -62,7 +62,7 @@ fetchData(true) // 打开详情对话框 -const detail = (row) => { +const detail = (row: any) => { ElMessageBox.alert(row.message, '详情', { confirmButtonText: '确定', }) @@ -75,7 +75,7 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - delLoginLog(this.query).then((response) => { + delLoginLog().then((response) => { if (response.code === 200) { ElMessage({ message: '删除成功', @@ -95,7 +95,7 @@ } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 -const changePage = (val) => { +const changePage = (val: any) => { if (val && val.size) { listQuery.limit = val.size }