mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 02:25:06 +08:00
refactor: vue3 axios api ...
This commit is contained in:
@ -10,7 +10,7 @@ import * as ApiAccessLogApi from '@/api/infra/apiAccessLog'
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<ApiAccessLogVO>, ApiAccessLogVO>({
|
||||
const { register, tableObject, methods } = useTable<ApiAccessLogVO>({
|
||||
getListApi: ApiAccessLogApi.getApiAccessLogPageApi
|
||||
})
|
||||
const { getList, setSearchParams } = methods
|
||||
|
@ -12,7 +12,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<ApiErrorLogVO>, ApiErrorLogVO>({
|
||||
const { register, tableObject, methods } = useTable<ApiErrorLogVO>({
|
||||
getListApi: ApiErrorLogApi.getApiErrorLogPageApi,
|
||||
exportListApi: ApiErrorLogApi.exportApiErrorLogApi
|
||||
})
|
||||
|
@ -14,7 +14,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
const { t } = useI18n() // 国际化
|
||||
const { push } = useRouter()
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<CodegenTableVO>, CodegenTableVO>({
|
||||
const { register, tableObject, methods } = useTable<CodegenTableVO>({
|
||||
getListApi: CodegenApi.getCodegenTablePageApi,
|
||||
delListApi: CodegenApi.deleteCodegenTableApi
|
||||
})
|
||||
@ -71,7 +71,7 @@ getList()
|
||||
<!-- 操作工具栏 -->
|
||||
<div class="mb-10px">
|
||||
<el-button type="primary" v-hasPermi="['infra:codegen:create']" @click="openImportTable">
|
||||
<Icon icon="el:zoom-in" class="mr-5px" /> {{ t('action.import') }}
|
||||
<Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.import') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
|
@ -12,7 +12,7 @@ import * as ConfigApi from '@/api/infra/config'
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<ConfigVO>, ConfigVO>({
|
||||
const { register, tableObject, methods } = useTable<ConfigVO>({
|
||||
getListApi: ConfigApi.getConfigPageApi,
|
||||
delListApi: ConfigApi.deleteConfigApi,
|
||||
exportListApi: ConfigApi.exportConfigApi
|
||||
@ -102,7 +102,7 @@ getList()
|
||||
<!-- 操作工具栏 -->
|
||||
<div class="mb-10px">
|
||||
<el-button type="primary" v-hasPermi="['infra:config:create']" @click="handleCreate">
|
||||
<Icon icon="el:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
<Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
|
@ -92,7 +92,7 @@ onMounted(async () => {
|
||||
type="primary"
|
||||
@click="handleCreate"
|
||||
>
|
||||
<Icon icon="el:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
<Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<Table :columns="allSchemas.tableColumns" :data="tableData">
|
||||
|
@ -12,7 +12,7 @@ const { wsCache } = useCache()
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<FileVO>, FileVO>({
|
||||
const { register, tableObject, methods } = useTable<FileVO>({
|
||||
getListApi: FileApi.getFilePageApi,
|
||||
delListApi: FileApi.deleteFileApi
|
||||
})
|
||||
|
@ -12,7 +12,7 @@ import * as FileConfigApi from '@/api/infra/fileConfig'
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<FileConfigVO>, FileConfigVO>({
|
||||
const { register, tableObject, methods } = useTable<FileConfigVO>({
|
||||
getListApi: FileConfigApi.getFileConfigPageApi,
|
||||
delListApi: FileConfigApi.deleteFileConfigApi
|
||||
})
|
||||
@ -110,7 +110,7 @@ getList()
|
||||
<!-- 操作工具栏 -->
|
||||
<div class="mb-10px">
|
||||
<el-button type="primary" v-hasPermi="['infra:file-config:create']" @click="handleCreate">
|
||||
<Icon icon="el:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
<Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
|
@ -13,14 +13,14 @@ import { allSchemas } from './jobLog.data'
|
||||
const { t } = useI18n() // 国际化
|
||||
const { query } = useRoute()
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<JobLogVO>, JobLogVO>({
|
||||
const { register, tableObject, methods } = useTable<JobLogVO>({
|
||||
getListApi: JobLogApi.getJobLogPageApi,
|
||||
exportListApi: JobLogApi.exportJobLogApi
|
||||
})
|
||||
const { getList, setSearchParams, exportList } = methods
|
||||
const getTableList = async () => {
|
||||
const id = (query.id as unknown as number) && (query.jobId as unknown as number)
|
||||
tableObject.paramsObj.params = {
|
||||
tableObject.params = {
|
||||
jobId: id
|
||||
}
|
||||
await getList()
|
||||
|
@ -14,7 +14,7 @@ import { useRouter } from 'vue-router'
|
||||
const { t } = useI18n() // 国际化
|
||||
const { push } = useRouter()
|
||||
// ========== 列表相关 ==========
|
||||
const { register, tableObject, methods } = useTable<PageResult<JobVO>, JobVO>({
|
||||
const { register, tableObject, methods } = useTable<JobVO>({
|
||||
getListApi: JobApi.getJobPageApi,
|
||||
delListApi: JobApi.deleteJobApi,
|
||||
exportListApi: JobApi.exportJobApi
|
||||
@ -126,7 +126,7 @@ getList()
|
||||
<!-- 操作工具栏 -->
|
||||
<div class="mb-10px">
|
||||
<el-button type="primary" v-hasPermi="['infra:job:create']" @click="handleCreate">
|
||||
<Icon icon="el:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
<Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
@ -137,7 +137,7 @@ getList()
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
|
||||
</el-button>
|
||||
<el-button type="info" v-hasPermi="['infra:job:query']" @click="handleJobLog">
|
||||
<Icon icon="el:zoom-in" class="mr-5px" /> 执行日志
|
||||
<Icon icon="ep:zoom-in" class="mr-5px" /> 执行日志
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
|
@ -20,10 +20,10 @@ const keyListLoad = ref(true)
|
||||
const keyList = ref<RedisKeyInfo[]>([])
|
||||
// 基本信息
|
||||
const readRedisInfo = async () => {
|
||||
const data = await RedisApi.redisMonitorInfo()
|
||||
const data = await RedisApi.getCacheApi()
|
||||
cache.value = data
|
||||
loadEchartOptions(cache.value.commandStats)
|
||||
const redisKeysInfo = await RedisApi.redisKeysInfo()
|
||||
loadEchartOptions(data.commandStats)
|
||||
const redisKeysInfo = await RedisApi.getKeyDefineListApi()
|
||||
keyList.value = redisKeysInfo
|
||||
keyListLoad.value = false //加载完成
|
||||
}
|
||||
|
Reference in New Issue
Block a user