From 1e045d073c3423254c7e1ccd4bfae5aee9100599 Mon Sep 17 00:00:00 2001 From: LiYang Date: Mon, 1 Aug 2016 22:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=83=A8=E5=88=86=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=9B=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=91=8A=E7=B3=BB?= =?UTF-8?q?=E5=88=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- announcement/serializers.py | 4 + .../admin/src/components/account/editUser.vue | 18 ++--- .../admin/src/components/account/userList.vue | 5 +- .../announcement/announcementList.vue | 74 +++++++++++++++++++ .../announcement/createAnnouncement.vue | 37 ++++++++++ .../announcement/editAnnouncement.vue | 40 ++++++++++ .../admin/src/components/utils/leftNav.vue | 3 +- frontend/admin/src/locales.js | 37 ++++++++-- frontend/admin/src/main.js | 20 ++++- 9 files changed, 215 insertions(+), 23 deletions(-) create mode 100644 frontend/admin/src/components/announcement/announcementList.vue create mode 100644 frontend/admin/src/components/announcement/createAnnouncement.vue create mode 100644 frontend/admin/src/components/announcement/editAnnouncement.vue diff --git a/announcement/serializers.py b/announcement/serializers.py index 75c395f6..6a6e6298 100644 --- a/announcement/serializers.py +++ b/announcement/serializers.py @@ -2,6 +2,8 @@ from rest_framework import serializers from account.models import User +from utils.serializers import DateTimeTZField + from .models import Announcement @@ -11,6 +13,8 @@ class CreateAnnouncementSerializer(serializers.Serializer): class AnnouncementSerializer(serializers.ModelSerializer): + create_time = DateTimeTZField() + last_update_time = DateTimeTZField class UserSerializer(serializers.ModelSerializer): class Meta: diff --git a/frontend/admin/src/components/account/editUser.vue b/frontend/admin/src/components/account/editUser.vue index 7c1a3777..54be5ef4 100644 --- a/frontend/admin/src/components/account/editUser.vue +++ b/frontend/admin/src/components/account/editUser.vue @@ -1,7 +1,7 @@