diff --git a/src/api/home/homeimg/index.ts b/src/api/home/homeimg/index.ts new file mode 100644 index 0000000..cde3c58 --- /dev/null +++ b/src/api/home/homeimg/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +// 公告管理 VO +export interface imgVO { + imgId: number // 公告id + imgName: string // 公告名称 + imgCreatetime: Date // 发布时间 + imgImg: string // 轮换图片 + imgContent: string // 发布内容 + contentType: number // 公告分类 + imgStatus: number // 公告图片状态 + contentStatus: number // 公告状态 +} + +// 公告管理 API +export const imgApi = { + // 查询公告管理分页 + getimgPage: async (params: any) => { + return await request.get({ url: `/home/img/page`, params }) + }, + + // 查询公告管理详情 + getimg: async (id: number) => { + return await request.get({ url: `/home/img/get?id=` + id }) + }, + + // 新增公告管理 + createimg: async (data: imgVO) => { + return await request.post({ url: `/home/img/create`, data }) + }, + + // 修改公告管理 + updateimg: async (data: imgVO) => { + return await request.put({ url: `/home/img/update`, data }) + }, + + // 删除公告管理 + deleteimg: async (id: number) => { + return await request.delete({ url: `/home/img/delete?id=` + id }) + }, + + // 导出公告管理 Excel + exportimg: async (params) => { + return await request.download({ url: `/home/img/export-excel`, params }) + }, +} diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 7be9014..e32d457 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -2,8 +2,8 @@
- - + + @@ -77,14 +77,14 @@
数据统计 - - {{ t('action.more') }} - + + + + + + + +
@@ -132,7 +132,7 @@ - + @@ -142,6 +142,71 @@ + + + + + + +
+ + + + + + + + + + + + + + + + +
+
+
+
+
@@ -151,23 +216,22 @@ -
+
-
- - {{ item.type }} : {{ item.title }} - +
+ : + {{ item.imgName }}
- {{ formatTime(item.date, 'yyyy-MM-dd') }} + {{ formatTime(item.imgCreatetime, 'yyyy-MM-dd') }}
@@ -203,7 +267,7 @@ prop="pjEtime" label="完成日期" align="center" - :formatter="dateFormatter" + :formatter="dateFormatter2" style="width: 20%" /> - - - - - - -
- - - - - - - - - - - - - - - - -
-
-
-
-
+ + + + {{formData.imgName}} + + 发布时间: {{formatTime(formData.imgCreatetime,'yyyy-MM-dd')}} + + + + + + diff --git a/src/views/Home/homeimg/index.vue b/src/views/Home/homeimg/index.vue new file mode 100644 index 0000000..4dd1a5a --- /dev/null +++ b/src/views/Home/homeimg/index.vue @@ -0,0 +1,289 @@ + + + diff --git a/src/views/Home/homepj/index.vue b/src/views/Home/homepj/index.vue index ae48375..a560b28 100644 --- a/src/views/Home/homepj/index.vue +++ b/src/views/Home/homepj/index.vue @@ -167,14 +167,14 @@ - + - + @@ -226,7 +226,7 @@