diff --git a/snowy-admin-web/src/api/biz/bizIndexApi.js b/snowy-admin-web/src/api/biz/bizIndexApi.js new file mode 100644 index 00000000..f1ded643 --- /dev/null +++ b/snowy-admin-web/src/api/biz/bizIndexApi.js @@ -0,0 +1,24 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/biz/index/` + url, ...arg) + +/** + * 业务主页Api接口管理器 + * + * @author yubaoshan + * @date 2024/07/11 14:46 + **/ +export default { + // 获取轮播图列表 + bizIndexSlideshowList(data) { + return request('slideshow/list', data, 'get') + }, + // 获取通知公告列表 + bizIndexNoticeList(data) { + return request('notice/list', data, 'get') + }, + // 获取通知公告详情 + bizIndexNoticeDetail(data) { + return request('notice/detail', data, 'get') + } +} diff --git a/snowy-admin-web/src/api/biz/bizNoticeApi.js b/snowy-admin-web/src/api/biz/bizNoticeApi.js new file mode 100644 index 00000000..c75200b8 --- /dev/null +++ b/snowy-admin-web/src/api/biz/bizNoticeApi.js @@ -0,0 +1,36 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/biz/notice/` + url, ...arg) + +/** + * 通知公告Api接口管理器 + * + * @author yubaoshan + * @date 2024/07/11 14:46 + **/ +export default { + // 获取通知公告分页 + bizNoticePage(data) { + return request('page', data, 'get') + }, + // 提交通知公告表单 edit为true时为编辑,默认为新增 + bizNoticeSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除通知公告 + bizNoticeDelete(data) { + return request('delete', data) + }, + // 获取通知公告详情 + bizNoticeDetail(data) { + return request('detail', data, 'get') + }, + // 禁用通知公告 + bizNoticeDisableStatus(data) { + return request('disableStatus', data) + }, + // 启用通知公告 + bizNoticeEnableStatus(data) { + return request('enableStatus', data) + } +} diff --git a/snowy-admin-web/src/api/dev/slideshowApi.js b/snowy-admin-web/src/api/dev/slideshowApi.js new file mode 100644 index 00000000..2f61c818 --- /dev/null +++ b/snowy-admin-web/src/api/dev/slideshowApi.js @@ -0,0 +1,32 @@ +import { baseRequest } from '@/utils/request' + +const request = (url, ...arg) => baseRequest(`/dev/slideshow/` + url, ...arg) + +/** + * 轮播图Api接口管理器 + * + * @author yubaoshan + * @date 2024/07/13 00:31 + **/ +export default { + // 获取轮播图分页 + devSlideshowPage(data) { + return request('page', data, 'get') + }, + // 提交轮播图表单 edit为true时为编辑,默认为新增 + devSlideshowSubmitForm(data, edit = false) { + return request(edit ? 'edit' : 'add', data) + }, + // 删除轮播图 + devSlideshowDelete(data) { + return request('delete', data) + }, + // 禁用轮播图 + devSlideshowDisableStatus(data) { + return request('disableStatus', data) + }, + // 启用轮播图 + devSlideshowEnableStatus(data) { + return request('enableStatus', data) + } +} diff --git a/snowy-admin-web/src/api/sys/indexApi.js b/snowy-admin-web/src/api/sys/indexApi.js index c4eceb31..2b746c7f 100644 --- a/snowy-admin-web/src/api/sys/indexApi.js +++ b/snowy-admin-web/src/api/sys/indexApi.js @@ -49,5 +49,17 @@ export default { // 获取当前用户操作日志列表 indexOpLogList(data) { return request('opLog/list', data, 'get') + }, + // 获取基础系统业务数据 + indexBizDataCount(data) { + return request('bizDataCount', data, 'get') + }, + // 获取运维一览数据 + indexOpDataCount(data) { + return request('opDataCount', data, 'get') + }, + // 获取基础工具数据 + indexToolDataCount(data) { + return request('toolDataCount', data, 'get') } } diff --git a/snowy-admin-web/src/views/index/components/miniMessage.vue b/snowy-admin-web/src/components/HomeCard/BizMiniMessageCard/index.vue similarity index 96% rename from snowy-admin-web/src/views/index/components/miniMessage.vue rename to snowy-admin-web/src/components/HomeCard/BizMiniMessageCard/index.vue index 735a806d..7301f306 100644 --- a/snowy-admin-web/src/views/index/components/miniMessage.vue +++ b/snowy-admin-web/src/components/HomeCard/BizMiniMessageCard/index.vue @@ -1,5 +1,5 @@ + + diff --git a/snowy-admin-web/src/components/HomeCard/SysBizDataCard/index.vue b/snowy-admin-web/src/components/HomeCard/SysBizDataCard/index.vue new file mode 100644 index 00000000..ae65873e --- /dev/null +++ b/snowy-admin-web/src/components/HomeCard/SysBizDataCard/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/snowy-admin-web/src/components/HomeCard/SysOpDataCard/index.vue b/snowy-admin-web/src/components/HomeCard/SysOpDataCard/index.vue new file mode 100644 index 00000000..8e2ba733 --- /dev/null +++ b/snowy-admin-web/src/components/HomeCard/SysOpDataCard/index.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/snowy-admin-web/src/views/index/components/opLog.vue b/snowy-admin-web/src/components/HomeCard/SysOpLogCard/index.vue similarity index 96% rename from snowy-admin-web/src/views/index/components/opLog.vue rename to snowy-admin-web/src/components/HomeCard/SysOpLogCard/index.vue index 6b43f36f..a2a41743 100644 --- a/snowy-admin-web/src/views/index/components/opLog.vue +++ b/snowy-admin-web/src/components/HomeCard/SysOpLogCard/index.vue @@ -20,14 +20,14 @@ const opLogList = ref([]) onMounted(() => { // 进来后执行查询 - seleOpLogList() + getOpLogList() }) // 是否展示更多按钮 const displayMore = () => { return userInfo.roleCodeList && userInfo.roleCodeList.toString().indexOf('superAdmin') !== -1 } - const seleOpLogList = () => { + const getOpLogList = () => { indexApi.indexOpLogList().then((data) => { opLogList.value = data }) diff --git a/snowy-admin-web/src/components/HomeCard/SysToolDataCard/index.vue b/snowy-admin-web/src/components/HomeCard/SysToolDataCard/index.vue new file mode 100644 index 00000000..205d105d --- /dev/null +++ b/snowy-admin-web/src/components/HomeCard/SysToolDataCard/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/snowy-admin-web/src/views/index/components/userInfo.vue b/snowy-admin-web/src/components/HomeCard/SysUserInfoCard/index.vue similarity index 86% rename from snowy-admin-web/src/views/index/components/userInfo.vue rename to snowy-admin-web/src/components/HomeCard/SysUserInfoCard/index.vue index 874835b0..cd01735b 100644 --- a/snowy-admin-web/src/views/index/components/userInfo.vue +++ b/snowy-admin-web/src/components/HomeCard/SysUserInfoCard/index.vue @@ -1,12 +1,8 @@