diff --git a/src/api/operation/announcement/index.js b/src/api/operation/announcement/index.js new file mode 100644 index 0000000..dadc162 --- /dev/null +++ b/src/api/operation/announcement/index.js @@ -0,0 +1,38 @@ +import httpService from "@/request" + +// 公告列表 +export function announcementList(params) { + return httpService({ + url: `/user/announcement/list`, + method: 'get', + params: params, + }) +} +export function announcementInfo(params) { + return httpService({ + url: `/user/announcement/findById`, + method: 'get', + params: params, + }) +} +export function announcementInsert(params) { + return httpService({ + url: `/user/announcement/insert`, + method: 'post', + data: params, + }) +} +export function announcementDel(params) { + return httpService({ + url: `/user/announcement/delete`, + method: 'post', + data: params, + }) +} +export function announcementUpdate(params) { + return httpService({ + url: `/user/announcement/update`, + method: 'post', + data: params, + }) +} diff --git a/src/views/Basic/Employee/depend/config.js b/src/views/Basic/Employee/depend/config.js index b218e72..7533507 100644 --- a/src/views/Basic/Employee/depend/config.js +++ b/src/views/Basic/Employee/depend/config.js @@ -26,7 +26,7 @@ export const columns = [ { title: "状态", dataIndex: "status", - width: "16%", + width: "12%", customRender: function (status) { switch (status) { case 1: diff --git a/src/views/Operation/Announcement/depend/config.js b/src/views/Operation/Announcement/depend/config.js new file mode 100644 index 0000000..7b696e6 --- /dev/null +++ b/src/views/Operation/Announcement/depend/config.js @@ -0,0 +1,114 @@ +export const formItem = [ + { + type: 'input', + label:'标题', + prop:'title', + placeholder:'请输入' + }, + { + type: 'select', + label:'推送对象', + prop:'object', + option:[{ id:1,name:'全部'},{ id:2,name:'住户'},{ id:3,name:'业主'},{ id:4,name:'租户'},{ id:5,name:'管家'}], + placeholder:'请选择' + }, + { + type: 'select', + label:'发布状态', + prop:'status', + option:[{ id:1,name:'未发布'},{ id:2,name:'已发布'}], + placeholder:'请选择' + }, + { + type: 'time', + label:'更新时间', + start: 'modifyStartTime', + end:'modifyEndTime' + }, +] +export const columns = [ + { + title: "标题", + dataIndex: "title", + width: "16%", + }, + { + title: "推送对象", + dataIndex: "object", + width: "10%", + customRender: function (object) { + switch (object) { + case 1: + return '全部' + break; + case 2: + return '住户' + break; + case 3: + return '业主' + break; + case 4: + return '租户' + break; + case 5: + return '管家' + break; + default: + break; + } + } + }, + { + title: "状态", + dataIndex: "status", + width: "10%", + customRender: function (status) { + switch (status) { + case 1: + return '未发布' + break; + case 2: + return '已发布' + break; + default: + break; + } + } + }, + { + title: "内容", + dataIndex: "content", + width: "13%", + }, + { + title: "阅读量", + dataIndex: "readingVolume", + width: "10%", + }, + { + title: "附件下载次数", + dataIndex: "downloadNum", + width: "10%", + }, + { + title: "更新时间", + dataIndex: "modifyDate", + width: "14%", + }, + { + title: "操作", + dataIndex: "action", + key: "action", + width: "180", + fixed: "right", + scopedSlots: { customRender: "action" }, + }, +] +export const pagination = { + current: 1, + total: 0, + pageSize: 10, + showTotal: (total) => `共 ${total} 条`, + showSizeChanger: true, + showQuickJumper: true, +} \ No newline at end of file diff --git a/src/views/Operation/Announcement/depend/form.js b/src/views/Operation/Announcement/depend/form.js new file mode 100644 index 0000000..542821d --- /dev/null +++ b/src/views/Operation/Announcement/depend/form.js @@ -0,0 +1,28 @@ +export const form = { + id:undefined, + title:undefined, + object:undefined, + status:undefined, + content:undefined, + coverImgUrls:[], + annexUrls:[], +} +export const rules = { + title:[{required:true,message:'请输入标题',trigger:'blur'}], + object:[{required:true,message:'请选择',trigger:'change'}], + status:[{required:true,message:'请选择',trigger:'change'}], + content:[{required:true,message:'请输入标题',trigger:'blur'}], +} +export const options = { + status:[ + { id:1, name:'未发布' }, + { id:2, name:'已发布' }, + ], + object:[ + { id:1, name:'全部' }, + { id:2, name:'住户' }, + { id:3, name:'业主' }, + { id:4, name:'租户' }, + { id:5, name:'管家' }, + ], +} \ No newline at end of file diff --git a/src/views/Operation/Announcement/depend/form.vue b/src/views/Operation/Announcement/depend/form.vue new file mode 100644 index 0000000..9fdcbd8 --- /dev/null +++ b/src/views/Operation/Announcement/depend/form.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/views/Operation/Announcement/index.vue b/src/views/Operation/Announcement/index.vue index 3ec745f..aeb3241 100644 --- a/src/views/Operation/Announcement/index.vue +++ b/src/views/Operation/Announcement/index.vue @@ -1,15 +1,163 @@ - - \ No newline at end of file +