diff --git a/app/admin/controller/operation/OperationNotice.php b/app/admin/controller/operation/OperationNotice.php new file mode 100644 index 0000000..9b61544 --- /dev/null +++ b/app/admin/controller/operation/OperationNotice.php @@ -0,0 +1,31 @@ + 'desc']; + + protected string|array $orderGuarantee = ['id' => 'desc']; + + protected bool $modelValidate = false; + + protected function initController(WebmanRequest $request): ?Response + { + $this->model = new \app\common\model\OperationNotice(); + return null; + } +} diff --git a/app/common/model/OperationNotice.php b/app/common/model/OperationNotice.php new file mode 100644 index 0000000..7995188 --- /dev/null +++ b/app/common/model/OperationNotice.php @@ -0,0 +1,20 @@ + 'integer', + 'update_time' => 'integer', + 'publish_at' => 'integer', + 'notice_type' => 'integer', + 'status' => 'integer', + ]; +} diff --git a/web/src/lang/backend/en/operation/operationNotice.ts b/web/src/lang/backend/en/operation/operationNotice.ts new file mode 100644 index 0000000..f3b64f5 --- /dev/null +++ b/web/src/lang/backend/en/operation/operationNotice.ts @@ -0,0 +1,15 @@ +export default { + 'quick Search Fields': 'ID/Title', + id: 'ID', + title: 'Title', + content: 'Content', + notice_type: 'Notice type', + 'notice_type 0': 'Inbox (silent)', + 'notice_type 1': 'Pop-up', + status: 'Status', + 'status 0': 'Draft', + 'status 1': 'Published', + publish_at: 'Publish time', + create_time: 'Created', + update_time: 'Updated', +} diff --git a/web/src/lang/backend/zh-cn/operation/operationNotice.ts b/web/src/lang/backend/zh-cn/operation/operationNotice.ts new file mode 100644 index 0000000..949d3c5 --- /dev/null +++ b/web/src/lang/backend/zh-cn/operation/operationNotice.ts @@ -0,0 +1,15 @@ +export default { + 'quick Search Fields': 'ID/标题', + id: 'ID', + title: '标题', + content: '正文', + notice_type: '公告类型', + 'notice_type 0': '静默信箱', + 'notice_type 1': '强弹窗', + status: '状态', + 'status 0': '草稿', + 'status 1': '发布', + publish_at: '发布时间', + create_time: '创建时间', + update_time: '更新时间', +} diff --git a/web/src/views/backend/operation/operationNotice/index.vue b/web/src/views/backend/operation/operationNotice/index.vue new file mode 100644 index 0000000..2dd9408 --- /dev/null +++ b/web/src/views/backend/operation/operationNotice/index.vue @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + diff --git a/web/src/views/backend/operation/operationNotice/popupForm.vue b/web/src/views/backend/operation/operationNotice/popupForm.vue new file mode 100644 index 0000000..0fcc734 --- /dev/null +++ b/web/src/views/backend/operation/operationNotice/popupForm.vue @@ -0,0 +1,56 @@ + + + + {{ baTable.form.operate ? t(baTable.form.operate) : '' }} + + + + + + + + + + + + + + + {{ t('Cancel') }} + {{ baTable.form.operateIds && baTable.form.operateIds.length > 1 ? t('Save and edit next item') : t('Save') }} + + + + + + + +