Просмотр исходного кода

Merge branch 'develop' into 'feature/web-with-framework'

# Conflicts:
#   o2web/source/o2_core/o2.js
胡起 5 лет назад
Родитель
Сommit
8922069eb7
100 измененных файлов с 4826 добавлено и 1468 удалено
  1. 39 0
      o2android/app/src/main/java/net/zoneland/x/bpm/mobile/v1/zoneXBPM/app/im/fm/O2IMConversationFragment.kt
  2. 41 8
      o2android/app/src/main/java/net/zoneland/x/bpm/mobile/v1/zoneXBPM/app/o2/main/MainActivity.kt
  3. 15 0
      o2android/app/src/main/res/layout/fragment_main_bottom_bar_image.xml
  4. BIN
      o2android/app/src/main/res/mipmap-xhdpi/group_default.png
  5. 137 0
      o2ios/O2Platform.xcodeproj/project.pbxproj
  6. 62 0
      o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarEditRemarkViewController.swift
  7. 33 8
      o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarEventViewController.swift
  8. 11 0
      o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarLeftMenuController.swift
  9. 405 54
      o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarViewController.swift
  10. 12 0
      o2ios/O2Platform/App/Calendar-日程管理/Model/OOCalendarModels.swift
  11. 1428 1209
      o2ios/O2Platform/App/Calendar-日程管理/calendar.storyboard
  12. 248 0
      o2ios/O2Platform/App/IM-聊天/IMChatViewController.swift
  13. 81 0
      o2ios/O2Platform/App/IM-聊天/IMChatViewController.xib
  14. 241 0
      o2ios/O2Platform/App/IM-聊天/IMConversationListViewController.swift
  15. 64 0
      o2ios/O2Platform/App/IM-聊天/IMInstantMessageViewController.swift
  16. 30 0
      o2ios/O2Platform/App/IM-聊天/IMInstantMessageViewController.xib
  17. 144 0
      o2ios/O2Platform/App/IM-聊天/IMViewModel.swift
  18. 103 0
      o2ios/O2Platform/App/IM-聊天/Model/IMConversationInfo.swift
  19. 29 0
      o2ios/O2Platform/App/IM-聊天/O2IM.swift
  20. 68 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiBarView.swift
  21. 43 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiBarView.xib
  22. 25 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiItemCell.swift
  23. 41 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiItemCell.xib
  24. 129 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatMessageSendViewCell.swift
  25. 84 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatMessageSendViewCell.xib
  26. 180 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatMessageViewCell.swift
  27. 84 0
      o2ios/O2Platform/App/IM-聊天/View/IMChatMessageViewCell.xib
  28. 119 0
      o2ios/O2Platform/App/IM-聊天/View/IMConversationItemCell.swift
  29. 117 0
      o2ios/O2Platform/App/IM-聊天/View/IMConversationItemCell.xib
  30. 65 37
      o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceCheckInController.swift
  31. 70 0
      o2ios/O2Platform/App/NewAttance-考勤打卡/m/OOAttandanceModels.swift
  32. 13 1
      o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceItemCell.swift
  33. 6 9
      o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceItemCell.xib
  34. 15 0
      o2ios/O2Platform/App/NewAttance-考勤打卡/vm/OOAttandanceViewModel.swift
  35. 221 63
      o2ios/O2Platform/App/O2MainController.swift
  36. 18 16
      o2ios/O2Platform/App/contacts/c/ContactPersonInfoV2ViewController.swift
  37. 29 31
      o2ios/O2Platform/App/contacts/contacts.storyboard
  38. 22 0
      o2ios/O2Platform/Assets.xcassets/all/chat_emoji.imageset/Contents.json
  39. BIN
      o2ios/O2Platform/Assets.xcassets/all/chat_emoji.imageset/chat_emoji@2x.png
  40. BIN
      o2ios/O2Platform/Assets.xcassets/all/chat_emoji.imageset/chat_emoji@3x.png
  41. 22 0
      o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_incomming.imageset/Contents.json
  42. BIN
      o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_incomming.imageset/chat_bubble_incomming@2x.png
  43. BIN
      o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_incomming.imageset/chat_bubble_incomming@3x.png
  44. 22 0
      o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_outgoing.imageset/Contents.json
  45. BIN
      o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_outgoing.imageset/chat_bubble_outgoing@2x.png
  46. BIN
      o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_outgoing.imageset/chat_bubble_outgoing@3x.png
  47. 21 0
      o2ios/O2Platform/Assets.xcassets/首页/group_default.imageset/Contents.json
  48. BIN
      o2ios/O2Platform/Assets.xcassets/首页/group_default.imageset/group_default@2x.png
  49. 16 0
      o2ios/O2Platform/Extension/ArrayExtensions.swift
  50. 17 8
      o2ios/O2Platform/Extension/Bundle+Extension.swift
  51. 35 21
      o2ios/O2Platform/Extension/Date+Extension.swift
  52. 2 0
      o2ios/O2Platform/Extension/Notification+Extension.swift
  53. 17 0
      o2ios/O2Platform/Extension/String+Extenstion.swift
  54. 7 0
      o2ios/O2Platform/Extension/UIDeviceExtensions.swift
  55. 33 0
      o2ios/O2Platform/Extension/UIView+Extension.swift
  56. 7 0
      o2ios/O2Platform/Framework/O2API/AttendanceAPI/OOAttendanceAPI.swift
  57. 97 0
      o2ios/O2Platform/Framework/O2API/Communicate/CommunicateAPI.swift
  58. 2 2
      o2ios/O2Platform/Info.plist
  59. 56 0
      o2ios/O2Platform/Manager/O2WebsocketManager.swift
  60. 0 1
      o2ios/O2Platform/O2Platform-Bridging-Header.h
  61. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/Info.plist
  62. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_01.png
  63. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_02.png
  64. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_03.png
  65. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_04.png
  66. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_05.png
  67. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_06.png
  68. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_07.png
  69. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_08.png
  70. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_09.png
  71. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_10.png
  72. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_11.png
  73. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_12.png
  74. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_13.png
  75. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_14.png
  76. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_15.png
  77. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_16.png
  78. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_17.png
  79. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_18.png
  80. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_19.png
  81. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_20.png
  82. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_21.png
  83. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_22.png
  84. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_23.png
  85. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_24.png
  86. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_25.png
  87. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_26.png
  88. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_27.png
  89. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_28.png
  90. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_29.png
  91. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_30.png
  92. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_31.png
  93. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_32.png
  94. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_33.png
  95. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_34.png
  96. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_35.png
  97. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_36.png
  98. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_37.png
  99. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_38.png
  100. BIN
      o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_39.png

+ 39 - 0
o2android/app/src/main/java/net/zoneland/x/bpm/mobile/v1/zoneXBPM/app/im/fm/O2IMConversationFragment.kt

@@ -14,6 +14,7 @@ import net.zoneland.x.bpm.mobile.v1.zoneXBPM.app.base.BaseMVPViewPagerFragment
 import net.zoneland.x.bpm.mobile.v1.zoneXBPM.app.im.O2ChatActivity
 import net.zoneland.x.bpm.mobile.v1.zoneXBPM.app.im.O2IM
 import net.zoneland.x.bpm.mobile.v1.zoneXBPM.app.im.O2InstantMessageActivity
+import net.zoneland.x.bpm.mobile.v1.zoneXBPM.app.o2.main.MainActivity
 import net.zoneland.x.bpm.mobile.v1.zoneXBPM.app.o2.organization.ContactPickerActivity
 import net.zoneland.x.bpm.mobile.v1.zoneXBPM.core.component.adapter.CommonRecycleViewAdapter
 import net.zoneland.x.bpm.mobile.v1.zoneXBPM.core.component.adapter.CommonRecyclerViewHolder
@@ -54,6 +55,9 @@ class O2IMConversationFragment : BaseMVPViewPagerFragment<O2IMConversationContra
                             val name = person.substring(0, person.indexOf("@"))
                             holder.setText(R.id.tv_o2_im_con_title, name)
                         }
+                    }else if(O2IM.conversation_type_group == t.type) {
+                        holder.setText(R.id.tv_o2_im_con_title, t.title )
+                                .setImageViewResource(R.id.image_o2_im_con_avatar, R.mipmap.group_default)
                     }
                     val unread = holder.getView<TextView>(R.id.tv_o2_im_con_unread_number)
                     if (t.unreadNumber > 0) {
@@ -127,6 +131,10 @@ class O2IMConversationFragment : BaseMVPViewPagerFragment<O2IMConversationContra
                 openCreateSingleConversation()
                 return true
             }
+            R.id.menu_tribe_create -> {
+                openCreateTribeConversation()
+                return true
+            }
         }
         return super.onOptionsItemSelected(item)
     }
@@ -135,16 +143,24 @@ class O2IMConversationFragment : BaseMVPViewPagerFragment<O2IMConversationContra
         if (list.isEmpty()) {
             tv_null_conversation.visible()
             ll_o2_im_message_list.gone()
+            setUnreadNumber(0)
         } else {
             tv_null_conversation.gone()
             ll_o2_im_message_list.visible()
             cList.clear()
             cList.addAll(list)
             adapter.notifyDataSetChanged()
+            var allnumbers = 0
+            list.forEach { con ->
+                val number = con.unreadNumber ?: 0
+                allnumbers += number
+            }
+            setUnreadNumber(allnumbers)
         }
         mPresenter.getMyInstantMessageList()
     }
 
+
     override fun myInstantMessageList(instantList: List<InstantMessage>) {
          if (instantList.isNotEmpty()) {
              this.instantList.clear()
@@ -183,6 +199,13 @@ class O2IMConversationFragment : BaseMVPViewPagerFragment<O2IMConversationContra
         }
     }
 
+
+    private fun setUnreadNumber(number: Int) {
+        if (activity is MainActivity) {
+            (activity as MainActivity).refreshUnreadNumber(number)
+        }
+    }
+
     private fun openCreateSingleConversation() {
         ActivityResult.of(activity)
                 .className(ContactPickerActivity::class.java)
@@ -200,4 +223,20 @@ class O2IMConversationFragment : BaseMVPViewPagerFragment<O2IMConversationContra
     private fun createSingleConversation(user: String) {
         mPresenter.createConversation("single", arrayListOf(user))
     }
+
+    private fun openCreateTribeConversation() {
+        ActivityResult.of(activity)
+                .className(ContactPickerActivity::class.java)
+                .params(ContactPickerActivity.startPickerBundle(pickerModes = arrayListOf(ContactPickerActivity.personPicker), multiple = true))
+                .greenChannel().forResult { _, data ->
+                    val result = data?.getParcelableExtra<ContactPickerResult>(ContactPickerActivity.CONTACT_PICKED_RESULT)
+                    if (result != null && result.users.isNotEmpty()) {
+                        val a = arrayListOf<String>()
+                        a.addAll(result.users.map { it.distinguishedName })
+                        mPresenter.createConversation("group",  a)
+                    }else {
+                        XLog.debug("没有选择人员!!!!")
+                    }
+                }
+    }
 }

+ 41 - 8
o2android/app/src/main/java/net/zoneland/x/bpm/mobile/v1/zoneXBPM/app/o2/main/MainActivity.kt

@@ -415,17 +415,18 @@ class MainActivity : BaseMVPActivity<MainContract.View, MainContract.Presenter>(
                 .setRequiresCharging(true)//充电的时候才执行
                 .setPeriodic(24 * 60 * 60 * 1000)
                 .build()
-        val collectLogComponent = ComponentName(this, CollectLogJobService::class.java)
-        val jobCollectLog = JobInfo.Builder(O2.O2_COLLECT_LOG_JOB_ID, collectLogComponent)
-                .setPersisted(true)
-                .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
-                .setPeriodic(1000 * 60 * 60 * 12)
-                .build()
+//        val collectLogComponent = ComponentName(this, CollectLogJobService::class.java)
+//        val jobCollectLog = JobInfo.Builder(O2.O2_COLLECT_LOG_JOB_ID, collectLogComponent)
+//                .setPersisted(true)
+//                .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
+//                .setPeriodic(1000 * 60 * 60 * 12)
+//                .build()
 
         val jobScheduler = applicationContext.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler
         val result = jobScheduler.schedule(jobInfo)
-        val result2 = jobScheduler.schedule(jobCollectLog)
-        XLog.info("jobScheduler result:$result, result2:$result2")
+//        val result2 = jobScheduler.schedule(jobCollectLog)
+//        XLog.info("jobScheduler result:$result, result2:$result2")
+        XLog.info("jobScheduler result:$result")
     }
 
 
@@ -495,6 +496,37 @@ class MainActivity : BaseMVPActivity<MainContract.View, MainContract.Presenter>(
     /**************im 消息接收器***************/
 
     var mReceiver: IMMessageReceiver? = null
+    private var unreadMsgNumber = 0
+
+    fun refreshUnreadNumber(number: Int) {
+        unreadMsgNumber = number
+        when {
+            unreadMsgNumber in 1..99 -> {
+                circle_tv_icon_main_bottom_news.visible()
+                circle_tv_icon_main_bottom_news.setText("$unreadMsgNumber")
+            }
+            unreadMsgNumber >= 100 -> {
+                circle_tv_icon_main_bottom_news.visible()
+                circle_tv_icon_main_bottom_news.setText("99..")
+            }
+            else -> circle_tv_icon_main_bottom_news.gone()
+        }
+    }
+
+    fun addUnreadMsg() {
+        unreadMsgNumber += 1
+        when {
+            unreadMsgNumber in 1..99 -> {
+                circle_tv_icon_main_bottom_news.visible()
+                circle_tv_icon_main_bottom_news.setText("$unreadMsgNumber")
+            }
+            unreadMsgNumber >= 100 -> {
+                circle_tv_icon_main_bottom_news.visible()
+                circle_tv_icon_main_bottom_news.setText("99..")
+            }
+            else -> circle_tv_icon_main_bottom_news.gone()
+        }
+    }
 
     private fun registerBroadcast() {
         mReceiver = IMMessageReceiver()
@@ -507,6 +539,7 @@ class MainActivity : BaseMVPActivity<MainContract.View, MainContract.Presenter>(
         if (newsFragment is O2IMConversationFragment) {
             newsFragment.receiveMessageFromWebsocket(message)
         }
+        addUnreadMsg()
     }
 
     inner class IMMessageReceiver : BroadcastReceiver() {

+ 15 - 0
o2android/app/src/main/res/layout/fragment_main_bottom_bar_image.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="56dp"
     android:orientation="vertical"
@@ -39,6 +40,20 @@
                 android:textSize="12sp"
                 android:textColor="@color/z_color_text_primary"
                 android:text="@string/tab_message"/>
+            <net.zoneland.x.bpm.mobile.v1.zoneXBPM.widgets.CircleTextView
+                android:id="@+id/circle_tv_icon_main_bottom_news"
+                android:layout_width="16dp"
+                android:layout_height="16dp"
+                android:layout_marginStart="25dp"
+                app:c_height="16dp"
+                app:c_inColor="@color/z_color_primary"
+                app:c_text="5"
+                android:textAlignment="center"
+                app:c_textColor="@android:color/white"
+                app:c_textSize="@dimen/font_mini"
+                app:c_width="16dp"
+                android:visibility="gone"
+                />
         </RelativeLayout>
         <RelativeLayout
             android:id="@+id/icon_main_bottom_contact"

BIN
o2android/app/src/main/res/mipmap-xhdpi/group_default.png


+ 137 - 0
o2ios/O2Platform.xcodeproj/project.pbxproj

@@ -37,6 +37,7 @@
 		09E02E981F16319600579887 /* UIView+Haneke.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09E02E821F16319600579887 /* UIView+Haneke.swift */; };
 		09E02E9A1F1745E700579887 /* ZLTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09E02E991F1745E700579887 /* ZLTextView.swift */; };
 		37D63E73FDC49F690C780FD1 /* Pods_O2Platform.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 10069E72107080DCAD68970B /* Pods_O2Platform.framework */; };
+		8840A992248CDC9D005970A5 /* OOCalendarEditRemarkViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8840A991248CDC9D005970A5 /* OOCalendarEditRemarkViewController.swift */; };
 		A043051B1F99CFD500740423 /* MailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A043051A1F99CFD500740423 /* MailViewController.swift */; };
 		B1015DDB2272B5DB00C1A7E6 /* O2BaseJsMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1015DDA2272B5DB00C1A7E6 /* O2BaseJsMessageHandler.swift */; };
 		B104303721464C690011B08E /* ai.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B104303621464C690011B08E /* ai.storyboard */; };
@@ -56,6 +57,14 @@
 		B108F402229E34D400778050 /* LBXScanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B108F3FB229E34D300778050 /* LBXScanViewController.swift */; };
 		B10A2F56233DDA990011CE3D /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B10A2F55233DDA990011CE3D /* AdSupport.framework */; };
 		B10A2F58233DDAE10011CE3D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B10A2F57233DDAE10011CE3D /* Security.framework */; };
+		B1173A5B2488C546005075F0 /* IMConversationListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1173A5A2488C546005075F0 /* IMConversationListViewController.swift */; };
+		B1173A5E2488C5DF005075F0 /* CommunicateAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1173A5D2488C5DF005075F0 /* CommunicateAPI.swift */; };
+		B1173A602488C82F005075F0 /* IMViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1173A5F2488C82F005075F0 /* IMViewModel.swift */; };
+		B1173A632488C8EA005075F0 /* IMConversationInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1173A622488C8EA005075F0 /* IMConversationInfo.swift */; };
+		B1173A672488CD5B005075F0 /* IMConversationItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1173A652488CD5B005075F0 /* IMConversationItemCell.swift */; };
+		B1173A682488CD5B005075F0 /* IMConversationItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1173A662488CD5B005075F0 /* IMConversationItemCell.xib */; };
+		B1173A6A2488D4AD005075F0 /* O2IM.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1173A692488D4AD005075F0 /* O2IM.swift */; };
+		B1173B5E2489F48C005075F0 /* O2Emoji.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B1173B2C2489F48C005075F0 /* O2Emoji.bundle */; };
 		B1298E50236692AB006E9236 /* CloudFileListBaseController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1298E4F236692AB006E9236 /* CloudFileListBaseController.swift */; };
 		B1298E7C23669BA2006E9236 /* CloudFileTypeListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1298E7B23669BA2006E9236 /* CloudFileTypeListController.swift */; };
 		B1298E7E2366AE4C006E9236 /* CloudFileImageCollectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1298E7D2366AE4C006E9236 /* CloudFileImageCollectionController.swift */; };
@@ -111,6 +120,18 @@
 		B13A0120236935BC00025F3B /* O2CloudFileInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B13A011F236935BC00025F3B /* O2CloudFileInfo.swift */; };
 		B142B081230FB56400E7D127 /* MimeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B142B080230FB56400E7D127 /* MimeType.swift */; };
 		B142B083230FB58B00E7D127 /* Swime.swift in Sources */ = {isa = PBXBuildFile; fileRef = B142B082230FB58B00E7D127 /* Swime.swift */; };
+		B1489B1C248E0F4D009EE9FD /* IMChatViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1489B1A248E0F4D009EE9FD /* IMChatViewController.swift */; };
+		B1489B1D248E0F4D009EE9FD /* IMChatViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1489B1B248E0F4D009EE9FD /* IMChatViewController.xib */; };
+		B1489B51248E192D009EE9FD /* IMChatMessageViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1489B4F248E192D009EE9FD /* IMChatMessageViewCell.swift */; };
+		B1489B52248E192D009EE9FD /* IMChatMessageViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1489B50248E192D009EE9FD /* IMChatMessageViewCell.xib */; };
+		B1489BFE2490BE51009EE9FD /* IMChatMessageSendViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1489BFC2490BE51009EE9FD /* IMChatMessageSendViewCell.swift */; };
+		B1489BFF2490BE51009EE9FD /* IMChatMessageSendViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1489BFD2490BE51009EE9FD /* IMChatMessageSendViewCell.xib */; };
+		B1489C7B2491FEFE009EE9FD /* IMChatEmojiBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1489C7A2491FEFE009EE9FD /* IMChatEmojiBarView.swift */; };
+		B1489CAE2491FF13009EE9FD /* IMChatEmojiBarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1489CAD2491FF13009EE9FD /* IMChatEmojiBarView.xib */; };
+		B1489CB12492045D009EE9FD /* IMChatEmojiItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1489CAF2492045D009EE9FD /* IMChatEmojiItemCell.swift */; };
+		B1489CB22492045D009EE9FD /* IMChatEmojiItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1489CB02492045D009EE9FD /* IMChatEmojiItemCell.xib */; };
+		B1489CB624935104009EE9FD /* IMInstantMessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1489CB424935104009EE9FD /* IMInstantMessageViewController.swift */; };
+		B1489CB724935104009EE9FD /* IMInstantMessageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1489CB524935104009EE9FD /* IMInstantMessageViewController.xib */; };
 		B14B339F2356EB1500442968 /* CloudFileViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14B339E2356EB1500442968 /* CloudFileViewModel.swift */; };
 		B14E07532301137F00AE85A0 /* ContactPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14E07522301137F00AE85A0 /* ContactPickerViewController.swift */; };
 		B14E07862301418400AE85A0 /* ContactUnitPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14E07852301418400AE85A0 /* ContactUnitPickerViewController.swift */; };
@@ -118,6 +139,7 @@
 		B14E078A230141AC00AE85A0 /* ContactGroupPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14E0789230141AC00AE85A0 /* ContactGroupPickerViewController.swift */; };
 		B14E078C230141BE00AE85A0 /* ContactPersonPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14E078B230141BE00AE85A0 /* ContactPersonPickerViewController.swift */; };
 		B14E07C523025C6A00AE85A0 /* OOContactExpressAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14E07C423025C6A00AE85A0 /* OOContactExpressAPI.swift */; };
+		B14E0C0C2484F1F0008AF6AE /* O2WebsocketManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14E0C0B2484F1F0008AF6AE /* O2WebsocketManager.swift */; };
 		B1534E3F21F712EA00CC8C35 /* O2DemoAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1534E3E21F712EA00CC8C35 /* O2DemoAlertView.swift */; };
 		B158E95E215DD3F500AB2727 /* AIConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = B158E95D215DD3F500AB2727 /* AIConstants.swift */; };
 		B15D26EC235EF7480092F8B8 /* genstrings.sh in Resources */ = {isa = PBXBuildFile; fileRef = B15D26EB235EF7480092F8B8 /* genstrings.sh */; };
@@ -1211,6 +1233,13 @@
 			remoteGlobalIDString = 183276F1FBCA05D9F840C64172C84A44;
 			remoteInfo = YHPopupView;
 		};
+		B1173A582488C3DD005075F0 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = E4E7755421017DB4006ED7FC /* Pods.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 891B2270823847ED23F2ECFC28F935EC;
+			remoteInfo = Starscream;
+		};
 		B14A2292224CBC2E00745E0A /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = E4E7755421017DB4006ED7FC /* Pods.xcodeproj */;
@@ -1339,6 +1368,7 @@
 		10069E72107080DCAD68970B /* Pods_O2Platform.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_O2Platform.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		47A96D30743BECAB12B424CE /* Pods-O2Platform.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-O2Platform.release.xcconfig"; path = "Pods/Target Support Files/Pods-O2Platform/Pods-O2Platform.release.xcconfig"; sourceTree = "<group>"; };
 		4F1BA982094EC6172ACF8F99 /* Pods-O2Platform.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-O2Platform.debug.xcconfig"; path = "Pods/Target Support Files/Pods-O2Platform/Pods-O2Platform.debug.xcconfig"; sourceTree = "<group>"; };
+		8840A991248CDC9D005970A5 /* OOCalendarEditRemarkViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OOCalendarEditRemarkViewController.swift; sourceTree = "<group>"; };
 		A043051A1F99CFD500740423 /* MailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MailViewController.swift; sourceTree = "<group>"; };
 		B1015DDA2272B5DB00C1A7E6 /* O2BaseJsMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = O2BaseJsMessageHandler.swift; sourceTree = "<group>"; };
 		B104303621464C690011B08E /* ai.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ai.storyboard; sourceTree = "<group>"; };
@@ -1358,6 +1388,14 @@
 		B108F3FB229E34D300778050 /* LBXScanViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LBXScanViewController.swift; sourceTree = "<group>"; };
 		B10A2F55233DDA990011CE3D /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; };
 		B10A2F57233DDAE10011CE3D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
+		B1173A5A2488C546005075F0 /* IMConversationListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMConversationListViewController.swift; sourceTree = "<group>"; };
+		B1173A5D2488C5DF005075F0 /* CommunicateAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunicateAPI.swift; sourceTree = "<group>"; };
+		B1173A5F2488C82F005075F0 /* IMViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMViewModel.swift; sourceTree = "<group>"; };
+		B1173A622488C8EA005075F0 /* IMConversationInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMConversationInfo.swift; sourceTree = "<group>"; };
+		B1173A652488CD5B005075F0 /* IMConversationItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMConversationItemCell.swift; sourceTree = "<group>"; };
+		B1173A662488CD5B005075F0 /* IMConversationItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMConversationItemCell.xib; sourceTree = "<group>"; };
+		B1173A692488D4AD005075F0 /* O2IM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = O2IM.swift; sourceTree = "<group>"; };
+		B1173B2C2489F48C005075F0 /* O2Emoji.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = O2Emoji.bundle; sourceTree = "<group>"; };
 		B1298E4F236692AB006E9236 /* CloudFileListBaseController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudFileListBaseController.swift; sourceTree = "<group>"; };
 		B1298E7B23669BA2006E9236 /* CloudFileTypeListController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudFileTypeListController.swift; sourceTree = "<group>"; };
 		B1298E7D2366AE4C006E9236 /* CloudFileImageCollectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudFileImageCollectionController.swift; sourceTree = "<group>"; };
@@ -1409,6 +1447,18 @@
 		B13A011F236935BC00025F3B /* O2CloudFileInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = O2CloudFileInfo.swift; sourceTree = "<group>"; };
 		B142B080230FB56400E7D127 /* MimeType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MimeType.swift; sourceTree = "<group>"; };
 		B142B082230FB58B00E7D127 /* Swime.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Swime.swift; sourceTree = "<group>"; };
+		B1489B1A248E0F4D009EE9FD /* IMChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMChatViewController.swift; sourceTree = "<group>"; };
+		B1489B1B248E0F4D009EE9FD /* IMChatViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMChatViewController.xib; sourceTree = "<group>"; };
+		B1489B4F248E192D009EE9FD /* IMChatMessageViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMChatMessageViewCell.swift; sourceTree = "<group>"; };
+		B1489B50248E192D009EE9FD /* IMChatMessageViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMChatMessageViewCell.xib; sourceTree = "<group>"; };
+		B1489BFC2490BE51009EE9FD /* IMChatMessageSendViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMChatMessageSendViewCell.swift; sourceTree = "<group>"; };
+		B1489BFD2490BE51009EE9FD /* IMChatMessageSendViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMChatMessageSendViewCell.xib; sourceTree = "<group>"; };
+		B1489C7A2491FEFE009EE9FD /* IMChatEmojiBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMChatEmojiBarView.swift; sourceTree = "<group>"; };
+		B1489CAD2491FF13009EE9FD /* IMChatEmojiBarView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMChatEmojiBarView.xib; sourceTree = "<group>"; };
+		B1489CAF2492045D009EE9FD /* IMChatEmojiItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMChatEmojiItemCell.swift; sourceTree = "<group>"; };
+		B1489CB02492045D009EE9FD /* IMChatEmojiItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMChatEmojiItemCell.xib; sourceTree = "<group>"; };
+		B1489CB424935104009EE9FD /* IMInstantMessageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IMInstantMessageViewController.swift; sourceTree = "<group>"; };
+		B1489CB524935104009EE9FD /* IMInstantMessageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IMInstantMessageViewController.xib; sourceTree = "<group>"; };
 		B14B339E2356EB1500442968 /* CloudFileViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudFileViewModel.swift; sourceTree = "<group>"; };
 		B14E07522301137F00AE85A0 /* ContactPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactPickerViewController.swift; sourceTree = "<group>"; };
 		B14E07852301418400AE85A0 /* ContactUnitPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactUnitPickerViewController.swift; sourceTree = "<group>"; };
@@ -1416,6 +1466,7 @@
 		B14E0789230141AC00AE85A0 /* ContactGroupPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactGroupPickerViewController.swift; sourceTree = "<group>"; };
 		B14E078B230141BE00AE85A0 /* ContactPersonPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactPersonPickerViewController.swift; sourceTree = "<group>"; };
 		B14E07C423025C6A00AE85A0 /* OOContactExpressAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OOContactExpressAPI.swift; sourceTree = "<group>"; };
+		B14E0C0B2484F1F0008AF6AE /* O2WebsocketManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = O2WebsocketManager.swift; sourceTree = "<group>"; };
 		B1534E3E21F712EA00CC8C35 /* O2DemoAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = O2DemoAlertView.swift; sourceTree = "<group>"; };
 		B158E95D215DD3F500AB2727 /* AIConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AIConstants.swift; sourceTree = "<group>"; };
 		B15D26BF235EF0850092F8B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/CloudFile.storyboard; sourceTree = "<group>"; };
@@ -2514,6 +2565,7 @@
 				B10AC5D721058DAE00179587 /* RxSwift.framework */,
 				B10AC5D921058DAE00179587 /* SDWebImage.framework */,
 				B10AC5DF21058DAE00179587 /* SnapKit.framework */,
+				B1173A592488C3DD005075F0 /* Starscream.framework */,
 				B10AC5E321058DAE00179587 /* SwiftValidator.framework */,
 				B10AC5E521058DAE00179587 /* SwiftyJSON.framework */,
 				B10AC5E721058DAE00179587 /* SwiftyTimer.framework */,
@@ -2524,6 +2576,55 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
+		B1173A262488C3DD005075F0 /* IM-聊天 */ = {
+			isa = PBXGroup;
+			children = (
+				B1173A642488CD37005075F0 /* View */,
+				B1173A612488C8D3005075F0 /* Model */,
+				B1173A5A2488C546005075F0 /* IMConversationListViewController.swift */,
+				B1173A5F2488C82F005075F0 /* IMViewModel.swift */,
+				B1173A692488D4AD005075F0 /* O2IM.swift */,
+				B1489B1A248E0F4D009EE9FD /* IMChatViewController.swift */,
+				B1489B1B248E0F4D009EE9FD /* IMChatViewController.xib */,
+				B1489CB424935104009EE9FD /* IMInstantMessageViewController.swift */,
+				B1489CB524935104009EE9FD /* IMInstantMessageViewController.xib */,
+			);
+			path = "IM-聊天";
+			sourceTree = "<group>";
+		};
+		B1173A5C2488C568005075F0 /* Communicate */ = {
+			isa = PBXGroup;
+			children = (
+				B1173A5D2488C5DF005075F0 /* CommunicateAPI.swift */,
+			);
+			path = Communicate;
+			sourceTree = "<group>";
+		};
+		B1173A612488C8D3005075F0 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				B1173A622488C8EA005075F0 /* IMConversationInfo.swift */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		B1173A642488CD37005075F0 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				B1173A652488CD5B005075F0 /* IMConversationItemCell.swift */,
+				B1173A662488CD5B005075F0 /* IMConversationItemCell.xib */,
+				B1489B4F248E192D009EE9FD /* IMChatMessageViewCell.swift */,
+				B1489B50248E192D009EE9FD /* IMChatMessageViewCell.xib */,
+				B1489BFC2490BE51009EE9FD /* IMChatMessageSendViewCell.swift */,
+				B1489BFD2490BE51009EE9FD /* IMChatMessageSendViewCell.xib */,
+				B1489C7A2491FEFE009EE9FD /* IMChatEmojiBarView.swift */,
+				B1489CAD2491FF13009EE9FD /* IMChatEmojiBarView.xib */,
+				B1489CAF2492045D009EE9FD /* IMChatEmojiItemCell.swift */,
+				B1489CB02492045D009EE9FD /* IMChatEmojiItemCell.xib */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		B12FD1502283CDF400E636BA /* theme */ = {
 			isa = PBXGroup;
 			children = (
@@ -2683,6 +2784,7 @@
 				B15F8128210EF15E00B81F35 /* OOCalendarEventViewController.swift */,
 				B1C19024211437E200935829 /* OOCalendarLeftMenuController.swift */,
 				B1FAE9E02115F95800981A25 /* OOCalendarViewController.swift */,
+				8840A991248CDC9D005970A5 /* OOCalendarEditRemarkViewController.swift */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -2785,6 +2887,7 @@
 		B1F79C44233B5F9B004D0AEE /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				B1173B2C2489F48C005075F0 /* O2Emoji.bundle */,
 				B19776E7217D9D810019F3A8 /* beep.wav */,
 				E4B888231D9D48F1002E1A46 /* images */,
 				E4B888291D9D48F1002E1A46 /* 隶变体.ttf */,
@@ -2838,6 +2941,7 @@
 				B13A011023692A8B00025F3B /* O2CloudFileManager.swift */,
 				B1E0BAA02378FC01001D741F /* O2JPushManager.swift */,
 				B1ABAA0B237E498C0027EC48 /* O2VersionManager.swift */,
+				B14E0C0B2484F1F0008AF6AE /* O2WebsocketManager.swift */,
 			);
 			path = Manager;
 			sourceTree = "<group>";
@@ -2869,6 +2973,7 @@
 				E45CD4211DFE503C008F99AD /* Scan-二维码扫码 */,
 				E4C24C22208D7EDE00E426B0 /* Contact-通讯录 */,
 				E4B8875E1D9D48F1002E1A46 /* contacts */,
+				B1173A262488C3DD005075F0 /* IM-聊天 */,
 				E428AF3720A95D3800D964B9 /* NewAttance-考勤打卡 */,
 				E40E246E20B7DA3C009F8BE7 /* meeting-会议 */,
 				B19091FD2107145F009A7906 /* Calendar-日程管理 */,
@@ -3405,6 +3510,7 @@
 		E4B69721207602840062F6E8 /* O2API */ = {
 			isa = PBXGroup;
 			children = (
+				B1173A5C2488C568005075F0 /* Communicate */,
 				B18FFF3323756B24001B2887 /* JpushAPI */,
 				B107453721A52B9A0015F1B2 /* PersonalAPI */,
 				B1B6A8F7217710A400C10F3C /* FaceRecognizeAPI */,
@@ -5294,6 +5400,13 @@
 			remoteRef = B10AC5F021058DAE00179587 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
+		B1173A592488C3DD005075F0 /* Starscream.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = Starscream.framework;
+			remoteRef = B1173A582488C3DD005075F0 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
 		B14A2293224CBC2E00745E0A /* IQKeyboardManagerSwift.framework */ = {
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
@@ -5384,6 +5497,7 @@
 				E4C24B4920844F3C00E426B0 /* JCMessageImageCollectionViewCell.xib in Resources */,
 				E4C24C1820844F5200E426B0 /* yh_image_picked@2x.png in Resources */,
 				E45755A61E0BA72E00EC44F4 /* qrcode_scan_part_net.png in Resources */,
+				B1489B52248E192D009EE9FD /* IMChatMessageViewCell.xib in Resources */,
 				E46E6C721DD41F5D00AB7561 /* ZSSfonts@2x.png in Resources */,
 				E46E6C6E1DD41F5D00AB7561 /* ZSScenterjustify@2x.png in Resources */,
 				B1298E822366B2E7006E9236 /* CFImageViewCell.xib in Resources */,
@@ -5398,12 +5512,14 @@
 				E4B8871E1D9D477A002E1A46 /* Assets.xcassets in Resources */,
 				E46E6CA51DD41F5D00AB7561 /* ZSSsuperscript.png in Resources */,
 				E4C24BC020844F3C00E426B0 /* 定位2.png in Resources */,
+				B1173A682488CD5B005075F0 /* IMConversationItemCell.xib in Resources */,
 				B197771D217D9D810019F3A8 /* beep.wav in Resources */,
 				E40E24C920B7DA3C009F8BE7 /* OOMeetingPersonTableViewCell.xib in Resources */,
 				E4B2321C20B3E94E0082F30A /* OOAttanceCheckinPromptView.xib in Resources */,
 				E4C24B6120844F3C00E426B0 /* addressCode in Resources */,
 				E4B697D920764A2D0062F6E8 /* myshareEditorByPerson.json in Resources */,
 				E457559D1E0BA72E00EC44F4 /* qrcode_scan_btn_flash_down@2x.png in Resources */,
+				B1489B1D248E0F4D009EE9FD /* IMChatViewController.xib in Resources */,
 				E4C24C1A20844F5200E426B0 /* emoticons.bundle in Resources */,
 				E4B888E11D9D48F1002E1A46 /* contacts.storyboard in Resources */,
 				E45755A51E0BA72E00EC44F4 /* qrcode_scan_light_green@2x.png in Resources */,
@@ -5476,6 +5592,7 @@
 				E46E6CB51DD41F5D00AB7561 /* jQuery.js in Resources */,
 				E46E6C801DD41F5D00AB7561 /* ZSSh6@2x.png in Resources */,
 				E46E6C971DD41F5D00AB7561 /* ZSSparagraph.png in Resources */,
+				B1489CAE2491FF13009EE9FD /* IMChatEmojiBarView.xib in Resources */,
 				E4B888E01D9D48F1002E1A46 /* apps.storyboard in Resources */,
 				E428AF6120AD4DCE00D964B9 /* OOAttanceCheckInController.xib in Resources */,
 				B165CD5D2242093500373B66 /* SourceSansPro-Regular.ttf in Resources */,
@@ -5497,6 +5614,7 @@
 				B165CD682242093500373B66 /* Montserrat-Regular.ttf in Resources */,
 				E41441DB1DCAC5D700E3DDA3 /* bbs.storyboard in Resources */,
 				E46E6C9B1DD41F5D00AB7561 /* ZSSquicklink.png in Resources */,
+				B1489CB22492045D009EE9FD /* IMChatEmojiItemCell.xib in Resources */,
 				E45755A91E0BA72E00EC44F4 /* qrcode_Scan_weixin_Line@2x.png in Resources */,
 				E4B697B920764A2D0062F6E8 /* buildlist.json in Resources */,
 				E4C24B4320844F3C00E426B0 /* defaultTheme.bundle in Resources */,
@@ -5504,6 +5622,7 @@
 				E46E6CAF1DD41F5D00AB7561 /* ZSSunlink.png in Resources */,
 				E40E24C320B7DA3C009F8BE7 /* OOMeetingInforItemCell.xib in Resources */,
 				E46E6C811DD41F5D00AB7561 /* ZSShorizontalrule.png in Resources */,
+				B1173B5E2489F48C005075F0 /* O2Emoji.bundle in Resources */,
 				E46E6C7F1DD41F5D00AB7561 /* ZSSh6.png in Resources */,
 				E46E6C9C1DD41F5D00AB7561 /* ZSSquicklink@2x.png in Resources */,
 				E46E6C901DD41F5D00AB7561 /* ZSSleftjustify@2x.png in Resources */,
@@ -5519,6 +5638,7 @@
 				E4B889071D9D4C7E002E1A46 /* podfile in Resources */,
 				E46E6C841DD41F5D00AB7561 /* ZSSimage@2x.png in Resources */,
 				E4B697012075DE5F0062F6E8 /* OOGuidePageController.xib in Resources */,
+				B1489BFF2490BE51009EE9FD /* IMChatMessageSendViewCell.xib in Resources */,
 				E4D23110209C40F600837868 /* OOPersonCollectionViewCell.xib in Resources */,
 				B167F7672362C60200F182B8 /* CloudFileMoveFolderCell.xib in Resources */,
 				E46E6CAD1DD41F5D00AB7561 /* ZSSundo.png in Resources */,
@@ -5529,6 +5649,7 @@
 				E46E6C6F1DD41F5D00AB7561 /* ZSSclearstyle.png in Resources */,
 				E46E6CB11DD41F5D00AB7561 /* ZSSunorderedlist.png in Resources */,
 				E40E246D20B68AF6009F8BE7 /* OOAttandanceTotalHeaderView.xib in Resources */,
+				B1489CB724935104009EE9FD /* IMInstantMessageViewController.xib in Resources */,
 				E4C24C1720844F5200E426B0 /* yh_image_no_picked@3x.png in Resources */,
 				E46E6C7E1DD41F5D00AB7561 /* ZSSh5@2x.png in Resources */,
 				E46E6C871DD41F5D00AB7561 /* ZSSindent.png in Resources */,
@@ -5630,6 +5751,7 @@
 				"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
 				"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
 				"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
+				"${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework",
 				"${BUILT_PRODUCTS_DIR}/SwiftValidator/SwiftValidator.framework",
 				"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
 				"${BUILT_PRODUCTS_DIR}/SwiftyTimer/SwiftyTimer.framework",
@@ -5672,6 +5794,7 @@
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftValidator.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyTimer.framework",
@@ -5849,6 +5972,7 @@
 				E4B888711D9D48F1002E1A46 /* ContactSearchViewController.swift in Sources */,
 				B130A7852281597000282AD1 /* DeviceManagerViewModel.swift in Sources */,
 				E40E24BF20B7DA3C009F8BE7 /* OOMeetingRoomDeviceListView.swift in Sources */,
+				B1173A632488C8EA005075F0 /* IMConversationInfo.swift in Sources */,
 				E4A748D51EC15EF100163F58 /* TaskAttachmentPreviewController.swift in Sources */,
 				E4B888A51D9D48F1002E1A46 /* MJRefreshBackStateFooter.m in Sources */,
 				E4B8885E1D9D48F1002E1A46 /* O2CollectionView.swift in Sources */,
@@ -5858,9 +5982,11 @@
 				E4D2310F209C40F600837868 /* OOPersonCollectionViewCell.swift in Sources */,
 				E4C24B4A20844F3C00E426B0 /* JCMessageImageCollectionViewCell.swift in Sources */,
 				E4C24B6920844F3C00E426B0 /* DLSlideView.m in Sources */,
+				B1173A672488CD5B005075F0 /* IMConversationItemCell.swift in Sources */,
 				B1534E3F21F712EA00CC8C35 /* O2DemoAlertView.swift in Sources */,
 				E4C24B7F20844F3C00E426B0 /* ImageFileCell.swift in Sources */,
 				B165CD602242093500373B66 /* AlertViewController.swift in Sources */,
+				B1173A5E2488C5DF005075F0 /* CommunicateAPI.swift in Sources */,
 				E441994A206C8A100050AE0C /* OORegisterTableView.swift in Sources */,
 				E40E24A920B7DA3C009F8BE7 /* OOMeetingCreateViewModel.swift in Sources */,
 				E40C41ED1E7F7C0D00568805 /* ZoneSubCategoryViewController.swift in Sources */,
@@ -5869,6 +5995,7 @@
 				E4CB27721E78D5B1004A7ACB /* UINavigationBar+Flat.swift in Sources */,
 				E45DA90C1DAF76C800E0735D /* SCommonViewController.swift in Sources */,
 				B108F401229E34D400778050 /* LBXScanWrapper.swift in Sources */,
+				B1489CB624935104009EE9FD /* IMInstantMessageViewController.swift in Sources */,
 				E40C41F21E83715C00568805 /* ZLUISearchBar.swift in Sources */,
 				E4B888791D9D48F1002E1A46 /* Person.swift in Sources */,
 				E4C24BA820844F3C00E426B0 /* JCChatViewController.swift in Sources */,
@@ -5896,6 +6023,7 @@
 				B1DE856623603408003C36E2 /* DispatchQueue+Extension.swift in Sources */,
 				E4B69772207630240062F6E8 /* String+Extenstion.swift in Sources */,
 				B175007A233C6908003DA7B9 /* BlockLongPress.swift in Sources */,
+				B1173A5B2488C546005075F0 /* IMConversationListViewController.swift in Sources */,
 				E4B69734207602A40062F6E8 /* OOAPIContext.swift in Sources */,
 				09E02E881F16319600579887 /* DiskFetcher.swift in Sources */,
 				E4C24B5520844F3C00E426B0 /* SAIToolboxInputView.swift in Sources */,
@@ -5903,6 +6031,7 @@
 				E4C24B5320844F3C00E426B0 /* SAIInputView.swift in Sources */,
 				E40E24CF20B7DA3C009F8BE7 /* OOFormDateItemView.swift in Sources */,
 				B1FBA01D230A3AB500A90722 /* O2JsApiBizUtil.swift in Sources */,
+				B1489B51248E192D009EE9FD /* IMChatMessageViewCell.swift in Sources */,
 				E4B69776207630240062F6E8 /* UIView+Extension.swift in Sources */,
 				E4C24BB420844F3C00E426B0 /* JCMessageContentViewType.swift in Sources */,
 				E4C24B9420844F3C00E426B0 /* JCGroupSettingCell.swift in Sources */,
@@ -5959,6 +6088,7 @@
 				B1FBA01A230533FA00A90722 /* PersonPickerTableViewCell.swift in Sources */,
 				E4B6981A2079A8BB0062F6E8 /* OOBindNodeViewController.swift in Sources */,
 				E4F4544F20902263002FBC32 /* OOConfigInfoModels.swift in Sources */,
+				B1489CB12492045D009EE9FD /* IMChatEmojiItemCell.swift in Sources */,
 				E4B2321A20B3E9440082F30A /* OOAttanceCheckinPromptView.swift in Sources */,
 				E4B69810207652960062F6E8 /* OOTaskModels.swift in Sources */,
 				E4B888761D9D48F1002E1A46 /* DepartmentDuty.swift in Sources */,
@@ -5973,6 +6103,7 @@
 				E4C24BD120844F3C00E426B0 /* JCNoteNameViewController.swift in Sources */,
 				B1B110E2223622C400775BEF /* O2BioLocalAuth.swift in Sources */,
 				E4184B231DB4B29B00FCC907 /* SPasswordChangeViewController.swift in Sources */,
+				B1489C7B2491FEFE009EE9FD /* IMChatEmojiBarView.swift in Sources */,
 				E4B7816C1DF8F2B2007B58A9 /* CMSData.swift in Sources */,
 				B165CD592242093500373B66 /* PresentrController.swift in Sources */,
 				E4B7816D1DF8F2B2007B58A9 /* CMSWrapOutCategoryList.swift in Sources */,
@@ -6004,6 +6135,7 @@
 				B1EE2CCE2281729400842F48 /* QDatePicker.swift in Sources */,
 				E4B6975C20762EA00062F6E8 /* OOUIDownButtonTextField.swift in Sources */,
 				E4C24C0720844F4400E426B0 /* JCSearchFriendViewController.swift in Sources */,
+				B1173A602488C82F005075F0 /* IMViewModel.swift in Sources */,
 				E46E6CBB1DD41F5D00AB7561 /* HRBrightnessCursor.m in Sources */,
 				E4B697E920764A2D0062F6E8 /* OOWorkAPI.swift in Sources */,
 				E40E24C720B7DA3C009F8BE7 /* OOFormSegueItemView.swift in Sources */,
@@ -6215,6 +6347,7 @@
 				E40502C520722208009A8D30 /* ImagePickerController.swift in Sources */,
 				E4C24B7320844F3C00E426B0 /* JCCEmoticonGroup.swift in Sources */,
 				E4C24BB720844F3C00E426B0 /* JCEmoticonPreviewer.swift in Sources */,
+				8840A992248CDC9D005970A5 /* OOCalendarEditRemarkViewController.swift in Sources */,
 				B12FD1DC2283D5B700E636BA /* ThemeScrollViewIndicatorStylePicker.swift in Sources */,
 				B12FD1DD2283D5B700E636BA /* UITextField+PlaceholderAttributes.swift in Sources */,
 				E4C24B3920844F3C00E426B0 /* Array+JChat.swift in Sources */,
@@ -6282,6 +6415,7 @@
 				E4B888A41D9D48F1002E1A46 /* MJRefreshBackNormalFooter.m in Sources */,
 				E4B2320F20B2A9F60082F30A /* OOAttandanceWorkPlaceController.swift in Sources */,
 				E46E6CB91DD41F5D00AB7561 /* CYRTextView.m in Sources */,
+				B1489B1C248E0F4D009EE9FD /* IMChatViewController.swift in Sources */,
 				B175007C233C6908003DA7B9 /* BlockTap.swift in Sources */,
 				E4C24B5020844F3C00E426B0 /* SAIInputAccessoryViewLayout.swift in Sources */,
 				E4AA17151EE158E70030D9AB /* LogListViewController.swift in Sources */,
@@ -6371,6 +6505,7 @@
 				E4C24B8D20844F3C00E426B0 /* JCMessageLocationContentView.swift in Sources */,
 				E4CDB8851E7CFB9C008E788D /* ZLNormalNavViewController.swift in Sources */,
 				B1DA305F2282754500669418 /* QCalendarPicker.swift in Sources */,
+				B14E0C0C2484F1F0008AF6AE /* O2WebsocketManager.swift in Sources */,
 				E46E6CBC1DD41F5D00AB7561 /* HRCgUtil.m in Sources */,
 				E496E89E207314B100C68EEE /* NavView.swift in Sources */,
 				E4C24BD720844F3C00E426B0 /* JCMyInfoViewController.swift in Sources */,
@@ -6395,6 +6530,7 @@
 				E4C24BD920844F3C00E426B0 /* JCFeedbackViewController.swift in Sources */,
 				E4C24C4C208D7EDE00E426B0 /* OOCDLCell.swift in Sources */,
 				B158E95E215DD3F500AB2727 /* AIConstants.swift in Sources */,
+				B1489BFE2490BE51009EE9FD /* IMChatMessageSendViewCell.swift in Sources */,
 				E4BF45D71E74FB0C008B52F0 /* ImageSlidesShowView.swift in Sources */,
 				E4C24B5820844F3C00E426B0 /* SAIInputItem.swift in Sources */,
 				E40E24DF20B7E66E009F8BE7 /* O2BBSCreatorView.swift in Sources */,
@@ -6417,6 +6553,7 @@
 				E4C24B8C20844F3C00E426B0 /* JCMessageNoticeContentView.swift in Sources */,
 				E4C24C3E208D7EDE00E426B0 /* OOContactViewModel.swift in Sources */,
 				E4D2312E20A29E7500837868 /* OOAppMainCollectionHeaderView.swift in Sources */,
+				B1173A6A2488D4AD005075F0 /* O2IM.swift in Sources */,
 				E4C24B5220844F3C00E426B0 /* SAIToolboxItemView.swift in Sources */,
 				E4C24B3C20844F3C00E426B0 /* Date+JChat.swift in Sources */,
 				E4C24C0120844F4400E426B0 /* JCUserInfoCell.swift in Sources */,

+ 62 - 0
o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarEditRemarkViewController.swift

@@ -0,0 +1,62 @@
+//
+//  OOCalendarEditRemarkViewController.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/11.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+import UIKit
+
+protocol ContentEditBackDelegate {
+    func backEditContent(contentHtml:String)
+}
+class OOCalendarEditRemarkViewController: ZSSRichTextEditor {
+    var contentHTML:String?
+       
+    var backDelegate:ContentEditBackDelegate?
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        
+        //self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "保存", style: .plain, target: self, action: #selector(tapSave))
+        self.navigationItem.title = "编辑内容"
+        
+        if let content = contentHTML {
+                   self.setHTML(content)
+               }
+        // Do any additional setup after loading the view.
+    }
+    
+
+    @IBAction func save(_ sender: Any) {
+        self.dismiss(animated: true) {
+            ()-> Void in
+            print("save.....")
+             let dataDict = ["contentHtml" : self.getHTML()]
+            NotificationCenter.default.post(name:Notification.Name(rawValue: "RegisterCompletionNotification"),object:nil,userInfo:dataDict)
+        }
+    }
+    
+    
+    @IBAction func cancel(_ sender: Any) {
+        self.dismiss(animated: true, completion: {print("cancel....")})
+    }
+    
+    
+    func tapSave(){
+        print("dddd");
+        
+        
+    }
+    
+    
+    /*
+    // MARK: - Navigation
+
+    // In a storyboard-based application, you will often want to do a little preparation before navigation
+    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+        // Get the new view controller using segue.destination.
+        // Pass the selected object to the new view controller.
+    }
+    */
+
+}

+ 33 - 8
o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarEventViewController.swift

@@ -9,6 +9,7 @@
 import UIKit
 import CocoaLumberjack
 import O2OA_Auth_SDK
+import WebKit
 
 
 struct Options {
@@ -88,11 +89,14 @@ class OOCalendarEventViewController: UITableViewController {
     @IBOutlet weak var evenEndTimeStackView: UIStackView!
     @IBOutlet weak var eventColorStackView: UIStackView!
     @IBOutlet weak var weekDaysStackView: UIStackView!
-    @IBOutlet weak var eventRemark: UITextField!
+//    @IBOutlet weak var eventRemark: UITextField!
+    var eventRemark:String = ""
     @IBOutlet weak var untilDateLabel: UILabel!
     @IBOutlet weak var untilDateStackView: UIStackView!
     @IBOutlet weak var deleteBtn: UIButton!
     
+    @IBOutlet weak var webRemark: UIWebView!
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         if eventInfo != nil && eventInfo?.id != nil {
@@ -124,8 +128,8 @@ class OOCalendarEventViewController: UITableViewController {
         //隐藏输入法
         eventTitle.delegate = self
         eventTitle.returnKeyType = .done
-        eventRemark.delegate = self
-        eventRemark.returnKeyType = .done
+//        eventRemark.delegate = self
+//        eventRemark.returnKeyType = .done
         
         eventStartTime.text = Date().toString("yyyy-MM-dd HH:mm")
         eventEndTime.text = Date().add(component: .hour, value: 1).toString("yyyy-MM-dd HH:mm")
@@ -181,7 +185,7 @@ class OOCalendarEventViewController: UITableViewController {
             }
         })
         viewModel.getMyCalendarList().then { (calendars) in
-            self.calendarList = calendars.myCalendars ?? []
+            self.calendarList = (calendars.myCalendars ?? []) + (calendars.unitCalendars ?? [])
             self.calendarPickerView.reloadAllComponents()
             //初始化颜色
             if !self.calendarList.isEmpty {
@@ -201,8 +205,21 @@ class OOCalendarEventViewController: UITableViewController {
         }.catch { (error) in
             DDLogError(error.localizedDescription)
         }
+        
+        NotificationCenter.default.addObserver(self, selector: #selector(registerCompletion), name: Notification.Name(rawValue:"RegisterCompletionNotification"),
+                                                             object: nil)
+
+    }
+
+    @objc func registerCompletion(notification:Notification){
+        let theData = notification.userInfo!
+        let contentHtml = theData["contentHtml"] as! String
+        print("contentHtml =" , contentHtml)
+        self.eventRemark = contentHtml
+        self.webRemark.loadHTMLString(contentHtml == nil ? "" : contentHtml, baseURL: nil)
     }
 
+    
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
         // Dispose of any resources that can be recreated.
@@ -210,7 +227,10 @@ class OOCalendarEventViewController: UITableViewController {
     }
     
      override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
-        
+        let navVC = segue.destination as! ZLNavigationController
+        let destVC = navVC.topViewController as! OOCalendarEditRemarkViewController
+         print(self.eventRemark)
+        destVC.contentHTML = self.eventRemark
     }
     
     
@@ -336,7 +356,8 @@ class OOCalendarEventViewController: UITableViewController {
                 return
             }
             let allday = eventAllDaySwitch.isOn
-            let remark = eventRemark.text ?? ""
+            //let remark = eventRemark.text ?? ""
+            let remark = eventRemark
             let startTime = eventStartTime.text ?? ""
             let endTime = eventEndTime.text ?? ""
            
@@ -384,7 +405,8 @@ class OOCalendarEventViewController: UITableViewController {
             return
         }
         let allday = eventAllDaySwitch.isOn
-        let remark = eventRemark.text ?? ""
+        // remark = eventRemark.text ?? ""
+        let remark = eventRemark
         let startTime = eventStartTime.text ?? ""
         let endTime = eventEndTime.text ?? ""
         let start = allday ? Date.date(startTime, formatter: "yyyy-MM-dd") : Date.date(startTime, formatter: "yyyy-MM-dd HH:mm")
@@ -550,7 +572,10 @@ class OOCalendarEventViewController: UITableViewController {
                 self.repeatPickerView.selectRow(index, inComponent: 0, animated: true)
             }
         }
-        eventRemark.text = eventInfo?.comment
+        // eventRemark.text = eventInfo?.comment
+         eventRemark = eventInfo?.comment as! String
+         self.webRemark.loadHTMLString(eventRemark == nil ? "" : eventRemark, baseURL: nil)
+
     }
     
     private func rruleDecode(rrule: String) {

+ 11 - 0
o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarLeftMenuController.swift

@@ -120,6 +120,10 @@ class OOCalendarLeftMenuController: UITableViewController {
         if indexPath.section == 0 {
             self.performSegue(withIdentifier: "showCalendarSegue", sender: "update")
         }
+        
+        if indexPath.section == 1 {
+            self.performSegue(withIdentifier: "showCalendarSegue", sender: "updateDept")
+        }
         tableView.deselectRow(at: indexPath, animated: false)
     }
 
@@ -137,6 +141,13 @@ class OOCalendarLeftMenuController: UITableViewController {
                     let row  = tableView.indexPathForSelectedRow!.row
                     cc.calendarInfo = self.myCalendarList[row]
                 }
+                
+                if type == "updateDept"{
+                    let cc = segue.destination as! OOCalendarViewController
+                    let row  = tableView.indexPathForSelectedRow!.row
+                    cc.calendarInfo = self.departmentCalendarList[row]
+                }
+
             }
         }
     }

+ 405 - 54
o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarViewController.swift

@@ -18,18 +18,83 @@ class OOCalendarViewController: UITableViewController {
     }()
     var calendarInfo: OOCalendarInfo?
     private var colorValue = "#428ffc"
+    private var count = 0
 
-    // MARK: - IB
-    @IBOutlet weak var calendarNameField: UITextField!
-    @IBOutlet weak var calendarIsOpenSwitch: UISwitch!
-    @IBOutlet weak var calendarColorStackView: UIStackView!
-    @IBOutlet weak var calendarRemarkField: UITextField!
-    @IBOutlet weak var calendarDeleteBtn: UIButton!
-    @IBAction func deleteBtnTap(_ sender: UIButton) {
-        showDefaultConfirm(title: "删除日历", message: "确定要删除当前日历吗,会同时删除该日历下的日程事件?") { (action) in
-            self.deleteCalendar()
-        }
+    override func numberOfSections(in tableView: UITableView) -> Int {
+       // #warning Incomplete implementation, return the number of sections
+       return 3
+    }
+
+    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+       // #warning Incomplete implementation, return the number of rows
+           if  section == 0 {
+                return 5
+            }else if section == 1 {
+                return count
+            }else{
+                return 1
+            }
     }
+
+
+    // MARK: - IB
+      @IBOutlet weak var calendarNameField: UITextField!
+      @IBOutlet weak var calendarIsOpenSwitch: UISwitch!
+      @IBOutlet weak var calendarColorStackView: UIStackView!
+      @IBOutlet weak var calendarRemarkField: UITextField!
+      @IBOutlet weak var calendarDeleteBtn: UIButton!
+      
+    
+      @IBOutlet weak var calendarTypeField: UITextField!
+      @IBOutlet weak var calendarOrgField: UITextField!
+      @IBOutlet weak var calendarManagerField: UITextField!
+      @IBOutlet weak var calendarScopeField: UITextField!
+      @IBOutlet weak var calendarNewScopeField: UITextField!
+      
+      @IBOutlet weak var calendarStatusSwitch: UISwitch!
+      
+      @IBOutlet weak var calendarIsOpenBtn: UIButton!
+      
+      @IBAction func editRemarkBtn(_ sender: Any) {
+            self.performSegue(withIdentifier: "ShowEditRemark", sender: nil)
+      }
+      
+
+      
+      
+      @IBAction func deleteBtnTap(_ sender: UIButton) {
+          showDefaultConfirm(title: "删除日历", message: "确定要删除当前日历吗,会同时删除该日历下的日程事件?") { (action) in
+              self.deleteCalendar()
+          }
+      }
+      
+      //选择是否公开
+      @IBAction func selectType(_ sender: Any) {
+          let alertController = UIAlertController(title: "请选择类型", message: "",preferredStyle:.actionSheet)
+          var selectStyle = UIAlertAction.Style.default
+          selectStyle = (calendarTypeField.text == "个人日历") ?  UIAlertAction.Style.default:UIAlertAction.Style.destructive
+          let personAction = UIAlertAction(title: "个人日历", style:selectStyle, handler: {action in
+          self.calendarTypeField.text =  action.title
+          self.count = 0
+          let section = NSIndexSet(index: 1)
+          self.tableView.beginUpdates()
+          self.tableView.reloadSections(section as IndexSet, with: .automatic)
+          self.tableView.endUpdates()
+         })
+          selectStyle = (calendarTypeField.text == "组织日历") ? UIAlertAction.Style.default:UIAlertAction.Style.destructive
+         let orgAction = UIAlertAction(title: "组织日历", style: selectStyle, handler: {action in
+              self.calendarTypeField.text = action.title
+              self.count = 4
+              let section = NSIndexSet(index: 1)
+              self.tableView.beginUpdates()
+              self.tableView.reloadSections(section as IndexSet, with: .automatic)
+              self.tableView.endUpdates()
+         })
+         alertController.addAction(personAction)
+         alertController.addAction(orgAction)
+         self.present(alertController, animated: true, completion: nil)
+      }
+
     
     
     override func viewDidLoad() {
@@ -47,18 +112,26 @@ class OOCalendarViewController: UITableViewController {
             loadCalendarInfoFromNet()
             calendarDeleteBtn.isHidden = false
         }else {
+            self.calendarInfo = OOCalendarInfo.init()
             calendarDeleteBtn.isHidden = true
         }
+
         
         //隐藏输入法
         calendarNameField.delegate = self
         calendarNameField.returnKeyType = .done
+        
+        calendarTypeField.delegate = self
+        calendarTypeField.returnKeyType = .done
+        
         calendarRemarkField.delegate = self
         calendarRemarkField.returnKeyType = .done
+        
         calendarColorStackView?.subviews.forEach({ (colorView) in
             colorView.isUserInteractionEnabled = true
             colorView.addGestureRecognizer(UITapGestureRecognizer(target: self, action:#selector(tapColorView)))
         })
+
     }
 
     override func didReceiveMemoryWarning() {
@@ -74,38 +147,61 @@ class OOCalendarViewController: UITableViewController {
     
     @objc func tapSave() {
         hideKeyboard()
-        let name = calendarNameField.text
-        let isopen = calendarIsOpenSwitch.isOn
-        let type = "PERSON"
-        let remark = calendarRemarkField.text
-        if name == nil || name == "" {
-            showError(title: "日历名称不能为空!")
-            return
-        }
-        MBProgressHUD_JChat.showMessage(message: "正在保存...", toView: self.view)
-        let calendar = OOCalendarInfo.init()
-        calendar.name = name
-        calendar.isPublic = isopen
-        if let account = O2AuthSDK.shared.myInfo() {
-           calendar.target = account.distinguishedName
-        }
-        calendar.color = colorValue
-        calendar.type = type
-        calendar.desc = remark ?? ""
-        
-        if calendarInfo != nil && calendarInfo?.id != nil { // 修改
-            calendar.id = calendarInfo?.id!
-        }
-        viewModel.saveCalendar(calendar: calendar)
-            .then { (result) in
-                DDLogInfo("保存日历成功!!!\(result)")
-                self.closeWindow()
-            }.always{
-                MBProgressHUD_JChat.hide(forView: self.view, animated: false)
-            }.catch { (error) in
-                DDLogError(error.localizedDescription)
-                self.showError(title: "保存日历错误!")
-        }
+      let name = calendarNameField.text
+      let isopen = calendarIsOpenSwitch.isOn
+      
+      var type = "PERSON"
+      if let typeValue = calendarTypeField.text{
+          if typeValue == "个人日历" {
+               type = "PERSON"
+          }else{
+               type = "UNIT"
+          }
+      }
+      let remark = calendarRemarkField.text
+      if name == nil || name == "" {
+          showError(title: "日历名称不能为空!")
+          return
+      }
+      
+      MBProgressHUD_JChat.showMessage(message: "正在保存...", toView: self.view)
+      /*
+      var calendar = self.calendarInfo
+      if calendarInfo != nil && calendarInfo?.id != nil { // 修改
+          //calendar.id = calendarInfo?.id!
+          calendar = calendarInfo ?? OOCalendarInfo.init()
+      }*/
+      
+      self.calendarInfo!.name = name
+      self.calendarInfo!.isPublic = isopen
+      
+      if type == "PERSON" {
+          if let account = O2AuthSDK.shared.myInfo() {
+              self.calendarInfo!.target = account.distinguishedName
+          }
+      }
+      self.calendarInfo!.color = colorValue
+      self.calendarInfo!.type = type
+      self.calendarInfo!.desc = remark ?? ""
+      
+     // calendar.status=="OPEN",
+      if calendarStatusSwitch.isOn {
+          self.calendarInfo!.status = "OPEN"
+      }else{
+          self.calendarInfo!.status = "CLOSE"
+      }
+    
+     viewModel.saveCalendar(calendar: self.calendarInfo!)
+          .then { (result) in
+              DDLogInfo("保存日历成功!!!\(result)")
+              self.closeWindow()
+          }.always{
+              MBProgressHUD_JChat.hide(forView: self.view, animated: false)
+          }.catch { (error) in
+              DDLogError(error.localizedDescription)
+              self.showError(title: "保存日历错误!")
+      }
+
     }
     private func deleteCalendar() {
         MBProgressHUD_JChat.showMessage(message: "正在删除...", toView: self.view)
@@ -137,7 +233,205 @@ class OOCalendarViewController: UITableViewController {
             }
         }
     }
+    //选择所属组织
+    @IBAction func selectOrg(_ sender: Any) {
+        let  arrModes = [ContactPickerType.unit]
+        showContactPicker(modes: arrModes, callback: {
+            (O2BizContactPickerResult) in
+            if let depts = O2BizContactPickerResult.departments {
+                var allDept = ""
+                var target = ""
+                for dept in depts{
+                    if allDept == "" {
+                        allDept = dept.name ?? ""
+                    }else{
+                        allDept = allDept + "," + ( dept.name ??  "" )
+                    }
+                    target = dept.distinguishedName ?? ""
+                }
+                
+                self.calendarOrgField.text = allDept
+                self.calendarInfo?.target = target
+            }
+        })
+    }
+    //选择管理者
+    @IBAction func selectManager(_ sender: Any) {
+        let  arrModes = [ContactPickerType.person]
+             showContactPicker(modes: arrModes, callback: {
+                 (O2BizContactPickerResult) in
+                if let users = O2BizContactPickerResult.users {
+                     var allUser = ""
+                     var manageablePersonList = [String]()
+                     for user in users{
+                         if allUser == "" {
+                             allUser = user.name ?? ""
+                         }else{
+                             allUser = allUser + "," + ( user.name ??  "" )
+                             
+                         }
+                        if let distinguishedName = user.distinguishedName{
+                               manageablePersonList.append(distinguishedName)
+                           }
+                     }
+                    self.calendarManagerField.text = allUser
+                    self.calendarInfo?.manageablePersonList = manageablePersonList
+                 }
+             })
+      }
+    
+
+    //选择可见范围
+    @IBAction func selectScope(_ sender: Any) {
+        var allUser = ""
+        var allDept = ""
+        var allGroup = ""
+        var all = ""
+        var viewablePersonList = [String]()
+        var viewableUnitList = [String]()
+        var viewableGroupList = [String]()
+        let  arrModes = [ContactPickerType.person,ContactPickerType.unit,ContactPickerType.group]
+        showContactPicker(modes: arrModes, callback: {
+            (O2BizContactPickerResult) in
+           if let users = O2BizContactPickerResult.users {
+                for user in users{
+                    if allUser == "" {
+                        allUser = user.name ?? ""
+                    }else{
+                        allUser = allUser + "," + ( user.name ??  "" )
+                    }
+                   if let distinguishedName = user.distinguishedName{
+                        viewablePersonList.append(distinguishedName)
+                    }
+                }
+              all = allUser
+            }
+            
+            if let depts = O2BizContactPickerResult.departments {
+                for dept in depts{
+                    if allDept == "" {
+                        allDept = dept.name ?? ""
+                    }else{
+                        allDept = allDept + "," + ( dept.name ??  "" )
+                    }
+                    
+                  if let distinguishedName = dept.distinguishedName{
+                        viewableUnitList.append(distinguishedName)
+                  }
+                    
+                }
+                if "" == all {
+                    all =  allDept
+                 }else{
+                    if "" != allDept {
+                      all = all + "," + allDept
+                    }
+                }
+            }
+            
+            if let groups = O2BizContactPickerResult.groups {
+                 for group in groups{
+                     if allGroup == "" {
+                         allGroup = group.name ?? ""
+                     }else{
+                         allGroup = allGroup + "," + (group.name ??  "" )
+                     }
+                    
+                    if let distinguishedName = group.distinguishedName{
+                          viewableGroupList.append(distinguishedName)
+                     }
+                 }
+                  if "" == all {
+                       all =  allGroup
+                    }else{
+                      if "" != allGroup {
+                         all = all + "," + allGroup
+                       }
+                    }
+                }
+            
+            self.calendarScopeField.text = all
+            self.calendarInfo?.viewablePersonList = viewablePersonList
+            self.calendarInfo?.viewableUnitList = viewableUnitList
+            self.calendarInfo?.viewableGroupList = viewableGroupList
+        })
+    }
     
+    //可新建范围
+    @IBAction func selectNewScope(_ sender: Any) {
+             var allUser = ""
+             var allDept = ""
+             var allGroup = ""
+             var all = ""
+             var publishablePersonList = [String]()
+             var publishableGroupList = [String]()
+             var publishableUnitList = [String]()
+             let  arrModes = [ContactPickerType.person,ContactPickerType.unit,ContactPickerType.group]
+             showContactPicker(modes: arrModes, callback: {
+                 (O2BizContactPickerResult) in
+                if let users = O2BizContactPickerResult.users {
+                     for user in users{
+                         if allUser == "" {
+                             allUser = user.name ?? ""
+                         }else{
+                             allUser = allUser + "," + ( user.name ??  "" )
+                        }
+                        
+                        if let distinguishedName = user.distinguishedName{
+                              publishablePersonList.append(distinguishedName)
+                        }
+                     }
+                   all = allUser
+                 }
+                 
+                 if let depts = O2BizContactPickerResult.departments {
+                     for dept in depts{
+                         if allDept == "" {
+                             allDept = dept.name ?? ""
+                         }else{
+                             allDept = allDept + "," + ( dept.name ??  "" )
+                         }
+                        
+                        if let distinguishedName = dept.distinguishedName{
+                              publishableUnitList.append(distinguishedName)
+                        }
+                     }
+                     if "" == all {
+                         all =  allDept
+                      }else{
+                        if "" != allDept {
+                          all = all + "," + allDept
+                        }
+                     }
+                 }
+                 
+                 if let groups = O2BizContactPickerResult.groups {
+                      for group in groups{
+                          if allGroup == "" {
+                              allGroup = group.name ?? ""
+                          }else{
+                              allGroup = allGroup + "," + (group.name ??  "" )
+                          }
+                        
+                        if let distinguishedName = group.distinguishedName{
+                              publishableGroupList.append(distinguishedName)
+                         }
+                      }
+                       if "" == all {
+                            all =  allGroup
+                         }else{
+                            if "" != allGroup{
+                               all = all + "," + allGroup
+                            }
+                         }
+                     }
+                self.calendarNewScopeField.text = all
+                self.calendarInfo?.publishablePersonList = publishablePersonList
+                self.calendarInfo?.publishableUnitList = publishableUnitList
+                self.calendarInfo?.publishableGroupList = publishableGroupList
+             })
+    }
+
     
     private func loadCalendarInfoFromNet() {
         viewModel.getCalendar(id: (calendarInfo?.id)!)
@@ -147,18 +441,60 @@ class OOCalendarViewController: UITableViewController {
                 DDLogError("查询日历信息出错,\(error.localizedDescription)")
         }
     }
+    
     private func updateStuffValue(calendar: OOCalendarInfo) {
-        calendarNameField.text = calendar.name
-        calendarIsOpenSwitch.setOn(calendar.isPublic == true, animated: true)
-        if let color = calendar.color {
-            if let index = colorOptions.index(where: { (colorItem) -> Bool in
-                return colorItem == color
-            }) {
-                self.selectColorView(tag: index)
-            }
-        }
-        calendarRemarkField.text = calendar.desc
-    }
+          calendarNameField.text = calendar.name
+    
+          if calendar.type == "UNIT" {
+              self.count = 4;
+          }else{
+              self.count = 0;
+          }
+          let section = NSIndexSet(index: 1)
+          self.tableView.beginUpdates()
+          self.tableView.reloadSections(section as IndexSet, with: .automatic)
+          self.tableView.endUpdates()
+          //所属组织
+          calendarOrgField.text = calendar.target?.getChinaName()
+          //管理员
+          calendarManagerField.text = calendar.manageablePersonList?.getChinaName().joined(separator: ",")
+          
+          //可见范围
+         var viewablePersonList = [String]()
+          viewablePersonList += calendar.viewablePersonList ?? []
+          viewablePersonList += calendar.viewableUnitList ?? []
+          viewablePersonList += calendar.viewableGroupList ?? []
+          calendarScopeField.text = viewablePersonList.getChinaName().joined(separator: ",")
+          
+          //可新建范围
+          var publishableList = [String]()
+          publishableList += calendar.publishablePersonList ?? []
+          publishableList += calendar.publishableGroupList ?? []
+          publishableList += calendar.publishableUnitList ?? []
+          calendarNewScopeField.text = publishableList.getChinaName().joined(separator: ",")
+          
+          if calendar.type == "PERSON" {
+               calendarTypeField.text = "个人日历"
+          }else{
+               calendarTypeField.text = "组织日历"
+          }
+         
+          calendarStatusSwitch.setOn(calendar.status=="OPEN", animated: true)
+          calendarIsOpenSwitch.setOn(calendar.isPublic == true, animated: true)
+          //隐藏类型选择按钮
+          calendarIsOpenBtn.isHidden = true
+          
+          if let color = calendar.color {
+              if let index = colorOptions.index(where: { (colorItem) -> Bool in
+                  return colorItem == color
+              }) {
+                  self.selectColorView(tag: index)
+              }
+          }
+          
+          calendarRemarkField.text = calendar.desc
+      }
+
     
 
     
@@ -188,7 +524,22 @@ class OOCalendarViewController: UITableViewController {
 }
 
 extension OOCalendarViewController: UITextFieldDelegate {
+    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool{
+        if let Identifier = textField.accessibilityIdentifier{
+            if Identifier == "calendarType" {
+                return false
+            } else{
+                return true
+            }
+        }else{
+            return true
+        }
+    }
     func textFieldShouldReturn(_ textField: UITextField) -> Bool {
-        return textField.resignFirstResponder()
+        //return textField.resignFirstResponder()
+        let res = textField.resignFirstResponder()
+        return  false
+      
     }
+
 }

+ 12 - 0
o2ios/O2Platform/App/Calendar-日程管理/Model/OOCalendarModels.swift

@@ -23,6 +23,18 @@ class OOCalendarInfo: NSObject, DataModel {
     @objc var status: String?
     @objc var createor: String?
     
+    // @objc var publishable:Bool?
+    @objc var source:String?
+    @objc var manageablePersonList:[String]?
+    @objc var followers:[String]?
+    @objc var viewablePersonList:[String]?
+    @objc var viewableUnitList:[String]?
+    @objc var viewableGroupList:[String]?
+    @objc var publishablePersonList:[String]?
+    @objc var publishableUnitList:[String]?
+    @objc var publishableGroupList:[String]?
+
+    
     required override init(){}
     
     func mapping(mapper: HelpingMapper) {

+ 1428 - 1209
o2ios/O2Platform/App/Calendar-日程管理/calendar.storyboard

@@ -1,1219 +1,1438 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="tKt-3P-uQz">
-    <device id="retina4_7" orientation="portrait">
-        <adaptation id="fullscreen"/>
-    </device>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
-        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--Calendar Main Month View Controller-->
-        <scene sceneID="g48-mo-Kla">
-            <objects>
-                <viewController id="xYY-yG-JGa" customClass="OOCalendarMainMonthViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="QKO-bs-p7W">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="KJj-zi-dZB">
-                                <rect key="frame" x="0.0" y="64" width="375" height="563"/>
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="CalendarEventCell" id="n53-PB-sk0" customClass="CalendarEventTableViewCell" customModule="O2Platform" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="28" width="375" height="44"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="monthCalendarContent" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="n53-PB-sk0" id="lyc-3f-O6N">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JXL-RY-KpG">
-                                                    <rect key="frame" x="18" y="13" width="18" height="18"/>
-                                                    <color key="backgroundColor" red="0.29803921570000003" green="0.68627450980000004" blue="0.31372549020000001" alpha="1" colorSpace="calibratedRGB"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="18" id="9R9-Im-fh5"/>
-                                                        <constraint firstAttribute="height" constant="18" id="bNg-p4-EmP"/>
-                                                    </constraints>
-                                                </view>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="这里是内容" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YuP-80-oar">
-                                                    <rect key="frame" x="44" y="11.5" width="263" height="20.5"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
-                                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="2ui-5h-ZC7">
-                                                    <rect key="frame" x="315" y="5" width="42" height="34"/>
-                                                    <subviews>
-                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="les-0j-Mxf" userLabel="Event StartTime">
-                                                            <rect key="frame" x="5" y="0.0" width="32" height="14.5"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            <nil key="highlightedColor"/>
-                                                        </label>
-                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jIB-o0-arB" userLabel="Event EndTime">
-                                                            <rect key="frame" x="5" y="19.5" width="32" height="14.5"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            <nil key="highlightedColor"/>
-                                                        </label>
-                                                    </subviews>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="42" id="r9t-sb-ycD"/>
-                                                    </constraints>
-                                                </stackView>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KIV-kE-cmY" userLabel="Event AllDay">
-                                                    <rect key="frame" x="326" y="13" width="31" height="18"/>
-                                                    <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
-                                                    <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="2ui-5h-ZC7" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="1JL-Dp-A6W"/>
-                                                <constraint firstItem="JXL-RY-KpG" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="Ibd-e8-GXJ"/>
-                                                <constraint firstItem="YuP-80-oar" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="QdU-mY-k9o"/>
-                                                <constraint firstItem="2ui-5h-ZC7" firstAttribute="leading" secondItem="YuP-80-oar" secondAttribute="trailing" constant="8" id="V6b-cg-chx"/>
-                                                <constraint firstItem="JXL-RY-KpG" firstAttribute="leading" secondItem="lyc-3f-O6N" secondAttribute="leading" constant="18" id="dSx-3I-cxQ"/>
-                                                <constraint firstAttribute="trailing" secondItem="2ui-5h-ZC7" secondAttribute="trailing" constant="18" id="fwY-HU-g8c"/>
-                                                <constraint firstItem="YuP-80-oar" firstAttribute="leading" secondItem="JXL-RY-KpG" secondAttribute="trailing" constant="8" id="kgr-jn-t9O"/>
-                                                <constraint firstAttribute="trailing" secondItem="KIV-kE-cmY" secondAttribute="trailing" constant="18" id="mam-ns-u2j"/>
-                                                <constraint firstItem="KIV-kE-cmY" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="rH1-jv-JMV"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                        <connections>
-                                            <outlet property="eventAllDay" destination="KIV-kE-cmY" id="34j-Xs-8z2"/>
-                                            <outlet property="eventColorView" destination="JXL-RY-KpG" id="FzI-2i-OMO"/>
-                                            <outlet property="eventEndTime" destination="jIB-o0-arB" id="TDp-Ag-gq3"/>
-                                            <outlet property="eventStartTime" destination="les-0j-Mxf" id="eJA-Fg-C5K"/>
-                                            <outlet property="eventTimeStack" destination="2ui-5h-ZC7" id="RcE-jB-uZq"/>
-                                            <outlet property="eventTitleView" destination="YuP-80-oar" id="GaE-LI-V7N"/>
-                                            <segue destination="Vxk-45-vB1" kind="show" identifier="showEventDetail" id="VOH-7P-zaY"/>
-                                        </connections>
-                                    </tableViewCell>
-                                </prototypes>
-                            </tableView>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M0F-7m-vuY" userLabel="BottomBar">
-                                <rect key="frame" x="0.0" y="627" width="375" height="40"/>
-                                <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wt1-wW-6mZ">
-                                        <rect key="frame" x="16" y="3.5" width="35" height="33"/>
-                                        <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
-                                        <state key="normal" title="今天"/>
-                                        <connections>
-                                            <action selector="todayAction:" destination="xYY-yG-JGa" eventType="touchUpInside" id="Wd8-Ne-Gwr"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="71T-qf-T8Z">
-                                        <rect key="frame" x="324" y="4" width="35" height="33"/>
-                                        <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
-                                        <state key="normal" title="日历"/>
-                                        <connections>
-                                            <segue destination="L5W-fh-UuH" kind="show" id="DF4-xt-Rlu"/>
-                                        </connections>
-                                    </button>
-                                </subviews>
-                                <color key="backgroundColor" red="0.97647058823529409" green="0.97647058823529409" blue="0.97647058823529409" alpha="1" colorSpace="calibratedRGB"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="40" id="EPO-5J-aQ8"/>
-                                    <constraint firstItem="wt1-wW-6mZ" firstAttribute="leading" secondItem="M0F-7m-vuY" secondAttribute="leading" constant="16" id="aoT-z2-Iuk"/>
-                                    <constraint firstAttribute="trailing" secondItem="71T-qf-T8Z" secondAttribute="trailing" constant="16" id="bQo-4L-Bhv"/>
-                                    <constraint firstItem="wt1-wW-6mZ" firstAttribute="centerY" secondItem="M0F-7m-vuY" secondAttribute="centerY" id="opA-fa-ziv"/>
-                                    <constraint firstItem="71T-qf-T8Z" firstAttribute="centerY" secondItem="M0F-7m-vuY" secondAttribute="centerY" id="ufw-UJ-60Y"/>
-                                </constraints>
-                            </view>
-                        </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <constraints>
-                            <constraint firstItem="M0F-7m-vuY" firstAttribute="bottom" secondItem="YOP-fD-eOB" secondAttribute="bottom" id="1g7-OC-yaV"/>
-                            <constraint firstItem="KJj-zi-dZB" firstAttribute="leading" secondItem="YOP-fD-eOB" secondAttribute="leading" id="8Bi-5G-lvJ"/>
-                            <constraint firstItem="M0F-7m-vuY" firstAttribute="top" secondItem="KJj-zi-dZB" secondAttribute="bottom" id="AIF-zg-ryj"/>
-                            <constraint firstItem="KJj-zi-dZB" firstAttribute="trailing" secondItem="YOP-fD-eOB" secondAttribute="trailing" id="MLm-Tk-l38"/>
-                            <constraint firstItem="M0F-7m-vuY" firstAttribute="trailing" secondItem="YOP-fD-eOB" secondAttribute="trailing" id="dJ4-wm-Y8z"/>
-                            <constraint firstItem="M0F-7m-vuY" firstAttribute="leading" secondItem="YOP-fD-eOB" secondAttribute="leading" id="kLc-Qp-gzN"/>
-                            <constraint firstItem="KJj-zi-dZB" firstAttribute="top" secondItem="YOP-fD-eOB" secondAttribute="top" id="plZ-2M-2pz"/>
-                        </constraints>
-                        <viewLayoutGuide key="safeArea" id="YOP-fD-eOB"/>
-                    </view>
-                    <navigationItem key="navigationItem" id="4qR-Bd-8HM"/>
-                    <connections>
-                        <outlet property="calendarBtn" destination="71T-qf-T8Z" id="kmy-qp-47B"/>
-                        <outlet property="tableView" destination="KJj-zi-dZB" id="BLE-0u-ldM"/>
-                        <outlet property="todayBtn" destination="wt1-wW-6mZ" id="oTj-Yv-omZ"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="NFS-3Q-UWF" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="848.79999999999995" y="-694.00299850074964"/>
-        </scene>
-        <!--Calendar Event View Controller-->
-        <scene sceneID="Aj2-RD-S3x">
-            <objects>
-                <tableViewController id="Vxk-45-vB1" customClass="OOCalendarEventViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
-                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="7H1-7C-M3e">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <sections>
-                            <tableViewSection id="Ogn-vO-7jG">
-                                <cells>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="45" id="uxG-oP-2Jx">
-                                        <rect key="frame" x="0.0" y="0.0" width="375" height="45"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="uxG-oP-2Jx" id="MKv-co-tJv">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="例如:开会" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gaP-Lw-V7E">
-                                                    <rect key="frame" x="16" y="5" width="354" height="34.5"/>
-                                                    <nil key="textColor"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                                    <textInputTraits key="textInputTraits"/>
-                                                </textField>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="gaP-Lw-V7E" firstAttribute="top" secondItem="MKv-co-tJv" secondAttribute="top" constant="5" id="Umh-GC-vHb"/>
-                                                <constraint firstAttribute="bottom" secondItem="gaP-Lw-V7E" secondAttribute="bottom" constant="5" id="aYp-Fg-OyP"/>
-                                                <constraint firstItem="gaP-Lw-V7E" firstAttribute="leading" secondItem="MKv-co-tJv" secondAttribute="leading" constant="16" id="szc-Rj-gp8"/>
-                                                <constraint firstAttribute="trailing" secondItem="gaP-Lw-V7E" secondAttribute="trailing" constant="5" id="uFD-7h-XoM"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="120" id="Nqb-uU-RgB">
-                                        <rect key="frame" x="0.0" y="45" width="375" height="120"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Nqb-uU-RgB" id="PQX-mp-zBS">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="119.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <stackView opaque="NO" contentMode="scaleToFill" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="lpS-Ep-u9o">
-                                                    <rect key="frame" x="16" y="5" width="100" height="24"/>
-                                                    <subviews>
-                                                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="PwN-cV-5Cp">
-                                                            <rect key="frame" x="0.0" y="0.0" width="50" height="24"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="48" id="Cy3-uM-ruq"/>
-                                                                <constraint firstAttribute="height" constant="24" id="VCr-I8-jVq"/>
-                                                            </constraints>
-                                                            <connections>
-                                                                <action selector="tapAllDaySwitch:" destination="Vxk-45-vB1" eventType="valueChanged" id="rrC-lO-H2n"/>
-                                                            </connections>
-                                                        </switch>
-                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rdY-4r-1NV">
-                                                            <rect key="frame" x="63" y="0.0" width="37" height="24"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
-                                                            <nil key="textColor"/>
-                                                            <nil key="highlightedColor"/>
-                                                        </label>
-                                                    </subviews>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="100" id="s4W-o2-CN4"/>
-                                                    </constraints>
-                                                </stackView>
-                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_shijian" translatesAutoresizingMaskIntoConstraints="NO" id="sfg-C9-T2u">
-                                                    <rect key="frame" x="16" y="45" width="22" height="22"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="22" id="6WJ-71-uTo"/>
-                                                        <constraint firstAttribute="height" constant="22" id="9gU-gy-aua"/>
-                                                    </constraints>
-                                                </imageView>
-                                                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="NNc-Zq-e8a">
-                                                    <rect key="frame" x="74" y="46" width="285" height="64"/>
-                                                    <subviews>
-                                                        <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HqM-sQ-xhn">
-                                                            <rect key="frame" x="0.0" y="0.0" width="285" height="22"/>
-                                                            <subviews>
-                                                                <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018年07月30日 13:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dub-8d-dx7">
-                                                                    <rect key="frame" x="0.0" y="0.0" width="261" height="22"/>
-                                                                    <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
-                                                                    <nil key="textColor"/>
-                                                                    <nil key="highlightedColor"/>
-                                                                </label>
-                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="23o-Vb-7fY">
-                                                                    <rect key="frame" x="261" y="0.0" width="24" height="22"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="width" constant="24" id="HAj-Bt-7rV"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                        </stackView>
-                                                        <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lNF-vK-WbX">
-                                                            <rect key="frame" x="0.0" y="42" width="285" height="22"/>
-                                                            <subviews>
-                                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018年07月30日 13:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rqe-Vw-UzF">
-                                                                    <rect key="frame" x="0.0" y="0.0" width="261" height="22"/>
-                                                                    <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
-                                                                    <nil key="textColor"/>
-                                                                    <nil key="highlightedColor"/>
-                                                                </label>
-                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="y7l-as-AD6">
-                                                                    <rect key="frame" x="261" y="0.0" width="24" height="22"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="width" constant="24" id="sMs-sB-hyI"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                        </stackView>
-                                                    </subviews>
-                                                    <gestureRecognizers/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="64" id="S4m-1J-ydh"/>
-                                                    </constraints>
-                                                </stackView>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="NNc-Zq-e8a" firstAttribute="leading" secondItem="sfg-C9-T2u" secondAttribute="trailing" constant="36" id="am8-ML-krx"/>
-                                                <constraint firstItem="lpS-Ep-u9o" firstAttribute="top" secondItem="PQX-mp-zBS" secondAttribute="top" constant="5" id="c3D-PO-yJC"/>
-                                                <constraint firstItem="sfg-C9-T2u" firstAttribute="leading" secondItem="PQX-mp-zBS" secondAttribute="leadingMargin" id="dds-UT-Ghg"/>
-                                                <constraint firstItem="sfg-C9-T2u" firstAttribute="top" secondItem="lpS-Ep-u9o" secondAttribute="bottom" constant="16" id="kcR-EW-imZ"/>
-                                                <constraint firstAttribute="trailingMargin" secondItem="NNc-Zq-e8a" secondAttribute="trailing" id="pmh-Pn-TSi"/>
-                                                <constraint firstItem="lpS-Ep-u9o" firstAttribute="leading" secondItem="PQX-mp-zBS" secondAttribute="leading" constant="16" id="s0k-x8-Y6F"/>
-                                                <constraint firstItem="NNc-Zq-e8a" firstAttribute="top" secondItem="lpS-Ep-u9o" secondAttribute="bottom" constant="17" id="vUd-A0-kwF"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="60" id="4Gg-JY-9Yo">
-                                        <rect key="frame" x="0.0" y="165" width="375" height="60"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="4Gg-JY-9Yo" id="7Su-0t-5EZ">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="evq-G0-rF6">
-                                                    <rect key="frame" x="16" y="0.0" width="359" height="59.5"/>
-                                                    <subviews>
-                                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_hdjr" translatesAutoresizingMaskIntoConstraints="NO" id="kBX-9l-V1q">
-                                                            <rect key="frame" x="0.0" y="19" width="22" height="22"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="22" id="1FT-SO-P9R"/>
-                                                                <constraint firstAttribute="height" constant="22" id="rqM-2X-wbT"/>
-                                                            </constraints>
-                                                        </imageView>
-                                                        <pickerView tag="110" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pyF-R2-ql8">
-                                                            <rect key="frame" x="37" y="0.0" width="322" height="59.5"/>
-                                                            <connections>
-                                                                <outlet property="dataSource" destination="Vxk-45-vB1" id="5Dd-B7-Q9q"/>
-                                                                <outlet property="delegate" destination="Vxk-45-vB1" id="8qX-9R-aTO"/>
-                                                            </connections>
-                                                        </pickerView>
-                                                    </subviews>
-                                                </stackView>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="evq-G0-rF6" firstAttribute="top" secondItem="7Su-0t-5EZ" secondAttribute="top" id="1VO-mL-jHa"/>
-                                                <constraint firstItem="evq-G0-rF6" firstAttribute="leading" secondItem="7Su-0t-5EZ" secondAttribute="leading" constant="16" id="h8s-cf-9Sd"/>
-                                                <constraint firstAttribute="trailing" secondItem="evq-G0-rF6" secondAttribute="trailing" id="oUj-3c-7gc"/>
-                                                <constraint firstAttribute="bottom" secondItem="evq-G0-rF6" secondAttribute="bottom" id="uSr-V1-QZu"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="45" id="qQX-Lv-NHQ">
-                                        <rect key="frame" x="0.0" y="225" width="375" height="45"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qQX-Lv-NHQ" id="Tln-Ch-B5c">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="i8o-dB-E0v">
-                                                    <rect key="frame" x="20" y="8" width="339" height="28.5"/>
-                                                    <subviews>
-                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dgr-Bu-MAQ" userLabel="blue">
-                                                            <rect key="frame" x="0.0" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="gmX-mE-SDk">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="6VV-qr-hlC"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="Uxh-wh-1YZ"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.25882352941176467" green="0.5607843137254902" blue="0.9882352941176471" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="gmX-mE-SDk" firstAttribute="centerX" secondItem="Dgr-Bu-MAQ" secondAttribute="centerX" id="9aJ-c0-KjP"/>
-                                                                <constraint firstAttribute="width" constant="24" id="Ivw-Nt-e8L"/>
-                                                                <constraint firstItem="gmX-mE-SDk" firstAttribute="centerY" secondItem="Dgr-Bu-MAQ" secondAttribute="centerY" id="Y6X-EZ-SM0"/>
-                                                                <constraint firstAttribute="height" constant="24" id="aY4-rA-in7"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nS3-qA-VwA" userLabel="green">
-                                                            <rect key="frame" x="45" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="D3N-kh-Mq7">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="WOI-Ze-YEg"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="ZQ2-1O-AN1"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.35686274509803922" green="0.80000000000000004" blue="0.38039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="D3N-kh-Mq7" firstAttribute="centerY" secondItem="nS3-qA-VwA" secondAttribute="centerY" id="8BK-XT-xJE"/>
-                                                                <constraint firstAttribute="width" constant="24" id="SRZ-Rw-NfW"/>
-                                                                <constraint firstAttribute="height" constant="24" id="kPY-21-Y5A"/>
-                                                                <constraint firstItem="D3N-kh-Mq7" firstAttribute="centerX" secondItem="nS3-qA-VwA" secondAttribute="centerX" id="ltQ-jl-c7u"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hRM-n9-khc" userLabel="orangle">
-                                                            <rect key="frame" x="90" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="KzE-S1-77g">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="AUe-S7-hB3"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="aFI-ew-wtP"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.97647058823529409" green="0.74901960784313726" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="KzE-S1-77g" firstAttribute="centerY" secondItem="hRM-n9-khc" secondAttribute="centerY" id="HEF-qz-tnK"/>
-                                                                <constraint firstAttribute="height" constant="24" id="HQu-84-yYi"/>
-                                                                <constraint firstItem="KzE-S1-77g" firstAttribute="centerX" secondItem="hRM-n9-khc" secondAttribute="centerX" id="ceb-An-1Tu"/>
-                                                                <constraint firstAttribute="width" constant="24" id="mck-HZ-ZCw"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ggx-2y-fDS" userLabel="crimson">
-                                                            <rect key="frame" x="135" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="GK6-ih-mWE">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="ae3-zr-8aw"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="w5l-GX-PJI"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.96862745098039216" green="0.37254901960784315" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="24" id="UMl-J7-DNy"/>
-                                                                <constraint firstItem="GK6-ih-mWE" firstAttribute="centerX" secondItem="Ggx-2y-fDS" secondAttribute="centerX" id="bXf-5U-QEv"/>
-                                                                <constraint firstAttribute="height" constant="24" id="hfe-b7-39J"/>
-                                                                <constraint firstItem="GK6-ih-mWE" firstAttribute="centerY" secondItem="Ggx-2y-fDS" secondAttribute="centerY" id="w1I-Sz-h3c"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OGU-7P-pbj" userLabel="lightpurple">
-                                                            <rect key="frame" x="180" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="yE3-0X-Ixh">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="width" constant="18" id="ARI-92-xj5"/>
-                                                                        <constraint firstAttribute="height" constant="18" id="Rnx-ld-gJh"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.94509803921568625" green="0.50196078431372548" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="yE3-0X-Ixh" firstAttribute="centerY" secondItem="OGU-7P-pbj" secondAttribute="centerY" id="782-Qj-Dlk"/>
-                                                                <constraint firstAttribute="width" constant="24" id="Fv9-El-C1c"/>
-                                                                <constraint firstAttribute="height" constant="24" id="HVA-E8-C61"/>
-                                                                <constraint firstItem="yE3-0X-Ixh" firstAttribute="centerX" secondItem="OGU-7P-pbj" secondAttribute="centerX" id="dqb-xX-kM8"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H7n-vf-H9J" userLabel="purple">
-                                                            <rect key="frame" x="225" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="D0E-yX-QaI">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="TFo-D4-GPF"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="iAL-KH-v80"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.56470588235294117" green="0.44705882352941173" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="height" constant="24" id="8gq-CO-eTY"/>
-                                                                <constraint firstItem="D0E-yX-QaI" firstAttribute="centerY" secondItem="H7n-vf-H9J" secondAttribute="centerY" id="99s-cw-T7m"/>
-                                                                <constraint firstAttribute="width" constant="24" id="E8S-ZW-5fe"/>
-                                                                <constraint firstItem="D0E-yX-QaI" firstAttribute="centerX" secondItem="H7n-vf-H9J" secondAttribute="centerX" id="sRT-G7-gp6"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="6" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="118-Aw-aif" userLabel="gray">
-                                                            <rect key="frame" x="270" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="8UA-Zc-sdH">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="J8p-K5-Xsp"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="KUz-t8-9b4"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.56470588235294117" green="0.56470588235294117" blue="0.56470588235294117" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="8UA-Zc-sdH" firstAttribute="centerY" secondItem="118-Aw-aif" secondAttribute="centerY" id="5PU-ld-WL6"/>
-                                                                <constraint firstAttribute="height" constant="24" id="EoQ-gB-JFa"/>
-                                                                <constraint firstAttribute="width" constant="24" id="gYN-JO-57r"/>
-                                                                <constraint firstItem="8UA-Zc-sdH" firstAttribute="centerX" secondItem="118-Aw-aif" secondAttribute="centerX" id="lfI-fD-zeO"/>
-                                                            </constraints>
-                                                        </view>
-                                                        <view tag="7" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aua-TK-Qnv" userLabel="cyanine">
-                                                            <rect key="frame" x="315" y="2.5" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="tye-Jf-YHm">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="5WS-2e-3QG"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="mHx-1M-qnT"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.078431372549019607" green="0.38431372549019605" blue="0.74509803921568629" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="24" id="4nx-sl-RIa"/>
-                                                                <constraint firstAttribute="height" constant="24" id="Kpb-lJ-sTI"/>
-                                                                <constraint firstItem="tye-Jf-YHm" firstAttribute="centerY" secondItem="aua-TK-Qnv" secondAttribute="centerY" id="cKv-Ul-QD0"/>
-                                                                <constraint firstItem="tye-Jf-YHm" firstAttribute="centerX" secondItem="aua-TK-Qnv" secondAttribute="centerX" id="cYE-GL-WBJ"/>
-                                                            </constraints>
-                                                        </view>
-                                                    </subviews>
-                                                </stackView>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="trailing" secondItem="i8o-dB-E0v" secondAttribute="trailing" constant="16" id="8Ox-ef-kQX"/>
-                                                <constraint firstAttribute="bottom" secondItem="i8o-dB-E0v" secondAttribute="bottom" constant="8" id="Zut-5K-hJS"/>
-                                                <constraint firstItem="i8o-dB-E0v" firstAttribute="leading" secondItem="Tln-Ch-B5c" secondAttribute="leading" constant="20" id="iT4-S9-mfI"/>
-                                                <constraint firstItem="i8o-dB-E0v" firstAttribute="top" secondItem="Tln-Ch-B5c" secondAttribute="top" constant="8" id="lBf-sr-HQW"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="60" id="u6G-MU-dPL">
-                                        <rect key="frame" x="0.0" y="270" width="375" height="60"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="u6G-MU-dPL" id="auw-zx-G07">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="Nvw-Uv-y4F">
-                                                    <rect key="frame" x="16" y="0.0" width="359" height="59.5"/>
-                                                    <subviews>
-                                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_tixing" translatesAutoresizingMaskIntoConstraints="NO" id="JPO-Kb-7YE">
-                                                            <rect key="frame" x="0.0" y="19" width="22" height="22"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="22" id="XHQ-Ne-kEe"/>
-                                                                <constraint firstAttribute="height" constant="22" id="i2w-Kk-1a1"/>
-                                                            </constraints>
-                                                        </imageView>
-                                                        <pickerView tag="111" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eRL-b7-sZv">
-                                                            <rect key="frame" x="37" y="0.0" width="322" height="59.5"/>
-                                                            <connections>
-                                                                <outlet property="dataSource" destination="Vxk-45-vB1" id="X6V-QF-7cw"/>
-                                                                <outlet property="delegate" destination="Vxk-45-vB1" id="cI2-NL-CGH"/>
-                                                            </connections>
-                                                        </pickerView>
-                                                    </subviews>
-                                                </stackView>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="Nvw-Uv-y4F" firstAttribute="top" secondItem="auw-zx-G07" secondAttribute="top" id="BS2-oE-3V6"/>
-                                                <constraint firstAttribute="bottom" secondItem="Nvw-Uv-y4F" secondAttribute="bottom" id="S9Y-Ea-NPh"/>
-                                                <constraint firstAttribute="trailing" secondItem="Nvw-Uv-y4F" secondAttribute="trailing" id="mVM-zG-UZP"/>
-                                                <constraint firstItem="Nvw-Uv-y4F" firstAttribute="leading" secondItem="auw-zx-G07" secondAttribute="leading" constant="16" id="oXw-gx-pWs"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="60" id="e5P-Ds-0Jm">
-                                        <rect key="frame" x="0.0" y="330" width="375" height="60"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="e5P-Ds-0Jm" id="vBL-Zg-uX0">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="o2n-Cg-nQo">
-                                                    <rect key="frame" x="16" y="0.0" width="359" height="60"/>
-                                                    <subviews>
-                                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_chongfu" translatesAutoresizingMaskIntoConstraints="NO" id="W5r-qL-MRy">
-                                                            <rect key="frame" x="0.0" y="19" width="22" height="22"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="height" constant="22" id="eN6-V0-CcT"/>
-                                                                <constraint firstAttribute="width" constant="22" id="mxs-yb-OVM"/>
-                                                            </constraints>
-                                                        </imageView>
-                                                        <pickerView tag="112" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fbt-RB-x4p">
-                                                            <rect key="frame" x="37" y="0.0" width="322" height="60"/>
-                                                            <connections>
-                                                                <outlet property="dataSource" destination="Vxk-45-vB1" id="cCT-Ga-6th"/>
-                                                                <outlet property="delegate" destination="Vxk-45-vB1" id="TRG-7c-mdR"/>
-                                                            </connections>
-                                                        </pickerView>
-                                                    </subviews>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="60" id="gjT-w1-VIx"/>
-                                                    </constraints>
-                                                </stackView>
-                                                <stackView hidden="YES" opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="F44-6G-rM2">
-                                                    <rect key="frame" x="32" y="65" width="311" height="20"/>
-                                                    <subviews>
-                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="截至日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IMf-BA-twt">
-                                                            <rect key="frame" x="0.0" y="3" width="64" height="14.5"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="64" id="oup-D2-hLu"/>
-                                                            </constraints>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <nil key="textColor"/>
-                                                            <nil key="highlightedColor"/>
-                                                        </label>
-                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k6W-yh-OR2">
-                                                            <rect key="frame" x="79" y="0.0" width="232" height="20"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            <nil key="highlightedColor"/>
-                                                        </label>
-                                                    </subviews>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="20" id="iwQ-Pk-1HS"/>
-                                                    </constraints>
-                                                </stackView>
-                                                <stackView hidden="YES" opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="vc3-qe-cTN">
-                                                    <rect key="frame" x="32" y="90" width="327" height="27"/>
-                                                    <subviews>
-                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qy2-Ll-2FL">
-                                                            <rect key="frame" x="0.0" y="0.0" width="30" height="27"/>
-                                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周一">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                                <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                        <button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hQt-nQ-yDV">
-                                                            <rect key="frame" x="49.5" y="0.0" width="30" height="27"/>
-                                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周二">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                        <button opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GeN-7S-V8E">
-                                                            <rect key="frame" x="99" y="0.0" width="30" height="27"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周三">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                        <button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xOJ-cj-hMc">
-                                                            <rect key="frame" x="148.5" y="0.0" width="30" height="27"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周四">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                        <button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Szk-bc-YOL">
-                                                            <rect key="frame" x="198" y="0.0" width="30" height="27"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周五">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                        <button opaque="NO" tag="5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qxa-Na-eLg">
-                                                            <rect key="frame" x="247.5" y="0.0" width="30" height="27"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周六">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                        <button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="To9-IU-AE6">
-                                                            <rect key="frame" x="297" y="0.0" width="30" height="27"/>
-                                                            <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
-                                                            <state key="normal" title="周日">
-                                                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                            </state>
-                                                        </button>
-                                                    </subviews>
-                                                </stackView>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="trailingMargin" secondItem="F44-6G-rM2" secondAttribute="trailing" constant="16" id="2ZB-Co-2pB"/>
-                                                <constraint firstItem="F44-6G-rM2" firstAttribute="top" secondItem="o2n-Cg-nQo" secondAttribute="bottom" constant="5" id="8pt-BZ-t3e"/>
-                                                <constraint firstAttribute="trailingMargin" secondItem="vc3-qe-cTN" secondAttribute="trailing" id="F4z-Sg-29S"/>
-                                                <constraint firstItem="vc3-qe-cTN" firstAttribute="top" secondItem="F44-6G-rM2" secondAttribute="bottom" constant="5" id="SS2-2g-5NJ"/>
-                                                <constraint firstItem="vc3-qe-cTN" firstAttribute="leading" secondItem="vBL-Zg-uX0" secondAttribute="leadingMargin" constant="16" id="XMb-c7-8LK"/>
-                                                <constraint firstItem="o2n-Cg-nQo" firstAttribute="leading" secondItem="vBL-Zg-uX0" secondAttribute="leading" constant="16" id="eqQ-It-Ump"/>
-                                                <constraint firstAttribute="trailing" secondItem="o2n-Cg-nQo" secondAttribute="trailing" id="oxH-8z-faW"/>
-                                                <constraint firstItem="F44-6G-rM2" firstAttribute="leading" secondItem="vBL-Zg-uX0" secondAttribute="leadingMargin" constant="16" id="qc8-ft-bgf"/>
-                                                <constraint firstItem="o2n-Cg-nQo" firstAttribute="top" secondItem="vBL-Zg-uX0" secondAttribute="top" id="xMp-X8-TEi"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="93" id="mRu-Km-9dY">
-                                        <rect key="frame" x="0.0" y="390" width="375" height="93"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mRu-Km-9dY" id="HFU-yb-U6N">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="92.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" placeholder="添加说明" minimumFontSize="12" translatesAutoresizingMaskIntoConstraints="NO" id="reH-A1-vQT">
-                                                    <rect key="frame" x="16" y="8" width="343" height="80"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="80" id="FA7-HO-1NJ"/>
-                                                    </constraints>
-                                                    <nil key="textColor"/>
-                                                    <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
-                                                    <textInputTraits key="textInputTraits"/>
-                                                </textField>
-                                                <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OMA-Fp-nFl">
-                                                    <rect key="frame" x="16" y="47.5" width="343" height="40"/>
-                                                    <color key="backgroundColor" red="0.98431372549019602" green="0.27843137254901962" blue="0.27843137254901962" alpha="1" colorSpace="calibratedRGB"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="40" id="z38-hq-zd6"/>
-                                                    </constraints>
-                                                    <state key="normal" title="删   除">
-                                                        <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                    </state>
-                                                    <userDefinedRuntimeAttributes>
-                                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                            <real key="value" value="5"/>
-                                                        </userDefinedRuntimeAttribute>
-                                                    </userDefinedRuntimeAttributes>
-                                                    <connections>
-                                                        <action selector="tapDeleteBtn:" destination="Vxk-45-vB1" eventType="touchUpInside" id="d3V-gw-XoF"/>
-                                                    </connections>
-                                                </button>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="bottom" secondItem="OMA-Fp-nFl" secondAttribute="bottom" constant="5" id="7tr-rB-tZn"/>
-                                                <constraint firstAttribute="trailing" secondItem="OMA-Fp-nFl" secondAttribute="trailing" constant="16" id="C1B-kF-d5q"/>
-                                                <constraint firstAttribute="trailing" secondItem="reH-A1-vQT" secondAttribute="trailing" constant="16" id="UEQ-Sj-WGw"/>
-                                                <constraint firstItem="OMA-Fp-nFl" firstAttribute="leading" secondItem="HFU-yb-U6N" secondAttribute="leading" constant="16" id="aya-2K-2Jr"/>
-                                                <constraint firstItem="reH-A1-vQT" firstAttribute="top" secondItem="HFU-yb-U6N" secondAttribute="top" constant="8" id="fM7-pG-HCc"/>
-                                                <constraint firstItem="reH-A1-vQT" firstAttribute="leading" secondItem="HFU-yb-U6N" secondAttribute="leading" constant="16" id="jeR-07-P4W"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                </cells>
-                            </tableViewSection>
-                        </sections>
-                        <connections>
-                            <outlet property="dataSource" destination="Vxk-45-vB1" id="XpN-cu-Ay8"/>
-                            <outlet property="delegate" destination="Vxk-45-vB1" id="18X-HM-sWl"/>
-                        </connections>
-                    </tableView>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="tKt-3P-uQz">
+  <device id="retina4_7" orientation="portrait" appearance="light"/>
+  <dependencies>
+    <deployment identifier="iOS"/>
+    <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
+    <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+    <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+  </dependencies>
+  <scenes>
+    <!--Calendar Main Month View Controller-->
+    <scene sceneID="g48-mo-Kla">
+      <objects>
+        <viewController id="xYY-yG-JGa" customClass="OOCalendarMainMonthViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <view key="view" contentMode="scaleToFill" id="QKO-bs-p7W">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+              <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="KJj-zi-dZB">
+                <rect key="frame" x="0.0" y="44" width="375" height="583"/>
+                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                <prototypes>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="CalendarEventCell" id="n53-PB-sk0" customClass="CalendarEventTableViewCell" customModule="O2Platform" customModuleProvider="target">
+                    <rect key="frame" x="0.0" y="28" width="375" height="43.5"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="monthCalendarContent" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="n53-PB-sk0" id="lyc-3f-O6N">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JXL-RY-KpG">
+                          <rect key="frame" x="18" y="13" width="18" height="18"/>
+                          <color key="backgroundColor" red="0.29803921570000003" green="0.68627450980000004" blue="0.31372549020000001" alpha="1" colorSpace="calibratedRGB"/>
+                          <constraints>
+                            <constraint firstAttribute="width" constant="18" id="9R9-Im-fh5"/>
+                            <constraint firstAttribute="height" constant="18" id="bNg-p4-EmP"/>
+                          </constraints>
+                        </view>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="这里是内容" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YuP-80-oar">
+                          <rect key="frame" x="44" y="11.5" width="263" height="20.5"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                          <nil key="textColor"/>
+                          <nil key="highlightedColor"/>
+                        </label>
+                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="2ui-5h-ZC7">
+                          <rect key="frame" x="315" y="5" width="42" height="34"/>
+                          <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="les-0j-Mxf" userLabel="Event StartTime">
+                              <rect key="frame" x="5" y="0.0" width="32" height="14.5"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jIB-o0-arB" userLabel="Event EndTime">
+                              <rect key="frame" x="5" y="19.5" width="32" height="14.5"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              <nil key="highlightedColor"/>
+                            </label>
+                          </subviews>
+                          <constraints>
+                            <constraint firstAttribute="width" constant="42" id="r9t-sb-ycD"/>
+                          </constraints>
+                        </stackView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KIV-kE-cmY" userLabel="Event AllDay">
+                          <rect key="frame" x="326" y="13" width="31" height="18"/>
+                          <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
+                          <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                          <nil key="highlightedColor"/>
+                        </label>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="2ui-5h-ZC7" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="1JL-Dp-A6W"/>
+                        <constraint firstItem="JXL-RY-KpG" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="Ibd-e8-GXJ"/>
+                        <constraint firstItem="YuP-80-oar" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="QdU-mY-k9o"/>
+                        <constraint firstItem="2ui-5h-ZC7" firstAttribute="leading" secondItem="YuP-80-oar" secondAttribute="trailing" constant="8" id="V6b-cg-chx"/>
+                        <constraint firstItem="JXL-RY-KpG" firstAttribute="leading" secondItem="lyc-3f-O6N" secondAttribute="leading" constant="18" id="dSx-3I-cxQ"/>
+                        <constraint firstAttribute="trailing" secondItem="2ui-5h-ZC7" secondAttribute="trailing" constant="18" id="fwY-HU-g8c"/>
+                        <constraint firstItem="YuP-80-oar" firstAttribute="leading" secondItem="JXL-RY-KpG" secondAttribute="trailing" constant="8" id="kgr-jn-t9O"/>
+                        <constraint firstAttribute="trailing" secondItem="KIV-kE-cmY" secondAttribute="trailing" constant="18" id="mam-ns-u2j"/>
+                        <constraint firstItem="KIV-kE-cmY" firstAttribute="centerY" secondItem="lyc-3f-O6N" secondAttribute="centerY" id="rH1-jv-JMV"/>
+                      </constraints>
+                    </tableViewCellContentView>
                     <connections>
-                        <outlet property="calendarPickerView" destination="pyF-R2-ql8" id="ff9-q3-kSd"/>
-                        <outlet property="deleteBtn" destination="OMA-Fp-nFl" id="TGm-RG-0hj"/>
-                        <outlet property="evenEndTimeStackView" destination="lNF-vK-WbX" id="Ad5-xH-qU5"/>
-                        <outlet property="eventAllDaySwitch" destination="PwN-cV-5Cp" id="2NZ-HE-72x"/>
-                        <outlet property="eventColorStackView" destination="i8o-dB-E0v" id="cbm-j1-pSM"/>
-                        <outlet property="eventEndTime" destination="Rqe-Vw-UzF" id="TET-gY-0on"/>
-                        <outlet property="eventRemark" destination="reH-A1-vQT" id="o9n-yx-WTB"/>
-                        <outlet property="eventStartTime" destination="Dub-8d-dx7" id="9np-fO-mk8"/>
-                        <outlet property="eventStartTimeStackView" destination="HqM-sQ-xhn" id="kkn-0i-smN"/>
-                        <outlet property="eventTitle" destination="gaP-Lw-V7E" id="7V2-hB-clk"/>
-                        <outlet property="remindPickerView" destination="eRL-b7-sZv" id="XWt-3h-5tg"/>
-                        <outlet property="repeatPickerView" destination="fbt-RB-x4p" id="hTZ-eo-mYS"/>
-                        <outlet property="repeatTableViewCell" destination="e5P-Ds-0Jm" id="vbx-6i-wdG"/>
-                        <outlet property="untilDateLabel" destination="k6W-yh-OR2" id="Z4N-tW-TwM"/>
-                        <outlet property="untilDateStackView" destination="F44-6G-rM2" id="od1-Zb-XkP"/>
-                        <outlet property="weekDaysStackView" destination="vc3-qe-cTN" id="D73-xs-enz"/>
+                      <outlet property="eventAllDay" destination="KIV-kE-cmY" id="34j-Xs-8z2"/>
+                      <outlet property="eventColorView" destination="JXL-RY-KpG" id="FzI-2i-OMO"/>
+                      <outlet property="eventEndTime" destination="jIB-o0-arB" id="TDp-Ag-gq3"/>
+                      <outlet property="eventStartTime" destination="les-0j-Mxf" id="eJA-Fg-C5K"/>
+                      <outlet property="eventTimeStack" destination="2ui-5h-ZC7" id="RcE-jB-uZq"/>
+                      <outlet property="eventTitleView" destination="YuP-80-oar" id="GaE-LI-V7N"/>
+                      <segue destination="Vxk-45-vB1" kind="show" identifier="showEventDetail" id="VOH-7P-zaY"/>
                     </connections>
-                </tableViewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="UiU-q1-2zR" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="1816.8" y="-694.00299850074964"/>
-        </scene>
-        <!--Navigation Controller-->
-        <scene sceneID="Uen-X6-xyC">
-            <objects>
-                <navigationController automaticallyAdjustsScrollViewInsets="NO" id="tKt-3P-uQz" customClass="ZLNavigationController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
-                    <toolbarItems/>
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="tBY-YA-bTM">
-                        <rect key="frame" x="0.0" y="20" width="375" height="44"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </navigationBar>
-                    <nil name="viewControllers"/>
+                  </tableViewCell>
+                </prototypes>
+              </tableView>
+              <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M0F-7m-vuY" userLabel="BottomBar">
+                <rect key="frame" x="0.0" y="627" width="375" height="40"/>
+                <subviews>
+                  <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wt1-wW-6mZ">
+                    <rect key="frame" x="16" y="3.5" width="35" height="33"/>
+                    <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+                    <state key="normal" title="今天"/>
                     <connections>
-                        <segue destination="xYY-yG-JGa" kind="relationship" relationship="rootViewController" id="1nR-FI-RTb"/>
+                      <action selector="todayAction:" destination="xYY-yG-JGa" eventType="touchUpInside" id="Wd8-Ne-Gwr"/>
                     </connections>
-                </navigationController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="Ia6-rz-Icf" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-90.400000000000006" y="-694.00299850074964"/>
-        </scene>
-        <!--Calendar Left Menu Controller-->
-        <scene sceneID="3By-VB-pei">
-            <objects>
-                <tableViewController id="L5W-fh-UuH" customClass="OOCalendarLeftMenuController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
-                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="FSW-kR-JAk">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <containerView key="tableHeaderView" opaque="NO" contentMode="scaleToFill" id="KcX-qQ-DIF">
-                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
-                            <connections>
-                                <segue destination="xFe-Nw-gR2" kind="embed" id="JrC-H1-NOw"/>
-                            </connections>
-                        </containerView>
-                        <prototypes>
-                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="calendarTableCell" id="hIV-F8-hEt" customClass="CalendarTableViewCell" customModule="O2Platform" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="78" width="375" height="44"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hIV-F8-hEt" id="vcr-nc-qYD">
-                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
-                                    <autoresizingMask key="autoresizingMask"/>
-                                    <subviews>
-                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nUr-LS-pfg">
-                                            <rect key="frame" x="24" y="13" width="18" height="18"/>
-                                            <color key="backgroundColor" red="0.29803921570000003" green="0.68627450980000004" blue="0.31372549020000001" alpha="1" colorSpace="calibratedRGB"/>
-                                            <constraints>
-                                                <constraint firstAttribute="width" constant="18" id="5lB-4A-bhs"/>
-                                                <constraint firstAttribute="height" constant="18" id="GBp-du-Gru"/>
-                                            </constraints>
-                                            <userDefinedRuntimeAttributes>
-                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                    <real key="value" value="9"/>
-                                                </userDefinedRuntimeAttribute>
-                                            </userDefinedRuntimeAttributes>
-                                        </view>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的日历" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="onv-WL-BxB">
-                                            <rect key="frame" x="52" y="11.5" width="263" height="20.5"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <nil key="textColor"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BTT-cO-3bH">
-                                            <rect key="frame" x="325" y="10" width="34" height="24"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="24" id="vBm-Id-XQ9"/>
-                                                <constraint firstAttribute="width" constant="32" id="ySg-20-HOz"/>
-                                            </constraints>
-                                            <connections>
-                                                <action selector="calendarSwitchTap:" destination="hIV-F8-hEt" eventType="valueChanged" id="cgk-KU-AwN"/>
-                                            </connections>
-                                        </switch>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="nUr-LS-pfg" firstAttribute="centerY" secondItem="vcr-nc-qYD" secondAttribute="centerY" id="0fm-s1-CUn"/>
-                                        <constraint firstItem="BTT-cO-3bH" firstAttribute="centerY" secondItem="vcr-nc-qYD" secondAttribute="centerY" id="JcJ-17-Hw0"/>
-                                        <constraint firstItem="onv-WL-BxB" firstAttribute="centerY" secondItem="vcr-nc-qYD" secondAttribute="centerY" id="MiO-8E-It5"/>
-                                        <constraint firstItem="BTT-cO-3bH" firstAttribute="leading" secondItem="onv-WL-BxB" secondAttribute="trailing" constant="10" id="ZWp-uB-5KZ"/>
-                                        <constraint firstItem="onv-WL-BxB" firstAttribute="leading" secondItem="nUr-LS-pfg" secondAttribute="trailing" constant="10" id="bbS-0Q-jnE"/>
-                                        <constraint firstAttribute="trailing" secondItem="BTT-cO-3bH" secondAttribute="trailing" constant="18" id="kUb-UW-eTW"/>
-                                        <constraint firstItem="nUr-LS-pfg" firstAttribute="leading" secondItem="vcr-nc-qYD" secondAttribute="leading" constant="24" id="sih-O1-7td"/>
-                                    </constraints>
-                                </tableViewCellContentView>
-                                <connections>
-                                    <outlet property="calendarColorView" destination="nUr-LS-pfg" id="OOL-1P-0oF"/>
-                                    <outlet property="calendarNameView" destination="onv-WL-BxB" id="QCD-H7-VUE"/>
-                                    <outlet property="calendarSwitch" destination="BTT-cO-3bH" id="dFh-ng-dUj"/>
-                                </connections>
-                            </tableViewCell>
-                        </prototypes>
-                        <sections/>
-                        <connections>
-                            <outlet property="dataSource" destination="L5W-fh-UuH" id="Sjl-ck-xz3"/>
-                            <outlet property="delegate" destination="L5W-fh-UuH" id="Hl3-Fp-5PQ"/>
-                        </connections>
-                    </tableView>
+                  </button>
+                  <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="71T-qf-T8Z">
+                    <rect key="frame" x="324" y="3.5" width="35" height="33"/>
+                    <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+                    <state key="normal" title="日历"/>
                     <connections>
-                        <outlet property="addCalendarBtnView" destination="KcX-qQ-DIF" id="kAk-es-Ig5"/>
-                        <segue destination="6hI-Zf-Dol" kind="show" identifier="showCalendarSegue" id="dTl-zx-3mn"/>
+                      <segue destination="L5W-fh-UuH" kind="show" id="DF4-xt-Rlu"/>
                     </connections>
-                </tableViewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="ffa-JI-hF2" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-90" y="139"/>
-        </scene>
-        <!--View Controller-->
-        <scene sceneID="EQw-x0-gJd">
-            <objects>
-                <viewController id="xFe-Nw-gR2" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="lIW-wy-yeL">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="9kE-CW-qbe">
-                                <rect key="frame" x="32" y="0.0" width="311" height="50"/>
-                                <subviews>
-                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_zengjia" translatesAutoresizingMaskIntoConstraints="NO" id="fce-xE-dhf">
-                                        <rect key="frame" x="0.0" y="14" width="22" height="22"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="22" id="nfU-kQ-Cuu"/>
-                                            <constraint firstAttribute="width" constant="22" id="sK8-rN-1yv"/>
-                                        </constraints>
-                                    </imageView>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="新增日历" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lgr-ZD-kXw">
-                                        <rect key="frame" x="38" y="15" width="273" height="20.5"/>
-                                        <gestureRecognizers/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                        <nil key="textColor"/>
-                                        <nil key="highlightedColor"/>
-                                    </label>
-                                </subviews>
+                  </button>
+                </subviews>
+                <color key="backgroundColor" red="0.97647058823529409" green="0.97647058823529409" blue="0.97647058823529409" alpha="1" colorSpace="calibratedRGB"/>
+                <constraints>
+                  <constraint firstAttribute="height" constant="40" id="EPO-5J-aQ8"/>
+                  <constraint firstItem="wt1-wW-6mZ" firstAttribute="leading" secondItem="M0F-7m-vuY" secondAttribute="leading" constant="16" id="aoT-z2-Iuk"/>
+                  <constraint firstAttribute="trailing" secondItem="71T-qf-T8Z" secondAttribute="trailing" constant="16" id="bQo-4L-Bhv"/>
+                  <constraint firstItem="wt1-wW-6mZ" firstAttribute="centerY" secondItem="M0F-7m-vuY" secondAttribute="centerY" id="opA-fa-ziv"/>
+                  <constraint firstItem="71T-qf-T8Z" firstAttribute="centerY" secondItem="M0F-7m-vuY" secondAttribute="centerY" id="ufw-UJ-60Y"/>
+                </constraints>
+              </view>
+            </subviews>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+              <constraint firstItem="M0F-7m-vuY" firstAttribute="bottom" secondItem="YOP-fD-eOB" secondAttribute="bottom" id="1g7-OC-yaV"/>
+              <constraint firstItem="KJj-zi-dZB" firstAttribute="leading" secondItem="YOP-fD-eOB" secondAttribute="leading" id="8Bi-5G-lvJ"/>
+              <constraint firstItem="M0F-7m-vuY" firstAttribute="top" secondItem="KJj-zi-dZB" secondAttribute="bottom" id="AIF-zg-ryj"/>
+              <constraint firstItem="KJj-zi-dZB" firstAttribute="trailing" secondItem="YOP-fD-eOB" secondAttribute="trailing" id="MLm-Tk-l38"/>
+              <constraint firstItem="M0F-7m-vuY" firstAttribute="trailing" secondItem="YOP-fD-eOB" secondAttribute="trailing" id="dJ4-wm-Y8z"/>
+              <constraint firstItem="M0F-7m-vuY" firstAttribute="leading" secondItem="YOP-fD-eOB" secondAttribute="leading" id="kLc-Qp-gzN"/>
+              <constraint firstItem="KJj-zi-dZB" firstAttribute="top" secondItem="YOP-fD-eOB" secondAttribute="top" id="plZ-2M-2pz"/>
+            </constraints>
+            <viewLayoutGuide key="safeArea" id="YOP-fD-eOB"/>
+          </view>
+          <navigationItem key="navigationItem" id="4qR-Bd-8HM"/>
+          <connections>
+            <outlet property="calendarBtn" destination="71T-qf-T8Z" id="kmy-qp-47B"/>
+            <outlet property="tableView" destination="KJj-zi-dZB" id="BLE-0u-ldM"/>
+            <outlet property="todayBtn" destination="wt1-wW-6mZ" id="oTj-Yv-omZ"/>
+          </connections>
+        </viewController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="NFS-3Q-UWF" userLabel="First Responder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="848.79999999999995" y="-694.00299850074964"/>
+    </scene>
+    <!--Calendar Event View Controller-->
+    <scene sceneID="Aj2-RD-S3x">
+      <objects>
+        <tableViewController id="Vxk-45-vB1" customClass="OOCalendarEventViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="7H1-7C-M3e">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <sections>
+              <tableViewSection id="Ogn-vO-7jG">
+                <cells>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="45" id="uxG-oP-2Jx">
+                    <rect key="frame" x="0.0" y="28" width="375" height="45"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="uxG-oP-2Jx" id="MKv-co-tJv">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="45"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="例如:开会" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gaP-Lw-V7E">
+                          <rect key="frame" x="16" y="5" width="354" height="35"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="gaP-Lw-V7E" firstAttribute="top" secondItem="MKv-co-tJv" secondAttribute="top" constant="5" id="Umh-GC-vHb"/>
+                        <constraint firstAttribute="bottom" secondItem="gaP-Lw-V7E" secondAttribute="bottom" constant="5" id="aYp-Fg-OyP"/>
+                        <constraint firstItem="gaP-Lw-V7E" firstAttribute="leading" secondItem="MKv-co-tJv" secondAttribute="leading" constant="16" id="szc-Rj-gp8"/>
+                        <constraint firstAttribute="trailing" secondItem="gaP-Lw-V7E" secondAttribute="trailing" constant="5" id="uFD-7h-XoM"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="120" id="Nqb-uU-RgB">
+                    <rect key="frame" x="0.0" y="73" width="375" height="120"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Nqb-uU-RgB" id="PQX-mp-zBS">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="lpS-Ep-u9o">
+                          <rect key="frame" x="16" y="5" width="100" height="24"/>
+                          <subviews>
+                            <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="PwN-cV-5Cp">
+                              <rect key="frame" x="0.0" y="0.0" width="50" height="24"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="48" id="Cy3-uM-ruq"/>
+                                <constraint firstAttribute="height" constant="24" id="VCr-I8-jVq"/>
+                              </constraints>
+                              <connections>
+                                <action selector="tapAllDaySwitch:" destination="Vxk-45-vB1" eventType="valueChanged" id="rrC-lO-H2n"/>
+                              </connections>
+                            </switch>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rdY-4r-1NV">
+                              <rect key="frame" x="63" y="0.0" width="37" height="24"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+                              <nil key="textColor"/>
+                              <nil key="highlightedColor"/>
+                            </label>
+                          </subviews>
+                          <constraints>
+                            <constraint firstAttribute="width" constant="100" id="s4W-o2-CN4"/>
+                          </constraints>
+                        </stackView>
+                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_shijian" translatesAutoresizingMaskIntoConstraints="NO" id="sfg-C9-T2u">
+                          <rect key="frame" x="16" y="45" width="22" height="22"/>
+                          <constraints>
+                            <constraint firstAttribute="width" constant="22" id="6WJ-71-uTo"/>
+                            <constraint firstAttribute="height" constant="22" id="9gU-gy-aua"/>
+                          </constraints>
+                        </imageView>
+                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="NNc-Zq-e8a">
+                          <rect key="frame" x="74" y="46" width="285" height="64"/>
+                          <subviews>
+                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HqM-sQ-xhn">
+                              <rect key="frame" x="0.0" y="0.0" width="285" height="22"/>
+                              <subviews>
+                                <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018年07月30日 13:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dub-8d-dx7">
+                                  <rect key="frame" x="0.0" y="0.0" width="261" height="22"/>
+                                  <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+                                  <nil key="textColor"/>
+                                  <nil key="highlightedColor"/>
+                                </label>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="23o-Vb-7fY">
+                                  <rect key="frame" x="261" y="0.0" width="24" height="22"/>
+                                  <constraints>
+                                    <constraint firstAttribute="width" constant="24" id="HAj-Bt-7rV"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                            </stackView>
+                            <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lNF-vK-WbX">
+                              <rect key="frame" x="0.0" y="42" width="285" height="22"/>
+                              <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018年07月30日 13:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rqe-Vw-UzF">
+                                  <rect key="frame" x="0.0" y="0.0" width="261" height="22"/>
+                                  <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+                                  <nil key="textColor"/>
+                                  <nil key="highlightedColor"/>
+                                </label>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="y7l-as-AD6">
+                                  <rect key="frame" x="261" y="0.0" width="24" height="22"/>
+                                  <constraints>
+                                    <constraint firstAttribute="width" constant="24" id="sMs-sB-hyI"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
                             </stackView>
-                        </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <constraints>
-                            <constraint firstItem="9kE-CW-qbe" firstAttribute="leading" secondItem="lIW-wy-yeL" secondAttribute="leadingMargin" constant="16" id="5rg-Vk-iwb"/>
-                            <constraint firstAttribute="trailingMargin" secondItem="9kE-CW-qbe" secondAttribute="trailing" constant="16" id="Bjh-rF-QQo"/>
-                            <constraint firstItem="9kE-CW-qbe" firstAttribute="top" secondItem="lIW-wy-yeL" secondAttribute="topMargin" id="DIn-lL-K5V"/>
-                            <constraint firstAttribute="bottomMargin" secondItem="9kE-CW-qbe" secondAttribute="bottom" id="vQB-at-qUU"/>
-                        </constraints>
-                        <viewLayoutGuide key="safeArea" id="VP9-5C-v7b"/>
+                          </subviews>
+                          <gestureRecognizers/>
+                          <constraints>
+                            <constraint firstAttribute="height" constant="64" id="S4m-1J-ydh"/>
+                          </constraints>
+                        </stackView>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="NNc-Zq-e8a" firstAttribute="leading" secondItem="sfg-C9-T2u" secondAttribute="trailing" constant="36" id="am8-ML-krx"/>
+                        <constraint firstItem="lpS-Ep-u9o" firstAttribute="top" secondItem="PQX-mp-zBS" secondAttribute="top" constant="5" id="c3D-PO-yJC"/>
+                        <constraint firstItem="sfg-C9-T2u" firstAttribute="leading" secondItem="PQX-mp-zBS" secondAttribute="leadingMargin" id="dds-UT-Ghg"/>
+                        <constraint firstItem="sfg-C9-T2u" firstAttribute="top" secondItem="lpS-Ep-u9o" secondAttribute="bottom" constant="16" id="kcR-EW-imZ"/>
+                        <constraint firstAttribute="trailingMargin" secondItem="NNc-Zq-e8a" secondAttribute="trailing" id="pmh-Pn-TSi"/>
+                        <constraint firstItem="lpS-Ep-u9o" firstAttribute="leading" secondItem="PQX-mp-zBS" secondAttribute="leading" constant="16" id="s0k-x8-Y6F"/>
+                        <constraint firstItem="NNc-Zq-e8a" firstAttribute="top" secondItem="lpS-Ep-u9o" secondAttribute="bottom" constant="17" id="vUd-A0-kwF"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="60" id="4Gg-JY-9Yo">
+                    <rect key="frame" x="0.0" y="193" width="375" height="60"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="4Gg-JY-9Yo" id="7Su-0t-5EZ">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="evq-G0-rF6">
+                          <rect key="frame" x="16" y="0.0" width="359" height="60"/>
+                          <subviews>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_hdjr" translatesAutoresizingMaskIntoConstraints="NO" id="kBX-9l-V1q">
+                              <rect key="frame" x="0.0" y="19" width="22" height="22"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="22" id="1FT-SO-P9R"/>
+                                <constraint firstAttribute="height" constant="22" id="rqM-2X-wbT"/>
+                              </constraints>
+                            </imageView>
+                            <pickerView tag="110" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pyF-R2-ql8">
+                              <rect key="frame" x="37" y="0.0" width="322" height="60"/>
+                              <connections>
+                                <outlet property="dataSource" destination="Vxk-45-vB1" id="5Dd-B7-Q9q"/>
+                                <outlet property="delegate" destination="Vxk-45-vB1" id="8qX-9R-aTO"/>
+                              </connections>
+                            </pickerView>
+                          </subviews>
+                        </stackView>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="evq-G0-rF6" firstAttribute="top" secondItem="7Su-0t-5EZ" secondAttribute="top" id="1VO-mL-jHa"/>
+                        <constraint firstItem="evq-G0-rF6" firstAttribute="leading" secondItem="7Su-0t-5EZ" secondAttribute="leading" constant="16" id="h8s-cf-9Sd"/>
+                        <constraint firstAttribute="trailing" secondItem="evq-G0-rF6" secondAttribute="trailing" id="oUj-3c-7gc"/>
+                        <constraint firstAttribute="bottom" secondItem="evq-G0-rF6" secondAttribute="bottom" id="uSr-V1-QZu"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="45" id="qQX-Lv-NHQ">
+                    <rect key="frame" x="0.0" y="253" width="375" height="45"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qQX-Lv-NHQ" id="Tln-Ch-B5c">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="45"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="i8o-dB-E0v">
+                          <rect key="frame" x="20" y="8" width="339" height="29"/>
+                          <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dgr-Bu-MAQ" userLabel="blue">
+                              <rect key="frame" x="0.0" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="gmX-mE-SDk">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="6VV-qr-hlC"/>
+                                    <constraint firstAttribute="width" constant="18" id="Uxh-wh-1YZ"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.25882352941176467" green="0.5607843137254902" blue="0.9882352941176471" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="gmX-mE-SDk" firstAttribute="centerX" secondItem="Dgr-Bu-MAQ" secondAttribute="centerX" id="9aJ-c0-KjP"/>
+                                <constraint firstAttribute="width" constant="24" id="Ivw-Nt-e8L"/>
+                                <constraint firstItem="gmX-mE-SDk" firstAttribute="centerY" secondItem="Dgr-Bu-MAQ" secondAttribute="centerY" id="Y6X-EZ-SM0"/>
+                                <constraint firstAttribute="height" constant="24" id="aY4-rA-in7"/>
+                              </constraints>
+                            </view>
+                            <view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nS3-qA-VwA" userLabel="green">
+                              <rect key="frame" x="45" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="D3N-kh-Mq7">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="WOI-Ze-YEg"/>
+                                    <constraint firstAttribute="width" constant="18" id="ZQ2-1O-AN1"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.35686274509803922" green="0.80000000000000004" blue="0.38039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="D3N-kh-Mq7" firstAttribute="centerY" secondItem="nS3-qA-VwA" secondAttribute="centerY" id="8BK-XT-xJE"/>
+                                <constraint firstAttribute="width" constant="24" id="SRZ-Rw-NfW"/>
+                                <constraint firstAttribute="height" constant="24" id="kPY-21-Y5A"/>
+                                <constraint firstItem="D3N-kh-Mq7" firstAttribute="centerX" secondItem="nS3-qA-VwA" secondAttribute="centerX" id="ltQ-jl-c7u"/>
+                              </constraints>
+                            </view>
+                            <view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hRM-n9-khc" userLabel="orangle">
+                              <rect key="frame" x="90" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="KzE-S1-77g">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="AUe-S7-hB3"/>
+                                    <constraint firstAttribute="width" constant="18" id="aFI-ew-wtP"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.97647058823529409" green="0.74901960784313726" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="KzE-S1-77g" firstAttribute="centerY" secondItem="hRM-n9-khc" secondAttribute="centerY" id="HEF-qz-tnK"/>
+                                <constraint firstAttribute="height" constant="24" id="HQu-84-yYi"/>
+                                <constraint firstItem="KzE-S1-77g" firstAttribute="centerX" secondItem="hRM-n9-khc" secondAttribute="centerX" id="ceb-An-1Tu"/>
+                                <constraint firstAttribute="width" constant="24" id="mck-HZ-ZCw"/>
+                              </constraints>
+                            </view>
+                            <view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ggx-2y-fDS" userLabel="crimson">
+                              <rect key="frame" x="135" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="GK6-ih-mWE">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="ae3-zr-8aw"/>
+                                    <constraint firstAttribute="width" constant="18" id="w5l-GX-PJI"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.96862745098039216" green="0.37254901960784315" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="24" id="UMl-J7-DNy"/>
+                                <constraint firstItem="GK6-ih-mWE" firstAttribute="centerX" secondItem="Ggx-2y-fDS" secondAttribute="centerX" id="bXf-5U-QEv"/>
+                                <constraint firstAttribute="height" constant="24" id="hfe-b7-39J"/>
+                                <constraint firstItem="GK6-ih-mWE" firstAttribute="centerY" secondItem="Ggx-2y-fDS" secondAttribute="centerY" id="w1I-Sz-h3c"/>
+                              </constraints>
+                            </view>
+                            <view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OGU-7P-pbj" userLabel="lightpurple">
+                              <rect key="frame" x="180" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="yE3-0X-Ixh">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="width" constant="18" id="ARI-92-xj5"/>
+                                    <constraint firstAttribute="height" constant="18" id="Rnx-ld-gJh"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.94509803921568625" green="0.50196078431372548" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="yE3-0X-Ixh" firstAttribute="centerY" secondItem="OGU-7P-pbj" secondAttribute="centerY" id="782-Qj-Dlk"/>
+                                <constraint firstAttribute="width" constant="24" id="Fv9-El-C1c"/>
+                                <constraint firstAttribute="height" constant="24" id="HVA-E8-C61"/>
+                                <constraint firstItem="yE3-0X-Ixh" firstAttribute="centerX" secondItem="OGU-7P-pbj" secondAttribute="centerX" id="dqb-xX-kM8"/>
+                              </constraints>
+                            </view>
+                            <view tag="5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H7n-vf-H9J" userLabel="purple">
+                              <rect key="frame" x="225" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="D0E-yX-QaI">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="TFo-D4-GPF"/>
+                                    <constraint firstAttribute="width" constant="18" id="iAL-KH-v80"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.56470588235294117" green="0.44705882352941173" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="height" constant="24" id="8gq-CO-eTY"/>
+                                <constraint firstItem="D0E-yX-QaI" firstAttribute="centerY" secondItem="H7n-vf-H9J" secondAttribute="centerY" id="99s-cw-T7m"/>
+                                <constraint firstAttribute="width" constant="24" id="E8S-ZW-5fe"/>
+                                <constraint firstItem="D0E-yX-QaI" firstAttribute="centerX" secondItem="H7n-vf-H9J" secondAttribute="centerX" id="sRT-G7-gp6"/>
+                              </constraints>
+                            </view>
+                            <view tag="6" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="118-Aw-aif" userLabel="gray">
+                              <rect key="frame" x="270" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="8UA-Zc-sdH">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="J8p-K5-Xsp"/>
+                                    <constraint firstAttribute="width" constant="18" id="KUz-t8-9b4"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.56470588235294117" green="0.56470588235294117" blue="0.56470588235294117" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="8UA-Zc-sdH" firstAttribute="centerY" secondItem="118-Aw-aif" secondAttribute="centerY" id="5PU-ld-WL6"/>
+                                <constraint firstAttribute="height" constant="24" id="EoQ-gB-JFa"/>
+                                <constraint firstAttribute="width" constant="24" id="gYN-JO-57r"/>
+                                <constraint firstItem="8UA-Zc-sdH" firstAttribute="centerX" secondItem="118-Aw-aif" secondAttribute="centerX" id="lfI-fD-zeO"/>
+                              </constraints>
+                            </view>
+                            <view tag="7" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aua-TK-Qnv" userLabel="cyanine">
+                              <rect key="frame" x="315" y="2.5" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="tye-Jf-YHm">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="5WS-2e-3QG"/>
+                                    <constraint firstAttribute="width" constant="18" id="mHx-1M-qnT"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.078431372549019607" green="0.38431372549019605" blue="0.74509803921568629" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="24" id="4nx-sl-RIa"/>
+                                <constraint firstAttribute="height" constant="24" id="Kpb-lJ-sTI"/>
+                                <constraint firstItem="tye-Jf-YHm" firstAttribute="centerY" secondItem="aua-TK-Qnv" secondAttribute="centerY" id="cKv-Ul-QD0"/>
+                                <constraint firstItem="tye-Jf-YHm" firstAttribute="centerX" secondItem="aua-TK-Qnv" secondAttribute="centerX" id="cYE-GL-WBJ"/>
+                              </constraints>
+                            </view>
+                          </subviews>
+                        </stackView>
+                      </subviews>
+                      <constraints>
+                        <constraint firstAttribute="trailing" secondItem="i8o-dB-E0v" secondAttribute="trailing" constant="16" id="8Ox-ef-kQX"/>
+                        <constraint firstAttribute="bottom" secondItem="i8o-dB-E0v" secondAttribute="bottom" constant="8" id="Zut-5K-hJS"/>
+                        <constraint firstItem="i8o-dB-E0v" firstAttribute="leading" secondItem="Tln-Ch-B5c" secondAttribute="leading" constant="20" id="iT4-S9-mfI"/>
+                        <constraint firstItem="i8o-dB-E0v" firstAttribute="top" secondItem="Tln-Ch-B5c" secondAttribute="top" constant="8" id="lBf-sr-HQW"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="60" id="u6G-MU-dPL">
+                    <rect key="frame" x="0.0" y="298" width="375" height="60"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="u6G-MU-dPL" id="auw-zx-G07">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="Nvw-Uv-y4F">
+                          <rect key="frame" x="16" y="0.0" width="359" height="60"/>
+                          <subviews>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_tixing" translatesAutoresizingMaskIntoConstraints="NO" id="JPO-Kb-7YE">
+                              <rect key="frame" x="0.0" y="19" width="22" height="22"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="22" id="XHQ-Ne-kEe"/>
+                                <constraint firstAttribute="height" constant="22" id="i2w-Kk-1a1"/>
+                              </constraints>
+                            </imageView>
+                            <pickerView tag="111" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eRL-b7-sZv">
+                              <rect key="frame" x="37" y="0.0" width="322" height="60"/>
+                              <connections>
+                                <outlet property="dataSource" destination="Vxk-45-vB1" id="X6V-QF-7cw"/>
+                                <outlet property="delegate" destination="Vxk-45-vB1" id="cI2-NL-CGH"/>
+                              </connections>
+                            </pickerView>
+                          </subviews>
+                        </stackView>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="Nvw-Uv-y4F" firstAttribute="top" secondItem="auw-zx-G07" secondAttribute="top" id="BS2-oE-3V6"/>
+                        <constraint firstAttribute="bottom" secondItem="Nvw-Uv-y4F" secondAttribute="bottom" id="S9Y-Ea-NPh"/>
+                        <constraint firstAttribute="trailing" secondItem="Nvw-Uv-y4F" secondAttribute="trailing" id="mVM-zG-UZP"/>
+                        <constraint firstItem="Nvw-Uv-y4F" firstAttribute="leading" secondItem="auw-zx-G07" secondAttribute="leading" constant="16" id="oXw-gx-pWs"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="60" id="e5P-Ds-0Jm">
+                    <rect key="frame" x="0.0" y="358" width="375" height="60"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="e5P-Ds-0Jm" id="vBL-Zg-uX0">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="o2n-Cg-nQo">
+                          <rect key="frame" x="16" y="0.0" width="359" height="60"/>
+                          <subviews>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_chongfu" translatesAutoresizingMaskIntoConstraints="NO" id="W5r-qL-MRy">
+                              <rect key="frame" x="0.0" y="19" width="22" height="22"/>
+                              <constraints>
+                                <constraint firstAttribute="height" constant="22" id="eN6-V0-CcT"/>
+                                <constraint firstAttribute="width" constant="22" id="mxs-yb-OVM"/>
+                              </constraints>
+                            </imageView>
+                            <pickerView tag="112" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fbt-RB-x4p">
+                              <rect key="frame" x="37" y="0.0" width="322" height="60"/>
+                              <connections>
+                                <outlet property="dataSource" destination="Vxk-45-vB1" id="cCT-Ga-6th"/>
+                                <outlet property="delegate" destination="Vxk-45-vB1" id="TRG-7c-mdR"/>
+                              </connections>
+                            </pickerView>
+                          </subviews>
+                          <constraints>
+                            <constraint firstAttribute="height" constant="60" id="gjT-w1-VIx"/>
+                          </constraints>
+                        </stackView>
+                        <stackView hidden="YES" opaque="NO" contentMode="scaleToFill" alignment="center" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="F44-6G-rM2">
+                          <rect key="frame" x="32" y="65" width="311" height="20"/>
+                          <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="截至日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IMf-BA-twt">
+                              <rect key="frame" x="0.0" y="3" width="64" height="14.5"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="64" id="oup-D2-hLu"/>
+                              </constraints>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <nil key="textColor"/>
+                              <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k6W-yh-OR2">
+                              <rect key="frame" x="79" y="0.0" width="232" height="20"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              <nil key="highlightedColor"/>
+                            </label>
+                          </subviews>
+                          <constraints>
+                            <constraint firstAttribute="height" constant="20" id="iwQ-Pk-1HS"/>
+                          </constraints>
+                        </stackView>
+                        <stackView hidden="YES" opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="vc3-qe-cTN">
+                          <rect key="frame" x="32" y="90" width="327" height="27"/>
+                          <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qy2-Ll-2FL">
+                              <rect key="frame" x="0.0" y="0.0" width="30" height="27"/>
+                              <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周一">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                            <button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hQt-nQ-yDV">
+                              <rect key="frame" x="49.5" y="0.0" width="30" height="27"/>
+                              <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周二">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                            <button opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GeN-7S-V8E">
+                              <rect key="frame" x="99" y="0.0" width="30" height="27"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周三">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                            <button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xOJ-cj-hMc">
+                              <rect key="frame" x="148.5" y="0.0" width="30" height="27"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周四">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                            <button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Szk-bc-YOL">
+                              <rect key="frame" x="198" y="0.0" width="30" height="27"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周五">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                            <button opaque="NO" tag="5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qxa-Na-eLg">
+                              <rect key="frame" x="247.5" y="0.0" width="30" height="27"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周六">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                            <button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="To9-IU-AE6">
+                              <rect key="frame" x="297" y="0.0" width="30" height="27"/>
+                              <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
+                              <state key="normal" title="周日">
+                                <color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                              </state>
+                            </button>
+                          </subviews>
+                        </stackView>
+                      </subviews>
+                      <constraints>
+                        <constraint firstAttribute="trailingMargin" secondItem="F44-6G-rM2" secondAttribute="trailing" constant="16" id="2ZB-Co-2pB"/>
+                        <constraint firstItem="F44-6G-rM2" firstAttribute="top" secondItem="o2n-Cg-nQo" secondAttribute="bottom" constant="5" id="8pt-BZ-t3e"/>
+                        <constraint firstAttribute="trailingMargin" secondItem="vc3-qe-cTN" secondAttribute="trailing" id="F4z-Sg-29S"/>
+                        <constraint firstItem="vc3-qe-cTN" firstAttribute="top" secondItem="F44-6G-rM2" secondAttribute="bottom" constant="5" id="SS2-2g-5NJ"/>
+                        <constraint firstItem="vc3-qe-cTN" firstAttribute="leading" secondItem="vBL-Zg-uX0" secondAttribute="leadingMargin" constant="16" id="XMb-c7-8LK"/>
+                        <constraint firstItem="o2n-Cg-nQo" firstAttribute="leading" secondItem="vBL-Zg-uX0" secondAttribute="leading" constant="16" id="eqQ-It-Ump"/>
+                        <constraint firstAttribute="trailing" secondItem="o2n-Cg-nQo" secondAttribute="trailing" id="oxH-8z-faW"/>
+                        <constraint firstItem="F44-6G-rM2" firstAttribute="leading" secondItem="vBL-Zg-uX0" secondAttribute="leadingMargin" constant="16" id="qc8-ft-bgf"/>
+                        <constraint firstItem="o2n-Cg-nQo" firstAttribute="top" secondItem="vBL-Zg-uX0" secondAttribute="top" id="xMp-X8-TEi"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="206" id="mRu-Km-9dY">
+                    <rect key="frame" x="0.0" y="418" width="375" height="206"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mRu-Km-9dY" id="HFU-yb-U6N">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="206"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OMA-Fp-nFl">
+                          <rect key="frame" x="16" y="148" width="343" height="40"/>
+                          <color key="backgroundColor" red="0.98431372549019602" green="0.27843137254901962" blue="0.27843137254901962" alpha="1" colorSpace="calibratedRGB"/>
+                          <constraints>
+                            <constraint firstAttribute="height" constant="40" id="z38-hq-zd6"/>
+                          </constraints>
+                          <state key="normal" title="删   除">
+                            <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                          </state>
+                          <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                              <real key="value" value="5"/>
+                            </userDefinedRuntimeAttribute>
+                          </userDefinedRuntimeAttributes>
+                          <connections>
+                            <action selector="tapDeleteBtn:" destination="Vxk-45-vB1" eventType="touchUpInside" id="d3V-gw-XoF"/>
+                          </connections>
+                        </button>
+                        <webView contentMode="scaleToFill" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="S5p-a6-Tlk">
+                          <rect key="frame" x="16" y="11" width="343" height="90"/>
+                          <color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        </webView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pZL-hd-WYm">
+                          <rect key="frame" x="16" y="109" width="62" height="30"/>
+                          <state key="normal" title="编辑内容"/>
+                          <connections>
+                            <segue destination="LoN-sU-f4i" kind="presentation" id="HaO-ws-b1o"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="S5p-a6-Tlk" firstAttribute="trailing" secondItem="OMA-Fp-nFl" secondAttribute="trailing" id="7E1-je-yNn"/>
+                        <constraint firstItem="pZL-hd-WYm" firstAttribute="top" secondItem="S5p-a6-Tlk" secondAttribute="bottom" constant="8" id="9Z2-Ml-EPm"/>
+                        <constraint firstItem="OMA-Fp-nFl" firstAttribute="top" secondItem="pZL-hd-WYm" secondAttribute="bottom" constant="9" id="Olk-nI-9EA"/>
+                        <constraint firstItem="S5p-a6-Tlk" firstAttribute="leading" secondItem="pZL-hd-WYm" secondAttribute="leading" id="PLd-73-1r0"/>
+                        <constraint firstItem="pZL-hd-WYm" firstAttribute="leading" secondItem="OMA-Fp-nFl" secondAttribute="leading" id="XmT-aR-1oc"/>
+                        <constraint firstItem="OMA-Fp-nFl" firstAttribute="leading" secondItem="HFU-yb-U6N" secondAttribute="leading" constant="16" id="aya-2K-2Jr"/>
+                        <constraint firstAttribute="bottomMargin" secondItem="OMA-Fp-nFl" secondAttribute="bottom" constant="7" id="h7A-3s-Y55"/>
+                        <constraint firstItem="S5p-a6-Tlk" firstAttribute="top" secondItem="HFU-yb-U6N" secondAttribute="topMargin" id="q12-WJ-gjX"/>
+                        <constraint firstItem="S5p-a6-Tlk" firstAttribute="trailing" secondItem="HFU-yb-U6N" secondAttribute="trailingMargin" id="qjj-Vg-Thi"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                </cells>
+              </tableViewSection>
+            </sections>
+            <connections>
+              <outlet property="dataSource" destination="Vxk-45-vB1" id="XpN-cu-Ay8"/>
+              <outlet property="delegate" destination="Vxk-45-vB1" id="18X-HM-sWl"/>
+            </connections>
+          </tableView>
+          <connections>
+            <outlet property="calendarPickerView" destination="pyF-R2-ql8" id="ff9-q3-kSd"/>
+            <outlet property="deleteBtn" destination="OMA-Fp-nFl" id="TGm-RG-0hj"/>
+            <outlet property="evenEndTimeStackView" destination="lNF-vK-WbX" id="Ad5-xH-qU5"/>
+            <outlet property="eventAllDaySwitch" destination="PwN-cV-5Cp" id="2NZ-HE-72x"/>
+            <outlet property="eventColorStackView" destination="i8o-dB-E0v" id="cbm-j1-pSM"/>
+            <outlet property="eventEndTime" destination="Rqe-Vw-UzF" id="TET-gY-0on"/>
+            <outlet property="eventStartTime" destination="Dub-8d-dx7" id="9np-fO-mk8"/>
+            <outlet property="eventStartTimeStackView" destination="HqM-sQ-xhn" id="kkn-0i-smN"/>
+            <outlet property="eventTitle" destination="gaP-Lw-V7E" id="7V2-hB-clk"/>
+            <outlet property="remindPickerView" destination="eRL-b7-sZv" id="XWt-3h-5tg"/>
+            <outlet property="repeatPickerView" destination="fbt-RB-x4p" id="hTZ-eo-mYS"/>
+            <outlet property="repeatTableViewCell" destination="e5P-Ds-0Jm" id="vbx-6i-wdG"/>
+            <outlet property="untilDateLabel" destination="k6W-yh-OR2" id="Z4N-tW-TwM"/>
+            <outlet property="untilDateStackView" destination="F44-6G-rM2" id="od1-Zb-XkP"/>
+            <outlet property="webRemark" destination="S5p-a6-Tlk" id="RgQ-ZK-Iis"/>
+            <outlet property="weekDaysStackView" destination="vc3-qe-cTN" id="D73-xs-enz"/>
+          </connections>
+        </tableViewController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="UiU-q1-2zR" userLabel="First Responder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="1816.8" y="-694.00299850074964"/>
+    </scene>
+    <!--Navigation Controller-->
+    <scene sceneID="Uen-X6-xyC">
+      <objects>
+        <navigationController automaticallyAdjustsScrollViewInsets="NO" id="tKt-3P-uQz" customClass="ZLNavigationController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <toolbarItems/>
+          <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="tBY-YA-bTM">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+            <autoresizingMask key="autoresizingMask"/>
+          </navigationBar>
+          <nil name="viewControllers"/>
+          <connections>
+            <segue destination="xYY-yG-JGa" kind="relationship" relationship="rootViewController" id="1nR-FI-RTb"/>
+          </connections>
+        </navigationController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="Ia6-rz-Icf" userLabel="First Responder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="-90.400000000000006" y="-694.00299850074964"/>
+    </scene>
+    <!--Calendar Left Menu Controller-->
+    <scene sceneID="3By-VB-pei">
+      <objects>
+        <tableViewController id="L5W-fh-UuH" customClass="OOCalendarLeftMenuController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="FSW-kR-JAk">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <containerView key="tableHeaderView" opaque="NO" contentMode="scaleToFill" id="KcX-qQ-DIF">
+              <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
+              <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+              <connections>
+                <segue destination="xFe-Nw-gR2" kind="embed" id="JrC-H1-NOw"/>
+              </connections>
+            </containerView>
+            <prototypes>
+              <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="calendarTableCell" id="hIV-F8-hEt" customClass="CalendarTableViewCell" customModule="O2Platform" customModuleProvider="target">
+                <rect key="frame" x="0.0" y="78" width="375" height="43.5"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hIV-F8-hEt" id="vcr-nc-qYD">
+                  <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                  <autoresizingMask key="autoresizingMask"/>
+                  <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nUr-LS-pfg">
+                      <rect key="frame" x="24" y="13" width="18" height="18"/>
+                      <color key="backgroundColor" red="0.29803921570000003" green="0.68627450980000004" blue="0.31372549020000001" alpha="1" colorSpace="calibratedRGB"/>
+                      <constraints>
+                        <constraint firstAttribute="width" constant="18" id="5lB-4A-bhs"/>
+                        <constraint firstAttribute="height" constant="18" id="GBp-du-Gru"/>
+                      </constraints>
+                      <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                          <real key="value" value="9"/>
+                        </userDefinedRuntimeAttribute>
+                      </userDefinedRuntimeAttributes>
                     </view>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="6Z9-K4-mSY" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="711" y="-114"/>
-        </scene>
-        <!--Calendar View Controller-->
-        <scene sceneID="k3n-BF-rgt">
-            <objects>
-                <tableViewController id="6hI-Zf-Dol" customClass="OOCalendarViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
-                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="m9A-UR-VmU">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <sections>
-                            <tableViewSection id="Mag-aW-ELK">
-                                <cells>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="ky5-3M-po5">
-                                        <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ky5-3M-po5" id="ey7-OW-MZr">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="例如:我的日历" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="E1I-tu-3OF">
-                                                    <rect key="frame" x="16" y="10" width="349" height="23.5"/>
-                                                    <nil key="textColor"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                                    <textInputTraits key="textInputTraits"/>
-                                                </textField>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="trailing" secondItem="E1I-tu-3OF" secondAttribute="trailing" constant="10" id="0zd-rU-i9l"/>
-                                                <constraint firstAttribute="bottom" secondItem="E1I-tu-3OF" secondAttribute="bottom" constant="10" id="1Ai-iW-Gr4"/>
-                                                <constraint firstItem="E1I-tu-3OF" firstAttribute="leading" secondItem="ey7-OW-MZr" secondAttribute="leading" constant="16" id="ug4-Pk-Lb7"/>
-                                                <constraint firstItem="E1I-tu-3OF" firstAttribute="top" secondItem="ey7-OW-MZr" secondAttribute="top" constant="10" id="xW5-Or-ZFH"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="imH-Dp-MJa">
-                                        <rect key="frame" x="0.0" y="44" width="375" height="44"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="imH-Dp-MJa" id="Pnd-27-RRL">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="fl8-ZU-9Cp">
-                                                    <rect key="frame" x="16" y="8" width="50" height="27.5"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="48" id="GYo-gg-b9Y"/>
-                                                    </constraints>
-                                                    <connections>
-                                                        <action selector="tapAllDaySwitch:" destination="Vxk-45-vB1" eventType="valueChanged" id="uyw-pR-SBK"/>
-                                                    </connections>
-                                                </switch>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="是否公开" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="915-R7-0Ph">
-                                                    <rect key="frame" x="74" y="8" width="70" height="27.5"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="915-R7-0Ph" firstAttribute="leading" secondItem="fl8-ZU-9Cp" secondAttribute="trailing" constant="10" id="6LP-5t-yu6"/>
-                                                <constraint firstItem="fl8-ZU-9Cp" firstAttribute="top" secondItem="Pnd-27-RRL" secondAttribute="top" constant="8" id="m1N-gR-9GW"/>
-                                                <constraint firstItem="915-R7-0Ph" firstAttribute="top" secondItem="Pnd-27-RRL" secondAttribute="top" constant="8" id="o5r-2x-ZWm"/>
-                                                <constraint firstItem="fl8-ZU-9Cp" firstAttribute="leading" secondItem="Pnd-27-RRL" secondAttribute="leading" constant="16" id="od7-nI-vWr"/>
-                                                <constraint firstAttribute="bottom" secondItem="fl8-ZU-9Cp" secondAttribute="bottom" constant="8" id="pVF-nh-QnE"/>
-                                                <constraint firstAttribute="bottom" secondItem="915-R7-0Ph" secondAttribute="bottom" constant="8" id="rjx-tf-iGC"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="afV-IA-a4y">
-                                        <rect key="frame" x="0.0" y="88" width="375" height="44"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="afV-IA-a4y" id="4vX-Ja-OcF">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="sc4-ds-up5">
-                                                    <rect key="frame" x="16" y="8" width="349" height="27.5"/>
-                                                    <subviews>
-                                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZZL-hY-6YY" userLabel="blue">
-                                                            <rect key="frame" x="0.0" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="4Zq-Ya-Cty">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="Fcw-yJ-iVq"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="LGR-Zl-j45"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.25882352939999997" green="0.56078431370000004" blue="0.98823529409999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="height" constant="24" id="X2E-o7-Hl7"/>
-                                                                <constraint firstItem="4Zq-Ya-Cty" firstAttribute="centerY" secondItem="ZZL-hY-6YY" secondAttribute="centerY" id="bvj-V3-vbS"/>
-                                                                <constraint firstItem="4Zq-Ya-Cty" firstAttribute="centerX" secondItem="ZZL-hY-6YY" secondAttribute="centerX" id="c7f-RH-KRl"/>
-                                                                <constraint firstAttribute="width" constant="24" id="eSi-ds-FcL"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NYD-3q-2cV" userLabel="green">
-                                                            <rect key="frame" x="46.5" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="HeG-XU-b83">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="width" constant="18" id="Idk-aY-FpI"/>
-                                                                        <constraint firstAttribute="height" constant="18" id="w2Y-0G-V64"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.35686274509999999" green="0.80000000000000004" blue="0.3803921569" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="HeG-XU-b83" firstAttribute="centerY" secondItem="NYD-3q-2cV" secondAttribute="centerY" id="6Iz-zC-yuG"/>
-                                                                <constraint firstAttribute="height" constant="24" id="KDu-a8-a8H"/>
-                                                                <constraint firstAttribute="width" constant="24" id="OLu-AH-Xss"/>
-                                                                <constraint firstItem="HeG-XU-b83" firstAttribute="centerX" secondItem="NYD-3q-2cV" secondAttribute="centerX" id="pWl-Hi-P1L"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D56-uh-5fZ" userLabel="orangle">
-                                                            <rect key="frame" x="93" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="g39-3s-lMM">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="hYd-J9-VyB"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="qo5-L5-4b2"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.97647058819999999" green="0.74901960779999999" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="g39-3s-lMM" firstAttribute="centerX" secondItem="D56-uh-5fZ" secondAttribute="centerX" id="SAm-8O-8Qy"/>
-                                                                <constraint firstAttribute="height" constant="24" id="TQc-uS-y6T"/>
-                                                                <constraint firstItem="g39-3s-lMM" firstAttribute="centerY" secondItem="D56-uh-5fZ" secondAttribute="centerY" id="cr8-sO-DAu"/>
-                                                                <constraint firstAttribute="width" constant="24" id="o7H-Zp-ELR"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="woZ-Gb-d4P" userLabel="crimson">
-                                                            <rect key="frame" x="139.5" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="4kU-pE-6cc">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="7Gi-fy-FPq"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="H4Q-Xw-YFg"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.96862745100000003" green="0.37254901959999998" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="4kU-pE-6cc" firstAttribute="centerX" secondItem="woZ-Gb-d4P" secondAttribute="centerX" id="ATO-bL-qRR"/>
-                                                                <constraint firstAttribute="width" constant="24" id="FnE-PG-2ma"/>
-                                                                <constraint firstItem="4kU-pE-6cc" firstAttribute="centerY" secondItem="woZ-Gb-d4P" secondAttribute="centerY" id="TCZ-Eb-eja"/>
-                                                                <constraint firstAttribute="height" constant="24" id="Xlk-td-GPN"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yqn-YF-8O7" userLabel="lightpurple">
-                                                            <rect key="frame" x="185.5" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="s1R-I4-hnF">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="fUV-fB-nwm"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="uAF-QS-bqm"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.94509803920000002" green="0.50196078430000002" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="height" constant="24" id="B2G-ZS-kx2"/>
-                                                                <constraint firstItem="s1R-I4-hnF" firstAttribute="centerY" secondItem="yqn-YF-8O7" secondAttribute="centerY" id="F6f-lB-X3R"/>
-                                                                <constraint firstItem="s1R-I4-hnF" firstAttribute="centerX" secondItem="yqn-YF-8O7" secondAttribute="centerX" id="PUB-qH-aE6"/>
-                                                                <constraint firstAttribute="width" constant="24" id="S0L-3x-4x2"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JiP-uY-CBd" userLabel="purple">
-                                                            <rect key="frame" x="232" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="29t-6S-Hlb">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="width" constant="18" id="JBI-jM-OBE"/>
-                                                                        <constraint firstAttribute="height" constant="18" id="ilL-Cn-r8J"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.56470588239999997" green="0.44705882349999998" blue="0.94509803920000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstItem="29t-6S-Hlb" firstAttribute="centerX" secondItem="JiP-uY-CBd" secondAttribute="centerX" id="BVU-WV-f1d"/>
-                                                                <constraint firstAttribute="width" constant="24" id="FYA-DA-JpN"/>
-                                                                <constraint firstAttribute="height" constant="24" id="Q9u-5Y-iYr"/>
-                                                                <constraint firstItem="29t-6S-Hlb" firstAttribute="centerY" secondItem="JiP-uY-CBd" secondAttribute="centerY" id="g7A-xs-AxP"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="6" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rKC-SP-A0D" userLabel="gray">
-                                                            <rect key="frame" x="278.5" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="li5-KM-yd4">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="Sd2-xX-C2A"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="bQi-Yf-rGw"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.56470588239999997" green="0.56470588239999997" blue="0.56470588239999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="width" constant="24" id="06B-K1-xFi"/>
-                                                                <constraint firstItem="li5-KM-yd4" firstAttribute="centerX" secondItem="rKC-SP-A0D" secondAttribute="centerX" id="esH-dd-mLK"/>
-                                                                <constraint firstAttribute="height" constant="24" id="xye-1s-JaE"/>
-                                                                <constraint firstItem="li5-KM-yd4" firstAttribute="centerY" secondItem="rKC-SP-A0D" secondAttribute="centerY" id="yDt-LZ-FMl"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                        <view tag="7" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T4I-Zn-V9w" userLabel="cyanine">
-                                                            <rect key="frame" x="325" y="2" width="24" height="24"/>
-                                                            <subviews>
-                                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="nx0-x2-HnL">
-                                                                    <rect key="frame" x="3" y="3" width="18" height="18"/>
-                                                                    <constraints>
-                                                                        <constraint firstAttribute="height" constant="18" id="ZZD-of-lra"/>
-                                                                        <constraint firstAttribute="width" constant="18" id="zM0-w1-q9Q"/>
-                                                                    </constraints>
-                                                                </imageView>
-                                                            </subviews>
-                                                            <color key="backgroundColor" red="0.078431372550000003" green="0.38431372549999998" blue="0.74509803919999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                                            <constraints>
-                                                                <constraint firstAttribute="height" constant="24" id="342-MO-tsM"/>
-                                                                <constraint firstItem="nx0-x2-HnL" firstAttribute="centerX" secondItem="T4I-Zn-V9w" secondAttribute="centerX" id="Laq-Vq-kDh"/>
-                                                                <constraint firstItem="nx0-x2-HnL" firstAttribute="centerY" secondItem="T4I-Zn-V9w" secondAttribute="centerY" id="RCd-Hw-gdu"/>
-                                                                <constraint firstAttribute="width" constant="24" id="cEt-IQ-FHo"/>
-                                                            </constraints>
-                                                            <userDefinedRuntimeAttributes>
-                                                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                                    <real key="value" value="12"/>
-                                                                </userDefinedRuntimeAttribute>
-                                                            </userDefinedRuntimeAttributes>
-                                                        </view>
-                                                    </subviews>
-                                                </stackView>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstAttribute="bottom" secondItem="sc4-ds-up5" secondAttribute="bottom" constant="8" id="BJ9-sN-hUK"/>
-                                                <constraint firstAttribute="trailing" secondItem="sc4-ds-up5" secondAttribute="trailing" constant="10" id="QYU-vK-aEh"/>
-                                                <constraint firstItem="sc4-ds-up5" firstAttribute="leading" secondItem="4vX-Ja-OcF" secondAttribute="leading" constant="16" id="meC-wG-0Ge"/>
-                                                <constraint firstItem="sc4-ds-up5" firstAttribute="top" secondItem="4vX-Ja-OcF" secondAttribute="top" constant="8" id="q1X-8e-Shr"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="100" id="w3N-VO-khd">
-                                        <rect key="frame" x="0.0" y="132" width="375" height="100"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="w3N-VO-khd" id="HdW-WP-zq7">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <subviews>
-                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" placeholder="添加说明" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0zU-2p-l4e">
-                                                    <rect key="frame" x="16" y="8" width="349" height="40"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="40" id="Ryd-Gz-Ta1"/>
-                                                    </constraints>
-                                                    <nil key="textColor"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                                    <textInputTraits key="textInputTraits"/>
-                                                </textField>
-                                                <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fPK-4K-uqx">
-                                                    <rect key="frame" x="16" y="56" width="343" height="40"/>
-                                                    <color key="backgroundColor" red="0.98431372549999996" green="0.2784313725" blue="0.2784313725" alpha="1" colorSpace="calibratedRGB"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="40" id="ar9-84-HBP"/>
-                                                    </constraints>
-                                                    <state key="normal" title="删   除">
-                                                        <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                    </state>
-                                                    <userDefinedRuntimeAttributes>
-                                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                            <real key="value" value="5"/>
-                                                        </userDefinedRuntimeAttribute>
-                                                    </userDefinedRuntimeAttributes>
-                                                    <connections>
-                                                        <action selector="deleteBtnTap:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="aPc-91-RY3"/>
-                                                        <action selector="tapDeleteBtn:" destination="Vxk-45-vB1" eventType="touchUpInside" id="Ct1-ny-L2j"/>
-                                                    </connections>
-                                                </button>
-                                            </subviews>
-                                            <constraints>
-                                                <constraint firstItem="0zU-2p-l4e" firstAttribute="top" secondItem="HdW-WP-zq7" secondAttribute="top" constant="8" id="GIN-dS-e04"/>
-                                                <constraint firstAttribute="trailing" secondItem="fPK-4K-uqx" secondAttribute="trailing" constant="16" id="dDp-3m-eQV"/>
-                                                <constraint firstItem="fPK-4K-uqx" firstAttribute="top" secondItem="0zU-2p-l4e" secondAttribute="bottom" constant="8" id="gaf-NU-3Jr"/>
-                                                <constraint firstAttribute="trailing" secondItem="0zU-2p-l4e" secondAttribute="trailing" constant="10" id="hS1-Op-3lS"/>
-                                                <constraint firstItem="0zU-2p-l4e" firstAttribute="leading" secondItem="HdW-WP-zq7" secondAttribute="leading" constant="16" id="jEy-xu-Vbz"/>
-                                                <constraint firstItem="fPK-4K-uqx" firstAttribute="leading" secondItem="HdW-WP-zq7" secondAttribute="leading" constant="16" id="w4C-Ao-SJv"/>
-                                            </constraints>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                </cells>
-                            </tableViewSection>
-                        </sections>
-                        <connections>
-                            <outlet property="dataSource" destination="6hI-Zf-Dol" id="q6S-ea-AMu"/>
-                            <outlet property="delegate" destination="6hI-Zf-Dol" id="ugR-8t-BpE"/>
-                        </connections>
-                    </tableView>
-                    <connections>
-                        <outlet property="calendarColorStackView" destination="sc4-ds-up5" id="M83-qQ-5Dg"/>
-                        <outlet property="calendarDeleteBtn" destination="fPK-4K-uqx" id="ph2-Fe-3lA"/>
-                        <outlet property="calendarIsOpenSwitch" destination="fl8-ZU-9Cp" id="B0z-eA-yDa"/>
-                        <outlet property="calendarNameField" destination="E1I-tu-3OF" id="43n-JC-CE2"/>
-                        <outlet property="calendarRemarkField" destination="0zU-2p-l4e" id="ia9-f3-lRI"/>
-                    </connections>
-                </tableViewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="Kl7-oF-Qbs" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="1650" y="98"/>
-        </scene>
-    </scenes>
-    <resources>
-        <image name="check" width="23" height="20"/>
-        <image name="icon_arrow" width="22" height="22"/>
-        <image name="icon_chongfu" width="22" height="22"/>
-        <image name="icon_hdjr" width="22" height="22"/>
-        <image name="icon_shijian" width="22" height="22"/>
-        <image name="icon_tixing" width="22" height="22"/>
-        <image name="icon_zengjia" width="22" height="22"/>
-    </resources>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的日历" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="onv-WL-BxB">
+                      <rect key="frame" x="52" y="11.5" width="263" height="20.5"/>
+                      <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                      <nil key="textColor"/>
+                      <nil key="highlightedColor"/>
+                    </label>
+                    <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BTT-cO-3bH">
+                      <rect key="frame" x="325" y="10" width="34" height="24"/>
+                      <constraints>
+                        <constraint firstAttribute="height" constant="24" id="vBm-Id-XQ9"/>
+                        <constraint firstAttribute="width" constant="32" id="ySg-20-HOz"/>
+                      </constraints>
+                      <connections>
+                        <action selector="calendarSwitchTap:" destination="hIV-F8-hEt" eventType="valueChanged" id="cgk-KU-AwN"/>
+                      </connections>
+                    </switch>
+                  </subviews>
+                  <constraints>
+                    <constraint firstItem="nUr-LS-pfg" firstAttribute="centerY" secondItem="vcr-nc-qYD" secondAttribute="centerY" id="0fm-s1-CUn"/>
+                    <constraint firstItem="BTT-cO-3bH" firstAttribute="centerY" secondItem="vcr-nc-qYD" secondAttribute="centerY" id="JcJ-17-Hw0"/>
+                    <constraint firstItem="onv-WL-BxB" firstAttribute="centerY" secondItem="vcr-nc-qYD" secondAttribute="centerY" id="MiO-8E-It5"/>
+                    <constraint firstItem="BTT-cO-3bH" firstAttribute="leading" secondItem="onv-WL-BxB" secondAttribute="trailing" constant="10" id="ZWp-uB-5KZ"/>
+                    <constraint firstItem="onv-WL-BxB" firstAttribute="leading" secondItem="nUr-LS-pfg" secondAttribute="trailing" constant="10" id="bbS-0Q-jnE"/>
+                    <constraint firstAttribute="trailing" secondItem="BTT-cO-3bH" secondAttribute="trailing" constant="18" id="kUb-UW-eTW"/>
+                    <constraint firstItem="nUr-LS-pfg" firstAttribute="leading" secondItem="vcr-nc-qYD" secondAttribute="leading" constant="24" id="sih-O1-7td"/>
+                  </constraints>
+                </tableViewCellContentView>
+                <connections>
+                  <outlet property="calendarColorView" destination="nUr-LS-pfg" id="OOL-1P-0oF"/>
+                  <outlet property="calendarNameView" destination="onv-WL-BxB" id="QCD-H7-VUE"/>
+                  <outlet property="calendarSwitch" destination="BTT-cO-3bH" id="dFh-ng-dUj"/>
+                </connections>
+              </tableViewCell>
+            </prototypes>
+            <sections/>
+            <connections>
+              <outlet property="dataSource" destination="L5W-fh-UuH" id="Sjl-ck-xz3"/>
+              <outlet property="delegate" destination="L5W-fh-UuH" id="Hl3-Fp-5PQ"/>
+            </connections>
+          </tableView>
+          <connections>
+            <outlet property="addCalendarBtnView" destination="KcX-qQ-DIF" id="kAk-es-Ig5"/>
+            <segue destination="6hI-Zf-Dol" kind="show" identifier="showCalendarSegue" id="dTl-zx-3mn"/>
+          </connections>
+        </tableViewController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="ffa-JI-hF2" userLabel="First Responder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="-90" y="139"/>
+    </scene>
+    <!--View Controller-->
+    <scene sceneID="EQw-x0-gJd">
+      <objects>
+        <viewController id="xFe-Nw-gR2" sceneMemberID="viewController">
+          <view key="view" contentMode="scaleToFill" id="lIW-wy-yeL">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+              <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="9kE-CW-qbe">
+                <rect key="frame" x="32" y="0.0" width="311" height="50"/>
+                <subviews>
+                  <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_zengjia" translatesAutoresizingMaskIntoConstraints="NO" id="fce-xE-dhf">
+                    <rect key="frame" x="0.0" y="14" width="22" height="22"/>
+                    <constraints>
+                      <constraint firstAttribute="height" constant="22" id="nfU-kQ-Cuu"/>
+                      <constraint firstAttribute="width" constant="22" id="sK8-rN-1yv"/>
+                    </constraints>
+                  </imageView>
+                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="新增日历" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lgr-ZD-kXw">
+                    <rect key="frame" x="38" y="15" width="273" height="20.5"/>
+                    <gestureRecognizers/>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <nil key="textColor"/>
+                    <nil key="highlightedColor"/>
+                  </label>
+                </subviews>
+              </stackView>
+            </subviews>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+              <constraint firstItem="9kE-CW-qbe" firstAttribute="leading" secondItem="lIW-wy-yeL" secondAttribute="leadingMargin" constant="16" id="5rg-Vk-iwb"/>
+              <constraint firstAttribute="trailingMargin" secondItem="9kE-CW-qbe" secondAttribute="trailing" constant="16" id="Bjh-rF-QQo"/>
+              <constraint firstItem="9kE-CW-qbe" firstAttribute="top" secondItem="lIW-wy-yeL" secondAttribute="topMargin" id="DIn-lL-K5V"/>
+              <constraint firstAttribute="bottomMargin" secondItem="9kE-CW-qbe" secondAttribute="bottom" id="vQB-at-qUU"/>
+            </constraints>
+            <viewLayoutGuide key="safeArea" id="VP9-5C-v7b"/>
+          </view>
+        </viewController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="6Z9-K4-mSY" userLabel="First Responder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="709.60000000000002" y="-114.24287856071965"/>
+    </scene>
+    <!--Calendar View Controller-->
+    <scene sceneID="k3n-BF-rgt">
+      <objects>
+        <tableViewController id="6hI-Zf-Dol" customClass="OOCalendarViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="m9A-UR-VmU">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <sections>
+              <tableViewSection id="Mag-aW-ELK">
+                <cells>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="ky5-3M-po5">
+                    <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ky5-3M-po5" id="ey7-OW-MZr">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="例如:我的日历" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="E1I-tu-3OF">
+                          <rect key="frame" x="16" y="10" width="349" height="24"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                      </subviews>
+                      <constraints>
+                        <constraint firstAttribute="trailing" secondItem="E1I-tu-3OF" secondAttribute="trailing" constant="10" id="0zd-rU-i9l"/>
+                        <constraint firstAttribute="bottom" secondItem="E1I-tu-3OF" secondAttribute="bottom" constant="10" id="1Ai-iW-Gr4"/>
+                        <constraint firstItem="E1I-tu-3OF" firstAttribute="leading" secondItem="ey7-OW-MZr" secondAttribute="leading" constant="16" id="ug4-Pk-Lb7"/>
+                        <constraint firstItem="E1I-tu-3OF" firstAttribute="top" secondItem="ey7-OW-MZr" secondAttribute="top" constant="10" id="xW5-Or-ZFH"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="tk5-Hl-mbm">
+                    <rect key="frame" x="0.0" y="72" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="tk5-Hl-mbm" id="EZA-d2-7f1">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请选择类型" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6Nq-Qx-KK4">
+                          <rect key="frame" x="16" y="5" width="213" height="34"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GjW-u2-fg5">
+                          <rect key="frame" x="297" y="6" width="31" height="30"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <state key="normal" title="选择"/>
+                          <connections>
+                            <action selector="selectType:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="e5v-uq-r9b"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="imH-Dp-MJa">
+                    <rect key="frame" x="0.0" y="116" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="imH-Dp-MJa" id="Pnd-27-RRL">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="fl8-ZU-9Cp">
+                          <rect key="frame" x="16" y="8" width="50" height="28"/>
+                          <constraints>
+                            <constraint firstAttribute="width" constant="48" id="GYo-gg-b9Y"/>
+                          </constraints>
+                          <connections>
+                            <action selector="tapAllDaySwitch:" destination="Vxk-45-vB1" eventType="valueChanged" id="uyw-pR-SBK"/>
+                          </connections>
+                        </switch>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="是否公开" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="915-R7-0Ph">
+                          <rect key="frame" x="74" y="8" width="70" height="28"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                          <nil key="textColor"/>
+                          <nil key="highlightedColor"/>
+                        </label>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="915-R7-0Ph" firstAttribute="leading" secondItem="fl8-ZU-9Cp" secondAttribute="trailing" constant="10" id="6LP-5t-yu6"/>
+                        <constraint firstItem="fl8-ZU-9Cp" firstAttribute="top" secondItem="Pnd-27-RRL" secondAttribute="top" constant="8" id="m1N-gR-9GW"/>
+                        <constraint firstItem="915-R7-0Ph" firstAttribute="top" secondItem="Pnd-27-RRL" secondAttribute="top" constant="8" id="o5r-2x-ZWm"/>
+                        <constraint firstItem="fl8-ZU-9Cp" firstAttribute="leading" secondItem="Pnd-27-RRL" secondAttribute="leading" constant="16" id="od7-nI-vWr"/>
+                        <constraint firstAttribute="bottom" secondItem="fl8-ZU-9Cp" secondAttribute="bottom" constant="8" id="pVF-nh-QnE"/>
+                        <constraint firstAttribute="bottom" secondItem="915-R7-0Ph" secondAttribute="bottom" constant="8" id="rjx-tf-iGC"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="afV-IA-a4y">
+                    <rect key="frame" x="0.0" y="160" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="afV-IA-a4y" id="4vX-Ja-OcF">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="sc4-ds-up5">
+                          <rect key="frame" x="16" y="8" width="349" height="27.5"/>
+                          <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZZL-hY-6YY" userLabel="blue">
+                              <rect key="frame" x="0.0" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="4Zq-Ya-Cty">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="Fcw-yJ-iVq"/>
+                                    <constraint firstAttribute="width" constant="18" id="LGR-Zl-j45"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.25882352939999997" green="0.56078431370000004" blue="0.98823529409999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="height" constant="24" id="X2E-o7-Hl7"/>
+                                <constraint firstItem="4Zq-Ya-Cty" firstAttribute="centerY" secondItem="ZZL-hY-6YY" secondAttribute="centerY" id="bvj-V3-vbS"/>
+                                <constraint firstItem="4Zq-Ya-Cty" firstAttribute="centerX" secondItem="ZZL-hY-6YY" secondAttribute="centerX" id="c7f-RH-KRl"/>
+                                <constraint firstAttribute="width" constant="24" id="eSi-ds-FcL"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NYD-3q-2cV" userLabel="green">
+                              <rect key="frame" x="46.5" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="HeG-XU-b83">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="width" constant="18" id="Idk-aY-FpI"/>
+                                    <constraint firstAttribute="height" constant="18" id="w2Y-0G-V64"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.35686274509999999" green="0.80000000000000004" blue="0.3803921569" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="HeG-XU-b83" firstAttribute="centerY" secondItem="NYD-3q-2cV" secondAttribute="centerY" id="6Iz-zC-yuG"/>
+                                <constraint firstAttribute="height" constant="24" id="KDu-a8-a8H"/>
+                                <constraint firstAttribute="width" constant="24" id="OLu-AH-Xss"/>
+                                <constraint firstItem="HeG-XU-b83" firstAttribute="centerX" secondItem="NYD-3q-2cV" secondAttribute="centerX" id="pWl-Hi-P1L"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D56-uh-5fZ" userLabel="orangle">
+                              <rect key="frame" x="93" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="g39-3s-lMM">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="hYd-J9-VyB"/>
+                                    <constraint firstAttribute="width" constant="18" id="qo5-L5-4b2"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.97647058819999999" green="0.74901960779999999" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="g39-3s-lMM" firstAttribute="centerX" secondItem="D56-uh-5fZ" secondAttribute="centerX" id="SAm-8O-8Qy"/>
+                                <constraint firstAttribute="height" constant="24" id="TQc-uS-y6T"/>
+                                <constraint firstItem="g39-3s-lMM" firstAttribute="centerY" secondItem="D56-uh-5fZ" secondAttribute="centerY" id="cr8-sO-DAu"/>
+                                <constraint firstAttribute="width" constant="24" id="o7H-Zp-ELR"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="woZ-Gb-d4P" userLabel="crimson">
+                              <rect key="frame" x="139.5" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="4kU-pE-6cc">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="7Gi-fy-FPq"/>
+                                    <constraint firstAttribute="width" constant="18" id="H4Q-Xw-YFg"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.96862745100000003" green="0.37254901959999998" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="4kU-pE-6cc" firstAttribute="centerX" secondItem="woZ-Gb-d4P" secondAttribute="centerX" id="ATO-bL-qRR"/>
+                                <constraint firstAttribute="width" constant="24" id="FnE-PG-2ma"/>
+                                <constraint firstItem="4kU-pE-6cc" firstAttribute="centerY" secondItem="woZ-Gb-d4P" secondAttribute="centerY" id="TCZ-Eb-eja"/>
+                                <constraint firstAttribute="height" constant="24" id="Xlk-td-GPN"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yqn-YF-8O7" userLabel="lightpurple">
+                              <rect key="frame" x="185.5" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="s1R-I4-hnF">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="fUV-fB-nwm"/>
+                                    <constraint firstAttribute="width" constant="18" id="uAF-QS-bqm"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.94509803920000002" green="0.50196078430000002" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="height" constant="24" id="B2G-ZS-kx2"/>
+                                <constraint firstItem="s1R-I4-hnF" firstAttribute="centerY" secondItem="yqn-YF-8O7" secondAttribute="centerY" id="F6f-lB-X3R"/>
+                                <constraint firstItem="s1R-I4-hnF" firstAttribute="centerX" secondItem="yqn-YF-8O7" secondAttribute="centerX" id="PUB-qH-aE6"/>
+                                <constraint firstAttribute="width" constant="24" id="S0L-3x-4x2"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JiP-uY-CBd" userLabel="purple">
+                              <rect key="frame" x="232" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="29t-6S-Hlb">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="width" constant="18" id="JBI-jM-OBE"/>
+                                    <constraint firstAttribute="height" constant="18" id="ilL-Cn-r8J"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.56470588239999997" green="0.44705882349999998" blue="0.94509803920000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstItem="29t-6S-Hlb" firstAttribute="centerX" secondItem="JiP-uY-CBd" secondAttribute="centerX" id="BVU-WV-f1d"/>
+                                <constraint firstAttribute="width" constant="24" id="FYA-DA-JpN"/>
+                                <constraint firstAttribute="height" constant="24" id="Q9u-5Y-iYr"/>
+                                <constraint firstItem="29t-6S-Hlb" firstAttribute="centerY" secondItem="JiP-uY-CBd" secondAttribute="centerY" id="g7A-xs-AxP"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="6" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rKC-SP-A0D" userLabel="gray">
+                              <rect key="frame" x="278.5" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="li5-KM-yd4">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="Sd2-xX-C2A"/>
+                                    <constraint firstAttribute="width" constant="18" id="bQi-Yf-rGw"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.56470588239999997" green="0.56470588239999997" blue="0.56470588239999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="width" constant="24" id="06B-K1-xFi"/>
+                                <constraint firstItem="li5-KM-yd4" firstAttribute="centerX" secondItem="rKC-SP-A0D" secondAttribute="centerX" id="esH-dd-mLK"/>
+                                <constraint firstAttribute="height" constant="24" id="xye-1s-JaE"/>
+                                <constraint firstItem="li5-KM-yd4" firstAttribute="centerY" secondItem="rKC-SP-A0D" secondAttribute="centerY" id="yDt-LZ-FMl"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                            <view tag="7" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T4I-Zn-V9w" userLabel="cyanine">
+                              <rect key="frame" x="325" y="2" width="24" height="24"/>
+                              <subviews>
+                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="check" translatesAutoresizingMaskIntoConstraints="NO" id="nx0-x2-HnL">
+                                  <rect key="frame" x="3" y="3" width="18" height="18"/>
+                                  <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="ZZD-of-lra"/>
+                                    <constraint firstAttribute="width" constant="18" id="zM0-w1-q9Q"/>
+                                  </constraints>
+                                </imageView>
+                              </subviews>
+                              <color key="backgroundColor" red="0.078431372550000003" green="0.38431372549999998" blue="0.74509803919999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                              <constraints>
+                                <constraint firstAttribute="height" constant="24" id="342-MO-tsM"/>
+                                <constraint firstItem="nx0-x2-HnL" firstAttribute="centerX" secondItem="T4I-Zn-V9w" secondAttribute="centerX" id="Laq-Vq-kDh"/>
+                                <constraint firstItem="nx0-x2-HnL" firstAttribute="centerY" secondItem="T4I-Zn-V9w" secondAttribute="centerY" id="RCd-Hw-gdu"/>
+                                <constraint firstAttribute="width" constant="24" id="cEt-IQ-FHo"/>
+                              </constraints>
+                              <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                  <real key="value" value="12"/>
+                                </userDefinedRuntimeAttribute>
+                              </userDefinedRuntimeAttributes>
+                            </view>
+                          </subviews>
+                        </stackView>
+                      </subviews>
+                      <constraints>
+                        <constraint firstAttribute="bottom" secondItem="sc4-ds-up5" secondAttribute="bottom" constant="8" id="BJ9-sN-hUK"/>
+                        <constraint firstAttribute="trailing" secondItem="sc4-ds-up5" secondAttribute="trailing" constant="10" id="QYU-vK-aEh"/>
+                        <constraint firstItem="sc4-ds-up5" firstAttribute="leading" secondItem="4vX-Ja-OcF" secondAttribute="leading" constant="16" id="meC-wG-0Ge"/>
+                        <constraint firstItem="sc4-ds-up5" firstAttribute="top" secondItem="4vX-Ja-OcF" secondAttribute="top" constant="8" id="q1X-8e-Shr"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="100" id="w3N-VO-khd">
+                    <rect key="frame" x="0.0" y="204" width="375" height="100"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="w3N-VO-khd" id="HdW-WP-zq7">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="top" placeholder="添加说明" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0zU-2p-l4e">
+                          <rect key="frame" x="16" y="8" width="349" height="54"/>
+                          <constraints>
+                            <constraint firstAttribute="height" constant="40" id="Ryd-Gz-Ta1"/>
+                          </constraints>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                      </subviews>
+                      <constraints>
+                        <constraint firstItem="0zU-2p-l4e" firstAttribute="top" secondItem="HdW-WP-zq7" secondAttribute="top" constant="8" id="GIN-dS-e04"/>
+                        <constraint firstAttribute="trailing" secondItem="0zU-2p-l4e" secondAttribute="trailing" constant="10" id="hS1-Op-3lS"/>
+                        <constraint firstItem="0zU-2p-l4e" firstAttribute="leading" secondItem="HdW-WP-zq7" secondAttribute="leading" constant="16" id="jEy-xu-Vbz"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                </cells>
+              </tableViewSection>
+              <tableViewSection id="j8W-2y-K1h">
+                <cells>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="b9Z-Ey-cMh">
+                    <rect key="frame" x="0.0" y="360" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="b9Z-Ey-cMh" id="SSH-zn-oXh">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择所属组织" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="vpF-O7-lvf">
+                          <rect key="frame" x="16" y="5" width="213" height="34"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kae-RP-FyB">
+                          <rect key="frame" x="297" y="6" width="31" height="30"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <state key="normal" title="选择"/>
+                          <connections>
+                            <action selector="selectOrg:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="ZXk-NJ-BD5"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="sb3-wz-V5h">
+                    <rect key="frame" x="0.0" y="404" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="sb3-wz-V5h" id="iOf-91-Mpo">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择管理者" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bIB-vr-JmD">
+                          <rect key="frame" x="16" y="5" width="213" height="34"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m4R-gF-vOd">
+                          <rect key="frame" x="297" y="6" width="35" height="30"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <state key="normal" title="选择"/>
+                          <connections>
+                            <action selector="selectManager:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="YIp-nK-zaa"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="xjH-ft-A13">
+                    <rect key="frame" x="0.0" y="448" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="xjH-ft-A13" id="08M-eV-Wtw">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择可见范围" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="5RB-dp-23j">
+                          <rect key="frame" x="16" y="5" width="213" height="34"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yrc-Ws-oZH">
+                          <rect key="frame" x="297" y="6" width="31" height="30"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <state key="normal" title="选择"/>
+                          <connections>
+                            <action selector="selectScope:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="5LG-bo-Jk1"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="bqR-JX-7Hn">
+                    <rect key="frame" x="0.0" y="492" width="375" height="44"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="bqR-JX-7Hn" id="uYh-KG-FIU">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择可新建范围" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="HYK-cG-NOj">
+                          <rect key="frame" x="16" y="5" width="213" height="34"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                          <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ueU-we-edj">
+                          <rect key="frame" x="297" y="6" width="31" height="30"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <state key="normal" title="选择"/>
+                          <connections>
+                            <action selector="selectNewScope:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="yAx-yD-Esr"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                </cells>
+              </tableViewSection>
+              <tableViewSection id="kqD-jf-4p2">
+                <cells>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="49" id="M17-7p-CgG">
+                    <rect key="frame" x="0.0" y="592" width="375" height="49"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="M17-7p-CgG" id="W0o-2J-yuQ">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="是否启用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qf3-2G-kRZ">
+                          <rect key="frame" x="64" y="14" width="70" height="21"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                          <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                          <nil key="textColor"/>
+                          <nil key="highlightedColor"/>
+                        </label>
+                        <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GTC-NP-gGg">
+                          <rect key="frame" x="9" y="9" width="49" height="31"/>
+                          <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        </switch>
+                      </subviews>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                  <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="113" id="8mT-v2-Qx8">
+                    <rect key="frame" x="0.0" y="641" width="375" height="113"/>
+                    <autoresizingMask key="autoresizingMask"/>
+                    <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8mT-v2-Qx8" id="87S-Cm-kNa">
+                      <rect key="frame" x="0.0" y="0.0" width="375" height="113"/>
+                      <autoresizingMask key="autoresizingMask"/>
+                      <subviews>
+                        <button hidden="YES" opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ceC-iW-RJC">
+                          <rect key="frame" x="10" y="30" width="343" height="40"/>
+                          <color key="backgroundColor" red="0.98431372549999996" green="0.2784313725" blue="0.2784313725" alpha="1" colorSpace="calibratedRGB"/>
+                          <constraints>
+                            <constraint firstAttribute="height" constant="40" id="hsv-E0-CNX"/>
+                          </constraints>
+                          <state key="normal" title="删   除">
+                            <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                          </state>
+                          <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                              <real key="value" value="5"/>
+                            </userDefinedRuntimeAttribute>
+                          </userDefinedRuntimeAttributes>
+                          <connections>
+                            <action selector="deleteBtnTap:" destination="6hI-Zf-Dol" eventType="touchUpInside" id="Xes-eC-VfF"/>
+                            <action selector="tapDeleteBtn:" destination="Vxk-45-vB1" eventType="touchUpInside" id="IFP-6l-1ZD"/>
+                          </connections>
+                        </button>
+                      </subviews>
+                      <constraints>
+                        <constraint firstAttribute="trailing" secondItem="ceC-iW-RJC" secondAttribute="trailing" constant="16" id="Hrn-eU-isu"/>
+                        <constraint firstItem="ceC-iW-RJC" firstAttribute="leading" secondItem="87S-Cm-kNa" secondAttribute="leading" constant="16" id="clh-qU-E5h"/>
+                        <constraint firstItem="ceC-iW-RJC" firstAttribute="centerY" secondItem="87S-Cm-kNa" secondAttribute="centerY" id="eix-O3-ypw"/>
+                      </constraints>
+                    </tableViewCellContentView>
+                  </tableViewCell>
+                </cells>
+              </tableViewSection>
+            </sections>
+            <connections>
+              <outlet property="dataSource" destination="6hI-Zf-Dol" id="q6S-ea-AMu"/>
+              <outlet property="delegate" destination="6hI-Zf-Dol" id="ugR-8t-BpE"/>
+            </connections>
+          </tableView>
+          <connections>
+            <outlet property="calendarColorStackView" destination="sc4-ds-up5" id="M83-qQ-5Dg"/>
+            <outlet property="calendarDeleteBtn" destination="ceC-iW-RJC" id="hSl-e9-yib"/>
+            <outlet property="calendarIsOpenBtn" destination="GjW-u2-fg5" id="qt3-Vs-Ni9"/>
+            <outlet property="calendarIsOpenSwitch" destination="fl8-ZU-9Cp" id="B0z-eA-yDa"/>
+            <outlet property="calendarManagerField" destination="bIB-vr-JmD" id="vj2-pN-AIk"/>
+            <outlet property="calendarNameField" destination="E1I-tu-3OF" id="43n-JC-CE2"/>
+            <outlet property="calendarNewScopeField" destination="HYK-cG-NOj" id="fM2-GR-Qdc"/>
+            <outlet property="calendarOrgField" destination="vpF-O7-lvf" id="ZMu-T3-6gU"/>
+            <outlet property="calendarRemarkField" destination="0zU-2p-l4e" id="ia9-f3-lRI"/>
+            <outlet property="calendarScopeField" destination="5RB-dp-23j" id="NOM-Ib-Knt"/>
+            <outlet property="calendarStatusSwitch" destination="GTC-NP-gGg" id="AON-0O-FAD"/>
+            <outlet property="calendarTypeField" destination="6Nq-Qx-KK4" id="ONT-gF-LlR"/>
+          </connections>
+        </tableViewController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="Kl7-oF-Qbs" userLabel="First Responder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="1648.8" y="97.601199400299862"/>
+    </scene>
+    <!--编辑内容-->
+    <scene sceneID="d6n-Ns-IYR">
+      <objects>
+        <viewController id="ADR-Nz-B0R" customClass="OOCalendarEditRemarkViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <view key="view" contentMode="scaleToFill" id="uZ4-K3-7u9">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+            <viewLayoutGuide key="safeArea" id="x7Q-Xj-laR"/>
+          </view>
+          <navigationItem key="navigationItem" title="编辑内容" id="8m9-cj-hJa">
+            <barButtonItem key="leftBarButtonItem" title="取消" landscapeImage="icon_off_grey" id="Nbx-21-hlf">
+              <connections>
+                <action selector="cancel:" destination="ADR-Nz-B0R" id="xBm-rt-txj"/>
+              </connections>
+            </barButtonItem>
+            <barButtonItem key="rightBarButtonItem" title="保存" id="LXv-Cs-Ybf">
+              <connections>
+                <action selector="save:" destination="ADR-Nz-B0R" id="Y1a-tK-EiQ"/>
+              </connections>
+            </barButtonItem>
+          </navigationItem>
+        </viewController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="KZu-Ft-RRO" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="3342" y="-716"/>
+    </scene>
+    <!--Navigation Controller-->
+    <scene sceneID="NvP-o5-zSv">
+      <objects>
+        <navigationController automaticallyAdjustsScrollViewInsets="NO" id="LoN-sU-f4i" customClass="ZLNavigationController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
+          <toolbarItems/>
+          <navigationItem key="navigationItem" id="57p-JL-s0t"/>
+          <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Pux-od-ZUE">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="56"/>
+            <autoresizingMask key="autoresizingMask"/>
+          </navigationBar>
+          <nil name="viewControllers"/>
+          <connections>
+            <segue destination="ADR-Nz-B0R" kind="relationship" relationship="rootViewController" id="c9K-2a-rzE"/>
+          </connections>
+        </navigationController>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="irf-LL-qwe" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+      </objects>
+      <point key="canvasLocation" x="2622" y="-703"/>
+    </scene>
+  </scenes>
+  <resources>
+    <image name="check" width="23" height="20"/>
+    <image name="icon_arrow" width="22" height="22"/>
+    <image name="icon_chongfu" width="22" height="22"/>
+    <image name="icon_hdjr" width="22" height="22"/>
+    <image name="icon_off_grey" width="22" height="22"/>
+    <image name="icon_shijian" width="22" height="22"/>
+    <image name="icon_tixing" width="22" height="22"/>
+    <image name="icon_zengjia" width="22" height="22"/>
+  </resources>
 </document>

+ 248 - 0
o2ios/O2Platform/App/IM-聊天/IMChatViewController.swift

@@ -0,0 +1,248 @@
+//
+//  IMChatViewController.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/8.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+import CocoaLumberjack
+import O2OA_Auth_SDK
+
+class IMChatViewController: UIViewController {
+
+    // MARK: - IBOutlet
+    //消息列表
+    @IBOutlet weak var tableView: UITableView!
+    //消息输入框
+    @IBOutlet weak var messageInputView: UITextField!
+    //底部工具栏的高度约束
+    @IBOutlet weak var bottomBarHeightConstraint: NSLayoutConstraint!
+    //底部工具栏
+    @IBOutlet weak var bottomBar: UIView!
+    
+    private let emojiBarHeight = 256
+    //表情窗口
+    private lazy var emojiBar: IMChatEmojiBarView = {
+       let view = Bundle.main.loadNibNamed("IMChatEmojiBarView", owner: self, options: nil)?.first as! IMChatEmojiBarView
+        view.frame = CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: emojiBarHeight.toCGFloat)
+       return view
+    }()
+
+    private lazy var viewModel: IMViewModel = {
+        return IMViewModel()
+    }()
+
+    // MARK: - properties
+    var conversation: IMConversationInfo? = nil
+    private var chatMessageList: [IMMessageInfo] = []
+    private var page = 1
+    private var isShowEmoji = false
+    private var bottomBarHeight = 64
+
+
+    // MARK: - functions
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        self.tableView.delegate = self
+        self.tableView.dataSource = self
+        self.tableView.register(UINib(nibName: "IMChatMessageViewCell", bundle: nil), forCellReuseIdentifier: "IMChatMessageViewCell")
+        self.tableView.register(UINib(nibName: "IMChatMessageSendViewCell", bundle: nil), forCellReuseIdentifier: "IMChatMessageSendViewCell")
+        self.tableView.separatorStyle = .none
+        self.tableView.rowHeight = UITableView.automaticDimension
+        self.tableView.estimatedRowHeight = 144
+        self.messageInputView.delegate = self
+
+        //底部安全距离 老机型没有
+        self.bottomBarHeight = Int(iPhoneX ? 64 + IPHONEX_BOTTOM_SAFE_HEIGHT: 64)
+        self.bottomBarHeightConstraint.constant = self.bottomBarHeight.toCGFloat
+        self.bottomBar.topBorder(width: 1, borderColor: base_gray_color.alpha(0.5))
+        self.messageInputView.backgroundColor = base_gray_color
+
+        //标题
+        if self.conversation?.type == o2_im_conversation_type_single {
+            if let c = self.conversation {
+                var person = ""
+                c.personList?.forEach({ (p) in
+                    if  p != O2AuthSDK.shared.myInfo()?.distinguishedName {
+                        person = p
+                    }
+                })
+                if !person.isEmpty {
+                    self.title = person.split("@").first ?? ""
+                }
+            }
+        }else {
+            self.title = self.conversation?.title
+        }
+        //获取聊天数据
+        self.loadMsgList(page: page)
+        //阅读
+        self.viewModel.readConversation(conversationId: self.conversation?.id)
+    }
+    
+    override func viewWillAppear(_ animated: Bool) {
+         NotificationCenter.default.addObserver(self, selector: #selector(receiveMessageFromWs(notice:)), name: OONotification.websocket.notificationName, object: nil)
+    }
+    override func viewWillDisappear(_ animated: Bool) {
+        NotificationCenter.default.removeObserver(self)
+    }
+    
+    
+    @objc private func receiveMessageFromWs(notice: Notification) {
+        DDLogDebug("接收到websocket im 消息")
+        if let message = notice.object as? IMMessageInfo {
+            if message.conversationId == self.conversation?.id {
+                self.chatMessageList.append(message)
+                self.scrollMessageToBottom()
+                self.viewModel.readConversation(conversationId: self.conversation?.id)
+            }
+        }
+    }
+
+    //获取消息
+    private func loadMsgList(page: Int) {
+        if let c = self.conversation, let id = c.id {
+            self.viewModel.myMsgPageList(page: page, conversationId: id).then { (list) in
+                self.chatMessageList = list
+                self.scrollMessageToBottom()
+            }
+        } else {
+            self.showError(title: "参数错误!!!")
+        }
+    }
+    //刷新tableview 滚动到底部
+    private func scrollMessageToBottom() {
+        DispatchQueue.main.async {
+            self.tableView.reloadData()
+            if self.chatMessageList.count > 0 {
+                self.tableView.scrollToRow(at: IndexPath(row: self.chatMessageList.count-1, section: 0), at: .bottom, animated: true)
+            }
+        }
+    }
+    
+    //发送文本消息
+    private func sendTextMessage() {
+        guard let msg = self.messageInputView.text else {
+            return
+        }
+        self.messageInputView.text = ""
+        let body = IMMessageBodyInfo()
+        body.type = o2_im_msg_type_text
+        body.body = msg
+        sendMessage(body: body)
+    }
+    //发送表情消息
+    private func sendEmojiMessage(emoji: String) {
+        let body = IMMessageBodyInfo()
+        body.type = o2_im_msg_type_emoji
+        body.body = emoji
+        sendMessage(body: body)
+    }
+    
+    //发送消息到服务器
+    private func sendMessage(body: IMMessageBodyInfo) {
+        let message = IMMessageInfo()
+        message.body = body.toJSONString()
+        message.id = UUID().uuidString
+        message.conversationId = self.conversation?.id
+        message.createPerson = O2AuthSDK.shared.myInfo()?.distinguishedName
+        message.createTime = Date().formatterDate(formatter: "yyyy-MM-dd HH:mm:ss")
+        //添加到界面
+        self.chatMessageList.append(message)
+        self.scrollMessageToBottom()
+        //发送消息到服务器
+        self.viewModel.sendMsg(msg: message)
+            .then { (result)  in
+                DDLogDebug("发送消息成功 \(result)")
+                self.viewModel.readConversation(conversationId: self.conversation?.id)
+        }.catch { (error) in
+            DDLogError(error.localizedDescription)
+            self.showError(title: "发送消息失败!")
+        }
+    }
+
+
+    // MARK: - IBAction
+    //点击表情按钮
+    @IBAction func clickEmojiBtn(_ sender: UIButton) {
+        self.isShowEmoji.toggle()
+        self.view.endEditing(true)
+        if self.isShowEmoji {
+            self.bottomBarHeightConstraint.constant = self.bottomBarHeight.toCGFloat + self.emojiBarHeight.toCGFloat
+            self.emojiBar.delegate = self
+            self.emojiBar.translatesAutoresizingMaskIntoConstraints = false
+            self.bottomBar.addSubview(self.emojiBar)
+            let top = NSLayoutConstraint(item: self.emojiBar, attribute: .top, relatedBy: .equal, toItem: self.emojiBar.superview!, attribute: .top, multiplier: 1, constant: CGFloat(self.bottomBarHeight))
+            let width = NSLayoutConstraint(item: self.emojiBar, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: SCREEN_WIDTH)
+            let height = NSLayoutConstraint(item: self.emojiBar, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: self.emojiBarHeight.toCGFloat)
+            NSLayoutConstraint.activate([top, width, height])
+        } else {
+            self.bottomBarHeightConstraint.constant = self.bottomBarHeight.toCGFloat
+            self.emojiBar.removeFromSuperview()
+        }
+        self.view.layoutIfNeeded()
+    }
+
+
+
+}
+
+// MARK: - 表情点击 delegate
+extension IMChatViewController: IMChatEmojiBarClickDelegate {
+    func clickEmoji(emoji: String) {
+        DDLogDebug("发送表情消息 \(emoji)")
+        self.sendEmojiMessage(emoji: emoji)
+    }
+}
+
+// MARK: - tableview delegate
+extension IMChatViewController: UITableViewDelegate, UITableViewDataSource {
+
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return self.chatMessageList.count
+    }
+
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let msg = self.chatMessageList[indexPath.row]
+        if msg.createPerson == O2AuthSDK.shared.myInfo()?.distinguishedName { //发送者
+            if let cell = tableView.dequeueReusableCell(withIdentifier: "IMChatMessageSendViewCell", for: indexPath) as? IMChatMessageSendViewCell {
+                cell.setContent(item: self.chatMessageList[indexPath.row])
+                return cell
+            }
+        }else {
+            if let cell = tableView.dequeueReusableCell(withIdentifier: "IMChatMessageViewCell", for: indexPath) as? IMChatMessageViewCell {
+                cell.setContent(item: self.chatMessageList[indexPath.row])
+                return cell
+            }
+        }
+        return UITableViewCell()
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        tableView.deselectRow(at: indexPath, animated: false)
+    }
+
+}
+
+// MARK: - textField delegate
+extension IMChatViewController: UITextFieldDelegate {
+    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
+        DDLogDebug("准备开始输入......")
+        closeEmoji()
+        return true
+    }
+
+    private func closeEmoji() {
+        self.isShowEmoji = false
+        self.bottomBarHeightConstraint.constant = self.bottomBarHeight.toCGFloat
+        self.view.layoutIfNeeded()
+    }
+
+    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
+        DDLogDebug("回车。。。。")
+        self.sendTextMessage()
+        return true
+    }
+}

+ 81 - 0
o2ios/O2Platform/App/IM-聊天/IMChatViewController.xib

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="IMChatViewController" customModule="O2Platform" customModuleProvider="target">
+            <connections>
+                <outlet property="bottomBar" destination="sDg-us-Ed9" id="J1d-XZ-5Rt"/>
+                <outlet property="bottomBarHeightConstraint" destination="qiu-7O-AwO" id="LWR-Ov-DMW"/>
+                <outlet property="messageInputView" destination="8BW-XG-rBx" id="A8J-9I-MjT"/>
+                <outlet property="tableView" destination="ZIb-3p-hnq" id="heR-v3-iUh"/>
+                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="ZIb-3p-hnq">
+                    <rect key="frame" x="0.0" y="44" width="414" height="754"/>
+                    <color key="backgroundColor" red="0.95294117649999999" green="0.95294117649999999" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
+                    <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </tableView>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sDg-us-Ed9">
+                    <rect key="frame" x="0.0" y="798" width="414" height="98"/>
+                    <subviews>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入消息..." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="8BW-XG-rBx">
+                            <rect key="frame" x="14" y="12" width="328" height="36"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="36" id="qe1-5v-UaD"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <textInputTraits key="textInputTraits" returnKeyType="send"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oTD-nU-xkE">
+                            <rect key="frame" x="366" y="12" width="36" height="36"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="36" id="AzT-Gm-fHl"/>
+                                <constraint firstAttribute="height" constant="36" id="PqN-1z-eCd"/>
+                            </constraints>
+                            <state key="normal" image="chat_emoji"/>
+                            <connections>
+                                <action selector="clickEmojiBtn:" destination="-1" eventType="touchUpInside" id="hZk-xk-g8t"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="trailing" secondItem="oTD-nU-xkE" secondAttribute="trailing" constant="12" id="BtK-YW-2fb"/>
+                        <constraint firstItem="oTD-nU-xkE" firstAttribute="top" secondItem="sDg-us-Ed9" secondAttribute="top" constant="12" id="JKE-h8-gll"/>
+                        <constraint firstItem="oTD-nU-xkE" firstAttribute="leading" secondItem="8BW-XG-rBx" secondAttribute="trailing" constant="24" id="Mzm-dM-gqy"/>
+                        <constraint firstItem="8BW-XG-rBx" firstAttribute="top" secondItem="sDg-us-Ed9" secondAttribute="top" constant="12" id="hnf-bY-DYH"/>
+                        <constraint firstItem="8BW-XG-rBx" firstAttribute="leading" secondItem="sDg-us-Ed9" secondAttribute="leading" constant="14" id="kAO-OU-1mN"/>
+                        <constraint firstAttribute="height" constant="98" id="qiu-7O-AwO"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" systemColor="systemGray6Color" red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="ZIb-3p-hnq" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="7kr-oh-NvU"/>
+                <constraint firstAttribute="trailing" secondItem="sDg-us-Ed9" secondAttribute="trailing" id="SXj-Vg-GIC"/>
+                <constraint firstAttribute="bottom" secondItem="sDg-us-Ed9" secondAttribute="bottom" id="ZjF-u3-yyV"/>
+                <constraint firstItem="ZIb-3p-hnq" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="d3C-Up-hv7"/>
+                <constraint firstItem="ZIb-3p-hnq" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="igh-CL-C1S"/>
+                <constraint firstItem="sDg-us-Ed9" firstAttribute="top" secondItem="ZIb-3p-hnq" secondAttribute="bottom" id="rTN-Zh-8i6"/>
+                <constraint firstItem="sDg-us-Ed9" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="rqK-P9-wyk"/>
+            </constraints>
+            <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
+            <point key="canvasLocation" x="131.8840579710145" y="138.61607142857142"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="chat_emoji" width="24" height="24"/>
+    </resources>
+</document>

+ 241 - 0
o2ios/O2Platform/App/IM-聊天/IMConversationListViewController.swift

@@ -0,0 +1,241 @@
+//
+//  IMConversationListViewController.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/4.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+import CocoaLumberjack
+
+class IMConversationListViewController: UIViewController {
+
+    fileprivate lazy var tableview: UITableView = {
+        var tableview = UITableView(frame: CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height - TAB_BAR_HEIGHT))
+        tableview.delegate = self
+        tableview.dataSource = self
+        tableview.backgroundColor = UIColor(netHex: 0xe8edf3)
+        tableview.register(UINib(nibName: "IMConversationItemCell", bundle: nil), forCellReuseIdentifier: "IMConversationItemCell")
+        tableview.separatorStyle = .none
+        return tableview
+    }()
+
+    fileprivate lazy var emptyView: UIView = {
+        let view = UIView(frame: CGRect(x: 0, y: 36, width: self.view.width, height: self.view.height - 36))
+        view.isHidden = true
+        view.backgroundColor = .white
+        let tips = UILabel()
+        tips.text = "暂无会话"
+        tips.textColor = UIColor(netHex: 0x666666)
+        tips.sizeToFit()
+        tips.center = CGPoint(x: view.centerX, y: view.height / 2 - 60)
+        view.addSubview(tips)
+        return view
+    }()
+
+    private lazy var viewModel: IMViewModel = {
+        return IMViewModel()
+    }()
+
+    private var conversationList: [IMConversationInfo] = []
+    private var instantMsgList: [InstantMessage] = []
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        
+        self.navigationItem.rightBarButtonItems = [UIBarButtonItem(image: UIImage(named: "add"), style: .plain, target: self, action: #selector(addConversation))]
+        
+        view.addSubview(tableview)
+        view.addSubview(emptyView)
+
+        NotificationCenter.default.addObserver(self, selector: #selector(receiveMessageFromWs(notice:)), name: OONotification.websocket.notificationName, object: nil)
+
+
+    }
+
+    override func viewWillAppear(_ animated: Bool) {
+        getInstantMsgList()
+    }
+    
+    func getInstantMsgList() {
+        viewModel.getInstantMsgList().then { (list) in
+            self.instantMsgList = list
+            self.getConversationList()
+        }
+    }
+
+    func getConversationList() {
+        viewModel.myConversationList().then { (list) in
+            self.conversationList = list
+            var n = 0
+            if !self.conversationList.isEmpty {
+                for item in self.conversationList {
+                    if let number = item.unreadNumber {
+                        n += number
+                    }
+                }
+            }
+            DispatchQueue.main.async {
+                if self.conversationList.count > 0 {
+                    self.emptyView.isHidden = true
+                } else {
+                    self.emptyView.isHidden = false
+                }
+                self.tableview.reloadData()
+                self.refreshRedPoint(number: n)
+            }
+
+        }.catch { (err) in
+            DispatchQueue.main.async { self.emptyView.isHidden = false }
+        }
+    }
+
+    //接收websocket消息
+    @objc private func receiveMessageFromWs(notice: Notification) {
+        DDLogDebug("接收到websocket im 消息")
+        if let message = notice.object as? IMMessageInfo {
+            if self.conversationList.contains(where: { (info) -> Bool in
+                return info.id == message.conversationId
+            }) {
+                DDLogDebug("有对应的会话 刷新列表")
+                var newList: [IMConversationInfo] = []
+                self.conversationList.forEach { (info) in
+                    if message.conversationId != nil && info.id == message.conversationId {
+                        info.lastMessage = message
+                        info.unreadNumber = (info.unreadNumber ?? 0) + 1
+                    }
+                    newList.append(info)
+                }
+                self.conversationList = newList
+                DispatchQueue.main.async {
+                    self.tableview.reloadData()
+                }
+            } else {
+                DDLogDebug("没有对应的会话 重新获取会话列表")
+                self.getInstantMsgList()
+            }
+        } else {
+            DDLogError("不正确的消息类型。。。")
+        }
+    }
+
+
+    private func refreshRedPoint(number: Int) {
+        if number > 0 && number < 100 {
+            self.navigationController?.tabBarItem.badgeValue = "\(number)"
+        } else if number >= 100 {
+            self.navigationController?.tabBarItem.badgeValue = "99.."
+        }else {
+            self.navigationController?.tabBarItem.badgeValue = nil
+        }
+    }
+    
+    
+    @objc private func addConversation() {
+        self.showSheetAction(title: nil, message: nil, actions: [
+            UIAlertAction(title: "创建单聊", style: .default, handler: { (action) in
+                self.createSingleConversation()
+            }),
+            UIAlertAction(title: "创建群聊", style: .default, handler: { (action) in
+                self.createGroupConversation()
+            })
+        ])
+    }
+
+    private func createSingleConversation() {
+        self.showContactPicker(modes: [.person], callback: { (result) in
+            if let users = result.users, users.count > 0 {
+                self.viewModel.createConversation(type: o2_im_conversation_type_single, users: [users[0].distinguishedName!]).then { (con) in
+                    self.createConversationSuccess(conv: con)
+                }.catch { (err) in
+                    self.showError(title: "创建单聊失败, \(err.localizedDescription)")
+                }
+                
+            }
+        }, multiple: false)
+    }
+    
+    private func createGroupConversation() {
+        self.showContactPicker(modes: [.person], callback: { (result) in
+            if let users = result.users, users.count > 0 {
+                let array = users.map { (item) -> String in
+                    item.distinguishedName!
+                }
+                self.viewModel.createConversation(type: o2_im_conversation_type_group, users: array).then { (conv) in
+                    self.createConversationSuccess(conv: conv)
+                }.catch { (err) in
+                    self.showError(title: "创建群聊失败, \(err.localizedDescription)")
+                }
+            }
+        })
+    }
+    
+    //创建会话成功 打开聊天界面
+    private func createConversationSuccess(conv: IMConversationInfo) {
+        if !self.conversationList.contains(where: { (info) -> Bool in
+            return info.id == conv.id
+        }) {
+            self.conversationList.append(conv)
+            DispatchQueue.main.async {
+                self.tableview.reloadData()
+            }
+        }
+        let chatView = IMChatViewController()
+        chatView.conversation = conv
+        self.navigationController?.pushViewController(chatView, animated: true)
+    }
+
+}
+
+// MARK: - tableview delegate
+extension IMConversationListViewController: UITableViewDelegate, UITableViewDataSource {
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        if self.instantMsgList.count > 0 {
+            return self.conversationList.count + 1
+        }
+        return self.conversationList.count
+    }
+
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        return tableView.dequeueReusableCell(withIdentifier: "IMConversationItemCell", for: indexPath)
+    }
+    func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
+        guard let c = cell as? IMConversationItemCell else {
+            return
+        }
+        if self.instantMsgList.count > 0 {
+            if indexPath.row == 0 {
+                c.setInstantContent(item: self.instantMsgList.last!)
+            }else {
+                c.bindConversation(conversation: self.conversationList[indexPath.row - 1])
+            }
+        }else {
+            c.bindConversation(conversation: self.conversationList[indexPath.row])
+        }
+    }
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return 64
+    }
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        DDLogDebug("点击了 row \(indexPath.row)")
+        if self.instantMsgList.count > 0 {
+            if indexPath.row == 0 {
+                let instantView = IMInstantMessageViewController()
+                instantView.instantMsgList = self.instantMsgList
+                self.navigationController?.pushViewController(instantView, animated: true)
+            }else {
+                gotoChatView(row: indexPath.row-1)
+            }
+        }else {
+            gotoChatView(row: indexPath.row)
+        }
+    }
+    
+    private func gotoChatView(row: Int) {
+        let chatView = IMChatViewController()
+        chatView.conversation = self.conversationList[row]
+        self.navigationController?.pushViewController(chatView, animated: true)
+    }
+
+}

+ 64 - 0
o2ios/O2Platform/App/IM-聊天/IMInstantMessageViewController.swift

@@ -0,0 +1,64 @@
+//
+//  IMInstantMessageViewController.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/12.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+
+class IMInstantMessageViewController: UITableViewController {
+        
+    private lazy var viewModel: IMViewModel = {
+           return IMViewModel()
+       }()
+    
+    var instantMsgList: [InstantMessage] = []
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        self.title = "通知消息"
+        self.tableView.register(UINib(nibName: "IMChatMessageViewCell", bundle: nil), forCellReuseIdentifier: "IMChatMessageViewCell")
+        self.tableView.separatorStyle = .none
+        self.tableView.rowHeight = UITableView.automaticDimension
+        self.tableView.estimatedRowHeight = 144
+        self.tableView.backgroundColor = UIColor(hex: "#f3f3f3")
+       
+    }
+    
+    override func viewDidAppear(_ animated: Bool) {
+        self.scrollMessageToBottom()
+    }
+    
+    //刷新tableview 滚动到底部
+    private func scrollMessageToBottom() {
+        DispatchQueue.main.async {
+            if self.instantMsgList.count > 0 {
+                self.tableView.scrollToRow(at: IndexPath(row: self.instantMsgList.count-1, section: 0), at: .bottom, animated: true)
+            }
+        }
+    }
+
+    // MARK: - Table view data source
+
+    override func numberOfSections(in tableView: UITableView) -> Int {
+        return 1
+    }
+
+    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return self.instantMsgList.count
+    }
+
+    
+    
+    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        if let cell = tableView.dequeueReusableCell(withIdentifier: "IMChatMessageViewCell", for: indexPath) as? IMChatMessageViewCell {
+            cell.setInstantContent(item: self.instantMsgList[indexPath.row])
+            return cell
+        }
+
+        return UITableViewCell()
+    }
+    
+}

+ 30 - 0
o2ios/O2Platform/App/IM-聊天/IMInstantMessageViewController.xib

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="IMInstantMessageViewController" customModule="O2Platform" customModuleProvider="target">
+            <connections>
+                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableView opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" bouncesZoom="NO" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="i5M-Pr-FkT">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+            <viewLayoutGuide key="safeArea" id="vLr-E1-eTs"/>
+            <color key="sectionIndexBackgroundColor" red="0.95294117649999999" green="0.95294117649999999" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
+            <connections>
+                <outlet property="dataSource" destination="-1" id="Tng-2m-Rnh"/>
+                <outlet property="delegate" destination="-1" id="9aC-8N-iBw"/>
+            </connections>
+            <point key="canvasLocation" x="132" y="123"/>
+        </tableView>
+    </objects>
+</document>

+ 144 - 0
o2ios/O2Platform/App/IM-聊天/IMViewModel.swift

@@ -0,0 +1,144 @@
+//
+//  IMViewModel.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/4.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import Promises
+import CocoaLumberjack
+
+class IMViewModel: NSObject {
+    override init() {
+        super.init()
+    }
+
+
+    let communicateAPI = OOMoyaProvider<CommunicateAPI>()
+}
+
+extension IMViewModel {
+    
+    //创建会话 @param type: single group
+    func createConversation(type: String, users: [String]) -> Promise<IMConversationInfo> {
+        let conversation = IMConversationInfo()
+        conversation.type = type
+        conversation.personList = users
+        return Promise  { fulfill, reject in
+            self.communicateAPI.request(.createConversation(conversation), completion: { result in
+                let response = OOResult<BaseModelClass<IMConversationInfo>>(result)
+                if response.isResultSuccess() {
+                    if let info = response.model?.data {
+                        fulfill(info)
+                    } else {
+                        reject(OOAppError.apiEmptyResultError)
+                    }
+                } else {
+                    reject(response.error!)
+                }
+            })
+        }
+        
+    }
+    
+    //阅读会话
+    func readConversation(conversationId: String?) {
+        guard let id = conversationId else {
+            DDLogError("阅读会话失败, 传入id为空")
+            return
+        }
+        self.communicateAPI.request(.readConversation(id), completion: {result in
+            let response = OOResult<BaseModelClass<OOCommonIdModel>>(result)
+            if response.isResultSuccess() {
+                DDLogDebug("阅读当前会话成功!")
+            }else {
+                DDLogError("阅读会话失败!")
+            }
+        })
+    }
+
+    //发送消息
+    func sendMsg(msg: IMMessageInfo) -> Promise<Bool> {
+        return Promise { fulfill, reject in
+            self.communicateAPI.request(.sendMsg(msg), completion: { result in
+                    let response = OOResult<BaseModelClass<OOCommonIdModel>>(result)
+                    if response.isResultSuccess() {
+                        if let _ = response.model?.data {
+                            fulfill(true)
+                        } else {
+                            reject(OOAppError.apiEmptyResultError)
+                        }
+                    } else {
+                        reject(response.error!)
+                    }
+                })
+        }
+    }
+
+    //查询会话列表
+    func myConversationList() -> Promise<[IMConversationInfo]> {
+        return Promise { fulfill, reject in
+            self.communicateAPI.request(.myConversationList, completion: { result in
+                let response = OOResult<BaseModelClass<[IMConversationInfo]>>(result)
+                if response.isResultSuccess() {
+                    if let list = response.model?.data {
+                        fulfill(list)
+                    } else {
+                        reject(OOAppError.apiEmptyResultError)
+                    }
+                } else {
+                    reject(response.error!)
+                }
+            })
+        }
+    }
+    //查询消息列表
+    func myMsgPageList(page: Int, conversationId: String) -> Promise<[IMMessageInfo]> {
+        return Promise { fulfill, reject in
+            self.communicateAPI.request(.msgListByPaging(page, 40, conversationId), completion: { result in
+                    let response = OOResult<BaseModelClass<[IMMessageInfo]>>(result)
+                    if response.isResultSuccess() {
+                        if let list = response.model?.data {
+                            //列表翻转
+                            let rList = list.sorted { (f, s) -> Bool in
+                                if let ft = f.createTime, let st = s.createTime {
+                                    return ft.toDate(formatter: "yyyy-MM-dd HH:mm:ss") < st.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+                                }
+                                return true
+                            }
+                            fulfill(rList)
+                        } else {
+                            reject(OOAppError.apiEmptyResultError)
+                        }
+                    } else {
+                        reject(response.error!)
+                    }
+                })
+        }
+    }
+    
+    func getInstantMsgList() -> Promise<[InstantMessage]> {
+        return Promise { fulfill, reject in
+            self.communicateAPI.request(.instantMessageList(100), completion: { result in
+                    let response = OOResult<BaseModelClass<[InstantMessage]>>(result)
+                    if response.isResultSuccess() {
+                        if let list = response.model?.data {
+                            //列表翻转
+                            let rList = list.sorted { (f, s) -> Bool in
+                                if let ft = f.createTime, let st = s.createTime {
+                                    return ft.toDate(formatter: "yyyy-MM-dd HH:mm:ss") < st.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+                                }
+                                return true
+                            }
+                            fulfill(rList)
+                        } else {
+                            reject(OOAppError.apiEmptyResultError)
+                        }
+                    } else {
+                        reject(response.error!)
+                    }
+                })
+        }
+    }
+}

+ 103 - 0
o2ios/O2Platform/App/IM-聊天/Model/IMConversationInfo.swift

@@ -0,0 +1,103 @@
+//
+//  IMConversation.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/4.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+import HandyJSON
+
+
+class IMConversationInfo: NSObject, DataModel {
+    @objc var id: String?
+    @objc var title: String?
+    @objc var type: String? //会话类型 单人 、 群.
+    @objc var personList: [String]?
+    @objc var adminPerson: String?
+    @objc var note: String?
+
+    @objc var lastMessageTime: String?
+    @objc var createTime: String?
+    @objc var updateTime: String?
+    var unreadNumber: Int?
+    var isTop: Bool?
+
+    @objc var lastMessage: IMMessageInfo?
+
+    required override init() { }
+
+    func mapping(mapper: HelpingMapper) {
+
+    }
+}
+
+
+class IMMessageRequestForm: NSObject, DataModel {
+
+    @objc var conversationId: String?
+
+    required override init() { }
+
+    func mapping(mapper: HelpingMapper) {
+
+    }
+}
+
+class IMMessageInfo: NSObject, DataModel {
+    @objc var id: String?
+    @objc var conversationId: String?
+    @objc var body: String?
+    @objc var createPerson: String?
+    @objc var createTime: String?
+    @objc var updateTime: String?
+
+    required override init() { }
+
+    func mapping(mapper: HelpingMapper) {
+
+    }
+}
+
+class IMMessageBodyInfo: NSObject, DataModel {
+    @objc var id: String?
+    @objc var type: String?
+    @objc var body: String?
+
+
+    required override init() { }
+
+    func mapping(mapper: HelpingMapper) {
+
+    }
+}
+
+//websocket 消息对象
+class WsMessage: NSObject, DataModel {
+    @objc var type: String? //im_create
+    @objc var body: IMMessageInfo? //这个对象只有 type=im_create的时候才是这个对象
+    required override init() { }
+
+    func mapping(mapper: HelpingMapper) {
+
+    }
+}
+
+//其他消息
+class InstantMessage: NSObject, DataModel {
+    @objc var id: String?
+    @objc var title: String?
+    @objc var type: String?
+    @objc var body: String?
+    @objc var consumerList: [String]?
+    @objc var person: String?
+    var consumed: Bool?
+    @objc var createTime: String?
+    @objc var updateTime: String?
+    
+    required override init() { }
+
+    func mapping(mapper: HelpingMapper) {
+
+    }
+
+}

+ 29 - 0
o2ios/O2Platform/App/IM-聊天/O2IM.swift

@@ -0,0 +1,29 @@
+//
+//  O2IM.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/4.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import Foundation
+
+//心跳消息
+let o2_im_ws_heartbeat = "heartbeat"
+
+
+let o2_im_conversation_type_single = "single"
+let o2_im_conversation_type_group = "group"
+
+let o2_im_msg_type_text = "text"
+let o2_im_msg_type_emoji = "emoji"
+
+
+//表情的字符串转化为O2Emoji.bundle里面的图片路径 [01] -> im_emotion_01
+func o2ImEmojiPath(emojiBody: String) -> String {
+    if emojiBody.length == 4 {
+        let s = emojiBody.subString(from: 1, to: 3)
+        return "im_emotion_\(s)"
+    }
+    return ""
+}

+ 68 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiBarView.swift

@@ -0,0 +1,68 @@
+//
+//  IMChatEmojiBarView.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/11.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+import CocoaLumberjack
+
+protocol IMChatEmojiBarClickDelegate {
+    func clickEmoji(emoji: String)
+}
+
+class IMChatEmojiBarView: UIView {
+    
+    @IBOutlet weak var collectionView: UICollectionView!
+    
+    private let emojiList: [String] = {
+        var list: [String] = []
+        for i in 1...87 {
+            if i < 10 {
+                list.append("[0\(i)]")
+            }else {
+                list.append("[\(i)]")
+            }
+        }
+        return list
+    }()
+    
+    var delegate: IMChatEmojiBarClickDelegate? = nil
+    
+    override func awakeFromNib() {
+        collectionView.register(UINib(nibName: "IMChatEmojiItemCell", bundle: nil), forCellWithReuseIdentifier: "IMChatEmojiItemCell")
+        collectionView.delegate = self
+        collectionView.dataSource = self
+        DDLogDebug("list size \(emojiList.count)")
+        
+    }
+}
+
+extension IMChatEmojiBarView: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return emojiList.count
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:SCREEN_WIDTH / 10, height: 42)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        if let cell =  collectionView.dequeueReusableCell(withReuseIdentifier: "IMChatEmojiItemCell", for: indexPath) as? IMChatEmojiItemCell {
+            cell.setEmoji(emoji: self.emojiList[indexPath.row])
+            return cell
+        }
+        return UICollectionViewCell()
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        if delegate != nil {
+            delegate?.clickEmoji(emoji: self.emojiList[indexPath.row])
+        }
+        collectionView.deselectItem(at: indexPath, animated: false)
+    }
+    
+}

+ 43 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiBarView.xib

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="IMChatEmojiBarView" customModule="O2Platform" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="256"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Ard-Nz-Tlw">
+                    <rect key="frame" x="0.0" y="0.0" width="414" height="256"/>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                    <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="9JR-h1-hg9">
+                        <size key="itemSize" width="128" height="128"/>
+                        <size key="headerReferenceSize" width="0.0" height="0.0"/>
+                        <size key="footerReferenceSize" width="0.0" height="0.0"/>
+                        <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                    </collectionViewFlowLayout>
+                </collectionView>
+            </subviews>
+            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+            <constraints>
+                <constraint firstItem="Ard-Nz-Tlw" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="CAd-rq-tVD"/>
+                <constraint firstItem="Ard-Nz-Tlw" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="CaO-m5-kmB"/>
+                <constraint firstItem="Ard-Nz-Tlw" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="sfG-sX-ZzB"/>
+                <constraint firstItem="Ard-Nz-Tlw" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="wmb-YF-ekq"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <connections>
+                <outlet property="collectionView" destination="Ard-Nz-Tlw" id="8ST-jl-atl"/>
+            </connections>
+            <point key="canvasLocation" x="100.00000000000001" y="-9.375"/>
+        </view>
+    </objects>
+</document>

+ 25 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiItemCell.swift

@@ -0,0 +1,25 @@
+//
+//  IMChatEmojiItemCell.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/11.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+
+class IMChatEmojiItemCell: UICollectionViewCell {
+    @IBOutlet weak var emojiImage: UIImageView!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        // Initialization code
+    }
+    
+    func setEmoji(emoji: String) {
+        let bundle = Bundle().o2EmojiBundle(anyClass: IMChatEmojiItemCell.self)
+        let path = o2ImEmojiPath(emojiBody: emoji)
+        self.emojiImage.image = UIImage(named: path, in: bundle, compatibleWith: nil)
+    }
+
+}

+ 41 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatEmojiItemCell.xib

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="IMChatEmojiItemCell" customModule="O2Platform" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="52" height="52"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+                <rect key="frame" x="0.0" y="0.0" width="52" height="52"/>
+                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                <subviews>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="JXV-Hl-6Xb">
+                        <rect key="frame" x="10" y="10" width="32" height="32"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="32" id="i41-s0-3eR"/>
+                            <constraint firstAttribute="width" constant="32" id="x6M-1W-tyM"/>
+                        </constraints>
+                    </imageView>
+                </subviews>
+            </view>
+            <constraints>
+                <constraint firstItem="JXV-Hl-6Xb" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="i60-Uy-DQL"/>
+                <constraint firstItem="JXV-Hl-6Xb" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="ssV-XP-TUi"/>
+            </constraints>
+            <viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
+            <size key="customSize" width="52" height="62"/>
+            <connections>
+                <outlet property="emojiImage" destination="JXV-Hl-6Xb" id="b2g-I1-yjf"/>
+            </connections>
+            <point key="canvasLocation" x="146.37681159420291" y="156.02678571428569"/>
+        </collectionViewCell>
+    </objects>
+</document>

+ 129 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatMessageSendViewCell.swift

@@ -0,0 +1,129 @@
+//
+//  IMChatMessageSendViewCell.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/10.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+
+class IMChatMessageSendViewCell: UITableViewCell {
+    @IBOutlet weak var timeLabel: UILabel!
+    @IBOutlet weak var avatarImageView: UIImageView!
+    @IBOutlet weak var nameLabel: UILabel!
+    @IBOutlet weak var messageBackgroundView: UIView!
+    @IBOutlet weak var messageBgWidth: NSLayoutConstraint!
+    @IBOutlet weak var messageBgHeight: NSLayoutConstraint!
+    
+    
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+    }
+    
+    func setContent(item: IMMessageInfo) {
+        //time
+        if let time = item.createTime {
+            let date = time.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+            self.timeLabel.text = date.friendlyTime()
+        }
+        //name avatart
+        if let person = item.createPerson {
+            let urlstr = AppDelegate.o2Collect.generateURLWithAppContextKey(ContactContext.contactsContextKeyV2, query: ContactContext.personIconByNameQueryV2, parameter: ["##name##":person as AnyObject], generateTime: false)
+            if let u = URL(string: urlstr!) {
+                self.avatarImageView.hnk_setImageFromURL(u)
+            }else {
+                self.avatarImageView.image = UIImage(named: "icon_men")
+            }
+            //姓名
+            self.nameLabel.text = person.split("@").first ?? ""
+        }else {
+            self.avatarImageView.image = UIImage(named: "icon_men")
+            self.nameLabel.text = ""
+        }
+        self.messageBackgroundView.removeSubviews()
+        if let jsonBody = item.body, let body = parseJson(msg: jsonBody) {
+            if body.type == o2_im_msg_type_emoji {
+                emojiMsgRender(emoji: body.body!)
+            }else {
+                textMsgRender(msg: body.body!)
+            }
+        }
+    }
+    
+    
+    private func emojiMsgRender(emoji: String) {
+        let emojiSize = 36
+        let width = CGFloat(emojiSize + 20)
+        let height = CGFloat(emojiSize + 20)
+        self.messageBgWidth.constant = width
+        self.messageBgHeight.constant = height
+        //背景图片
+        let bgImg = UIImageView(frame: CGRect(x: 0, y: 0, width: width, height: height))
+        let insets = UIEdgeInsets(top: 28, left: 5, bottom: 5, right: 10); // 上、左、下、右
+        var bubble = UIImage(named: "chat_bubble_outgoing")
+        bubble = bubble?.resizableImage(withCapInsets: insets, resizingMode: .stretch)
+        bgImg.image = bubble
+        self.messageBackgroundView.addSubview(bgImg)
+        //表情图
+        let emojiImage = UIImageView(frame: CGRect(x: 0, y: 0, width: emojiSize, height: emojiSize))
+        let bundle = Bundle().o2EmojiBundle(anyClass: IMChatMessageSendViewCell.self)
+        let path = o2ImEmojiPath(emojiBody: emoji)
+        emojiImage.image = UIImage(named: path, in: bundle, compatibleWith: nil)
+        emojiImage.translatesAutoresizingMaskIntoConstraints = false
+        self.messageBackgroundView.addSubview(emojiImage)
+        let top = NSLayoutConstraint(item: emojiImage, attribute: .top, relatedBy: .equal, toItem: emojiImage.superview!, attribute: .top, multiplier: 1, constant: 10)
+        let bottom = NSLayoutConstraint(item: emojiImage.superview! , attribute: .bottom, relatedBy: .equal, toItem: emojiImage, attribute: .bottom, multiplier: 1, constant: 10)
+        let left = NSLayoutConstraint(item: emojiImage, attribute: .leading, relatedBy: .equal, toItem: emojiImage.superview!, attribute: .leading, multiplier: 1, constant: 10)
+        let right = NSLayoutConstraint(item: emojiImage.superview!, attribute: .trailing, relatedBy: .equal, toItem: emojiImage, attribute: .trailing, multiplier: 1, constant: 10)
+        NSLayoutConstraint.activate([top, bottom, left, right])
+    }
+    
+    private func textMsgRender(msg: String) {
+        let size = calTextSize(str: msg)
+        self.messageBgWidth.constant = size.width + 20
+        self.messageBgHeight.constant = size.height + 20
+        //背景图片
+        let bgImg = UIImageView(frame: CGRect(x: 0, y: 0, width: size.width + 20, height: size.height + 20))
+        let insets = UIEdgeInsets(top: 28, left: 5, bottom: 5, right: 10); // 上、左、下、右
+        var bubble = UIImage(named: "chat_bubble_outgoing")
+        bubble = bubble?.resizableImage(withCapInsets: insets, resizingMode: .stretch)
+        bgImg.image = bubble
+        self.messageBackgroundView.addSubview(bgImg)
+        //文字
+        let label = generateMessagelabel(str: msg, size: size)
+        label.translatesAutoresizingMaskIntoConstraints = false
+        self.messageBackgroundView.addSubview(label)
+        let top = NSLayoutConstraint(item: label, attribute: .top, relatedBy: .equal, toItem: label.superview!, attribute: .top, multiplier: 1, constant: 10)
+        let left = NSLayoutConstraint(item: label, attribute: .leading, relatedBy: .equal, toItem: label.superview!, attribute: .leading, multiplier: 1, constant: 10)
+        let right = NSLayoutConstraint(item: label.superview!, attribute: .trailing, relatedBy: .equal, toItem: label, attribute: .trailing, multiplier: 1, constant: 10)
+        NSLayoutConstraint.activate([top, left, right])
+    }
+    
+    private func generateMessagelabel(str: String, size: CGSize) -> UILabel {
+        let label = UILabel(frame: CGRect(x: 0, y: 0, width: size.width, height: size.height))
+        label.text = str
+        label.font = UIFont.systemFont(ofSize: 16)
+        label.numberOfLines = 0
+        label.lineBreakMode = .byCharWrapping
+        label.preferredMaxLayoutWidth = size.width
+        return label
+    }
+    
+    
+    private func calTextSize(str: String) -> CGSize {
+        let size = CGSize(width: 176, height: CGFloat(MAXFLOAT))
+        return str.boundingRect(with: size, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], context: nil).size
+    }
+    
+    //解析json为消息对象
+    private func parseJson(msg: String) -> IMMessageBodyInfo? {
+        return IMMessageBodyInfo.deserialize(from: msg)
+    }
+    
+}

+ 84 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatMessageSendViewCell.xib

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="129" id="KGk-i7-Jjw" customClass="IMChatMessageSendViewCell" customModule="O2Platform" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="129"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="129"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="06-09 13:02" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k0L-ig-bhB">
+                        <rect key="frame" x="14" y="5" width="292" height="18"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="18" id="MJ9-1n-RP4"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dRS-Ex-V2s">
+                        <rect key="frame" x="258" y="31" width="48" height="48"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="48" id="ALp-AJ-k89"/>
+                            <constraint firstAttribute="height" constant="48" id="U0b-CA-lXO"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="24"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="姓名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O0d-aO-DEf">
+                        <rect key="frame" x="219" y="31" width="29" height="24"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="24" id="hV4-hf-Q8a"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="73U-Yu-hhb">
+                        <rect key="frame" x="72" y="63" width="176" height="42"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="42" id="9m9-a5-elu"/>
+                            <constraint firstAttribute="width" constant="176" id="B2b-ep-gRb"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <color key="backgroundColor" red="0.95294117649999999" green="0.95294117649999999" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
+                <constraints>
+                    <constraint firstItem="k0L-ig-bhB" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="59J-ml-PYh"/>
+                    <constraint firstItem="73U-Yu-hhb" firstAttribute="top" secondItem="O0d-aO-DEf" secondAttribute="bottom" constant="8" id="6MU-oN-E2m"/>
+                    <constraint firstItem="k0L-ig-bhB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="6QF-aq-QM6"/>
+                    <constraint firstItem="dRS-Ex-V2s" firstAttribute="top" secondItem="k0L-ig-bhB" secondAttribute="bottom" constant="8" id="JfT-ce-huE"/>
+                    <constraint firstItem="dRS-Ex-V2s" firstAttribute="leading" secondItem="73U-Yu-hhb" secondAttribute="trailing" constant="10" id="Njy-Bc-KtC"/>
+                    <constraint firstItem="O0d-aO-DEf" firstAttribute="top" secondItem="k0L-ig-bhB" secondAttribute="bottom" constant="8" id="VFs-xs-kta"/>
+                    <constraint firstAttribute="trailing" secondItem="dRS-Ex-V2s" secondAttribute="trailing" constant="14" id="gmx-Y3-81p"/>
+                    <constraint firstAttribute="bottomMargin" secondItem="73U-Yu-hhb" secondAttribute="bottom" constant="10" id="j9W-5A-2om"/>
+                    <constraint firstItem="dRS-Ex-V2s" firstAttribute="leading" secondItem="O0d-aO-DEf" secondAttribute="trailing" constant="10" id="ngR-6P-5QW"/>
+                    <constraint firstAttribute="trailing" secondItem="k0L-ig-bhB" secondAttribute="trailing" constant="14" id="y21-uR-MhX"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="avatarImageView" destination="dRS-Ex-V2s" id="Els-ei-27g"/>
+                <outlet property="messageBackgroundView" destination="73U-Yu-hhb" id="JOP-eY-itl"/>
+                <outlet property="messageBgHeight" destination="9m9-a5-elu" id="8Ly-ju-XTf"/>
+                <outlet property="messageBgWidth" destination="B2b-ep-gRb" id="FSo-Zq-jds"/>
+                <outlet property="nameLabel" destination="O0d-aO-DEf" id="Mqt-5X-zmf"/>
+                <outlet property="timeLabel" destination="k0L-ig-bhB" id="ZJg-EA-Jw1"/>
+            </connections>
+            <point key="canvasLocation" x="57.971014492753625" y="111.49553571428571"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 180 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatMessageViewCell.swift

@@ -0,0 +1,180 @@
+//
+//  IMChatMessageViewCell.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/8.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+import CocoaLumberjack
+
+class IMChatMessageViewCell: UITableViewCell {
+
+    @IBOutlet weak var avatarImage: UIImageView!
+    @IBOutlet weak var titleLabel: UILabel!
+    @IBOutlet weak var timeLabel: UILabel!
+    @IBOutlet weak var messageBackgroundView: UIView!
+    @IBOutlet weak var messageBackgroundWidth: NSLayoutConstraint!
+    @IBOutlet weak var messageBackgroundHeight: NSLayoutConstraint!
+    private let messageWidth = 176
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+    }
+   
+    //普通通知消息
+    func setInstantContent(item: InstantMessage) {
+        if let time = item.createTime {
+            let date = time.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+            self.timeLabel.text = date.friendlyTime()
+        }
+        if let msg = item.title {
+            textMsgRender(msg: msg)
+        }
+        if let type = item.type {
+            if type.starts(with: "task_") {
+                self.avatarImage.image = UIImage(named: "icon_daiban")
+                self.titleLabel.text = "待办消息"
+            }else if type.starts(with: "taskCompleted_") {
+                self.avatarImage.image = UIImage(named: "icon_taskcompleted")
+                self.titleLabel.text = "已办消息"
+            }else if type.starts(with: "read_") {
+                self.avatarImage.image = UIImage(named: "icon_read")
+                self.titleLabel.text = "待阅消息"
+            }else if type.starts(with: "readCompleted_") {
+                self.avatarImage.image = UIImage(named: "icon_readcompleted")
+                self.titleLabel.text = "已阅消息"
+            }else if type.starts(with: "review_") || type.starts(with: "work_") || type.starts(with: "process_") {
+                self.avatarImage.image = UIImage(named: "icon_daiban")
+                self.titleLabel.text = "工作消息"
+            }else if type.starts(with: "meeting_") {
+                self.avatarImage.image = UIImage(named: "icon_meeting")
+                self.titleLabel.text = "会议消息"
+            }else if type.starts(with: "attachment_") {
+                self.avatarImage.image = UIImage(named: "icon_yunpan")
+                self.titleLabel.text = "云盘消息"
+            }else if type.starts(with: "calendar_") {
+                self.avatarImage.image = UIImage(named: "icon_calendar")
+                self.titleLabel.text = "日历消息"
+            }else if type.starts(with: "cms_") {
+                self.avatarImage.image = UIImage(named: "icon_cms")
+                self.titleLabel.text = "信息中心消息"
+            }else if type.starts(with: "bbs_") {
+                self.avatarImage.image = UIImage(named: "icon_bbs")
+                self.titleLabel.text = "论坛消息"
+            }else if type.starts(with: "mind_") {
+                self.avatarImage.image = UIImage(named: "icon_mindMap")
+                self.titleLabel.text = "脑图消息"
+            }else {
+                self.avatarImage.image = UIImage(named: "icon_email")
+                self.titleLabel.text = "其他消息"
+            }
+        }
+    }
+    
+    //聊天消息
+    func setContent(item: IMMessageInfo) {
+        //time
+        if let time = item.createTime {
+            let date = time.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+            self.timeLabel.text = date.friendlyTime()
+        }
+        //name avatart
+        if let person = item.createPerson {
+            let urlstr = AppDelegate.o2Collect.generateURLWithAppContextKey(ContactContext.contactsContextKeyV2, query: ContactContext.personIconByNameQueryV2, parameter: ["##name##":person as AnyObject], generateTime: false)
+            if let u = URL(string: urlstr!) {
+                self.avatarImage.hnk_setImageFromURL(u)
+            }else {
+                self.avatarImage.image = UIImage(named: "icon_men")
+            }
+            //姓名
+            self.titleLabel.text = person.split("@").first ?? ""
+        }else {
+            self.avatarImage.image = UIImage(named: "icon_men")
+            self.titleLabel.text = ""
+        }
+        self.messageBackgroundView.removeSubviews()
+        if let jsonBody = item.body, let body = parseJson(msg: jsonBody) {
+            if body.type == o2_im_msg_type_emoji {
+                emojiMsgRender(emoji: body.body!)
+            }else {
+                textMsgRender(msg: body.body!)
+            }
+        }
+    }
+    
+    private func emojiMsgRender(emoji: String) {
+        let emojiSize = 36
+        let width = CGFloat(emojiSize + 20)
+        let height = CGFloat(emojiSize + 20)
+        self.messageBackgroundWidth.constant = width
+        self.messageBackgroundHeight.constant = height
+        //背景图片
+        let bgImg = UIImageView(frame: CGRect(x: 0, y: 0, width: width, height: height))
+        let insets = UIEdgeInsets(top: 28, left: 10, bottom: 5, right: 5); // 上、左、下、右
+        var bubble = UIImage(named: "chat_bubble_incomming")
+        bubble = bubble?.resizableImage(withCapInsets: insets, resizingMode: .stretch)
+        bgImg.image = bubble
+        self.messageBackgroundView.addSubview(bgImg)
+        //表情图
+        let emojiImage = UIImageView(frame: CGRect(x: 0, y: 0, width: emojiSize, height: emojiSize))
+        let bundle = Bundle().o2EmojiBundle(anyClass: IMChatMessageViewCell.self)
+        let path = o2ImEmojiPath(emojiBody: emoji)
+        emojiImage.image = UIImage(named: path, in: bundle, compatibleWith: nil)
+        emojiImage.translatesAutoresizingMaskIntoConstraints = false
+        self.messageBackgroundView.addSubview(emojiImage)
+        let top = NSLayoutConstraint(item: emojiImage, attribute: .top, relatedBy: .equal, toItem: emojiImage.superview!, attribute: .top, multiplier: 1, constant: 10)
+        let bottom = NSLayoutConstraint(item: emojiImage.superview! , attribute: .bottom, relatedBy: .equal, toItem: emojiImage, attribute: .bottom, multiplier: 1, constant: 10)
+        let left = NSLayoutConstraint(item: emojiImage, attribute: .leading, relatedBy: .equal, toItem: emojiImage.superview!, attribute: .leading, multiplier: 1, constant: 10)
+        let right = NSLayoutConstraint(item: emojiImage.superview!, attribute: .trailing, relatedBy: .equal, toItem: emojiImage, attribute: .trailing, multiplier: 1, constant: 10)
+        NSLayoutConstraint.activate([top, bottom, left, right])
+    }
+    
+    private func textMsgRender(msg: String) {
+        let size = calTextSize(str: msg)
+        self.messageBackgroundWidth.constant = size.width + 20
+        self.messageBackgroundHeight.constant = size.height + 20
+        //背景图片
+        let bgImg = UIImageView(frame: CGRect(x: 0, y: 0, width: size.width + 20, height: size.height + 20))
+        let insets = UIEdgeInsets(top: 28, left: 10, bottom: 5, right: 5); // 上、左、下、右
+        var bubble = UIImage(named: "chat_bubble_incomming")
+        bubble = bubble?.resizableImage(withCapInsets: insets, resizingMode: .stretch)
+        bgImg.image = bubble
+        self.messageBackgroundView.addSubview(bgImg)
+        //文字
+        let label = generateMessagelabel(str: msg, size: size)
+        label.translatesAutoresizingMaskIntoConstraints = false
+        self.messageBackgroundView.addSubview(label)
+        let top = NSLayoutConstraint(item: label, attribute: .top, relatedBy: .equal, toItem: label.superview!, attribute: .top, multiplier: 1, constant: 10)
+        let left = NSLayoutConstraint(item: label, attribute: .leading, relatedBy: .equal, toItem: label.superview!, attribute: .leading, multiplier: 1, constant: 10)
+        let right = NSLayoutConstraint(item: label.superview!, attribute: .trailing, relatedBy: .equal, toItem: label, attribute: .trailing, multiplier: 1, constant: 10)
+        NSLayoutConstraint.activate([top, left, right])
+    }
+    
+    private func generateMessagelabel(str: String, size: CGSize) -> UILabel {
+        let label = UILabel(frame: CGRect(x: 0, y: 0, width: size.width, height: size.height))
+        label.text = str
+        label.font = UIFont.systemFont(ofSize: 16)
+        label.numberOfLines = 0
+        label.lineBreakMode = .byCharWrapping
+        label.preferredMaxLayoutWidth = size.width
+        return label
+    }
+    
+    
+    private func calTextSize(str: String) -> CGSize {
+        let size = CGSize(width: messageWidth.toCGFloat, height: CGFloat(MAXFLOAT))
+        return str.boundingRect(with: size, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], context: nil).size
+    }
+    
+    //解析json为消息对象
+    private func parseJson(msg: String) -> IMMessageBodyInfo? {
+        return IMMessageBodyInfo.deserialize(from: msg)
+    }
+}

+ 84 - 0
o2ios/O2Platform/App/IM-聊天/View/IMChatMessageViewCell.xib

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="132" id="KGk-i7-Jjw" customClass="IMChatMessageViewCell" customModule="O2Platform" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="132"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="132"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Mov-YP-dlA">
+                        <rect key="frame" x="14" y="31" width="48" height="48"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="48" id="gOa-23-wjh"/>
+                            <constraint firstAttribute="width" constant="48" id="hMb-yE-x70"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="24"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="06-09 13:02" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fy3-Pu-FHB">
+                        <rect key="frame" x="14" y="5" width="292" height="18"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="18" id="c57-b5-RQY"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="姓名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2r2-Sl-HFm">
+                        <rect key="frame" x="72" y="31" width="29" height="24"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="24" id="4T7-qw-JEB"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jxc-0S-MrS">
+                        <rect key="frame" x="72" y="63" width="176" height="42"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="176" id="0aZ-iT-9wn"/>
+                            <constraint firstAttribute="height" constant="42" id="ah6-qa-1tp"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <color key="backgroundColor" red="0.95294117649999999" green="0.95294117649999999" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
+                <constraints>
+                    <constraint firstItem="Mov-YP-dlA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="0dz-GG-NKV"/>
+                    <constraint firstItem="fy3-Pu-FHB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="33C-sl-5B1"/>
+                    <constraint firstItem="jxc-0S-MrS" firstAttribute="leading" secondItem="Mov-YP-dlA" secondAttribute="trailing" constant="10" id="3AB-04-3Ot"/>
+                    <constraint firstAttribute="trailing" secondItem="fy3-Pu-FHB" secondAttribute="trailing" constant="14" id="AQO-Yx-K4D"/>
+                    <constraint firstItem="Mov-YP-dlA" firstAttribute="top" secondItem="fy3-Pu-FHB" secondAttribute="bottom" constant="8" id="Faw-qG-7Fy"/>
+                    <constraint firstItem="2r2-Sl-HFm" firstAttribute="top" secondItem="fy3-Pu-FHB" secondAttribute="bottom" constant="8" id="GtC-yx-sjT"/>
+                    <constraint firstItem="2r2-Sl-HFm" firstAttribute="leading" secondItem="Mov-YP-dlA" secondAttribute="trailing" constant="10" id="JYE-0i-s5S"/>
+                    <constraint firstAttribute="bottomMargin" secondItem="jxc-0S-MrS" secondAttribute="bottom" constant="10" id="Tpo-I1-lKY"/>
+                    <constraint firstItem="fy3-Pu-FHB" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="VVF-dB-vnY"/>
+                    <constraint firstItem="jxc-0S-MrS" firstAttribute="top" secondItem="2r2-Sl-HFm" secondAttribute="bottom" constant="8" id="gYS-LW-7T4"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="avatarImage" destination="Mov-YP-dlA" id="6a1-n4-fXG"/>
+                <outlet property="messageBackgroundHeight" destination="ah6-qa-1tp" id="hJ4-Xt-3Op"/>
+                <outlet property="messageBackgroundView" destination="jxc-0S-MrS" id="qTW-TG-fpN"/>
+                <outlet property="messageBackgroundWidth" destination="0aZ-iT-9wn" id="5UI-71-ADV"/>
+                <outlet property="timeLabel" destination="fy3-Pu-FHB" id="gvR-ts-fTh"/>
+                <outlet property="titleLabel" destination="2r2-Sl-HFm" id="kIP-0d-kYX"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="94.419642857142847"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 119 - 0
o2ios/O2Platform/App/IM-聊天/View/IMConversationItemCell.swift

@@ -0,0 +1,119 @@
+//
+//  IMConversationItemCell.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/4.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import UIKit
+import O2OA_Auth_SDK
+import CocoaLumberjack
+
+class IMConversationItemCell: UITableViewCell {
+
+    @IBOutlet weak var avatarImg: UIImageView!
+    @IBOutlet weak var nameLabel: UILabel!
+    @IBOutlet weak var timeLabel: UILabel!
+    @IBOutlet weak var messageLabel: UILabel!
+    @IBOutlet weak var unreadNumberLabel: UILabel!
+    @IBOutlet weak var emojiImg: UIImageView!
+    
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+    }
+    
+    
+    func setInstantContent(item: InstantMessage) {
+        self.avatarImg.image = UIImage(named: "icon_email")
+        self.nameLabel.text = "通知消息"
+        self.messageLabel.isHidden = false
+        self.messageLabel.text = item.title
+        if let time = item.createTime {
+            let date = time.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+            self.timeLabel.text = date.friendlyTime()
+        }
+        self.emojiImg.isHidden = true
+        self.unreadNumberLabel.isHidden = true
+    }
+
+    
+    func bindConversation(conversation: IMConversationInfo) {
+        //avatar name
+        if conversation.type == o2_im_conversation_type_single {
+            var person = ""
+            conversation.personList?.forEach({ (p) in
+                if  p != O2AuthSDK.shared.myInfo()?.distinguishedName {
+                    person = p
+                }
+            })
+            if person != "" {
+                //头像
+                let urlstr = AppDelegate.o2Collect.generateURLWithAppContextKey(ContactContext.contactsContextKeyV2, query: ContactContext.personIconByNameQueryV2, parameter: ["##name##":person as AnyObject], generateTime: false)
+                DDLogDebug("头像url \(String(describing: urlstr))")
+                if let u = URL(string: urlstr!) {
+                    self.avatarImg.hnk_setImageFromURL(u)
+                }else {
+                    DDLogError("错误, 没有生成头像url")
+                    self.avatarImg.image = UIImage(named: "icon_men")
+                }
+                //姓名
+                self.nameLabel.text = person.split("@").first ?? ""
+            }else {
+                self.avatarImg.image = UIImage(named: "icon_men")
+                self.nameLabel.text = ""
+            }
+        }else {//todo 群组头像 ?
+            self.nameLabel.text = conversation.title
+            self.avatarImg.image = UIImage(named: "group_default")
+        }
+        //time
+        if let time = conversation.lastMessage?.createTime {
+            DDLogDebug("time: \(time)")
+            let date = time.toDate(formatter: "yyyy-MM-dd HH:mm:ss")
+            DDLogDebug("date \(date.description)")
+            self.timeLabel.text = date.friendlyTime()
+        }
+        // message
+        if let msgBody = conversation.lastMessage?.body, let body = parseJson(msg: msgBody) {
+            if body.type == o2_im_msg_type_text {
+                self.messageLabel.text = body.body
+                self.messageLabel.isHidden = false
+                self.emojiImg.isHidden = true
+            }else if body.type == o2_im_msg_type_emoji {
+                self.messageLabel.isHidden = true
+                self.emojiImg.isHidden = false
+                let bundle = Bundle().o2EmojiBundle(anyClass: IMConversationItemCell.self)
+                let path = o2ImEmojiPath(emojiBody: body.body!)
+                self.emojiImg.image = UIImage(named: path, in: bundle, compatibleWith: nil)
+            }else {
+                self.messageLabel.isHidden = true
+                self.emojiImg.isHidden = true
+            }
+        }
+        //unread number
+        let number = conversation.unreadNumber ?? 0
+        if number > 0 && number < 100 {
+            self.unreadNumberLabel.text = "\(number)"
+            self.unreadNumberLabel.isHidden = false
+        }else if number >= 100 {
+            self.unreadNumberLabel.text = "99.."
+            self.unreadNumberLabel.isHidden = false
+        }else {
+            self.unreadNumberLabel.isHidden = true
+        }
+        
+    }
+    
+    private func parseJson(msg: String) -> IMMessageBodyInfo? {
+        return IMMessageBodyInfo.deserialize(from: msg)
+    }
+    
+    
+    
+}

+ 117 - 0
o2ios/O2Platform/App/IM-聊天/View/IMConversationItemCell.xib

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="64" id="KGk-i7-Jjw" customClass="IMConversationItemCell" customModule="O2Platform" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="i51-Sc-dds">
+                        <rect key="frame" x="10" y="10" width="44" height="44"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="44" id="0Cn-m9-oMp"/>
+                            <constraint firstAttribute="height" constant="44" id="Eds-PW-EC8"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="22"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="姓名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bOp-mm-qCN">
+                        <rect key="frame" x="66" y="10" width="153" height="21"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2020-10-23" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="URQ-HD-MDc">
+                        <rect key="frame" x="231" y="10" width="84" height="17"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="84" id="jM2-ye-nzP"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="这里是消息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I3j-lM-VtV" customClass="IMCon">
+                        <rect key="frame" x="70" y="37" width="245" height="17"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <color key="textColor" systemColor="systemGrayColor" red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="pgV-nP-wwV">
+                        <rect key="frame" x="70" y="34" width="22" height="22"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="22" id="GMk-WU-WAB"/>
+                            <constraint firstAttribute="height" constant="22" id="wqz-nd-Maf"/>
+                        </constraints>
+                    </imageView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ckc-YE-j5q">
+                        <rect key="frame" x="66" y="63" width="254" height="1"/>
+                        <color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="1" id="szG-5G-RRm"/>
+                        </constraints>
+                    </view>
+                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99.." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Ff-Wo-dWM">
+                        <rect key="frame" x="34" y="10" width="20" height="20"/>
+                        <color key="backgroundColor" systemColor="systemRedColor" red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="20" id="XU3-CN-tXR"/>
+                            <constraint firstAttribute="height" constant="20" id="Yfh-b5-N7U"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" weight="thin" pointSize="11"/>
+                        <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <nil key="highlightedColor"/>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="10"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </label>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="I3j-lM-VtV" secondAttribute="bottom" constant="10" id="0mD-L5-TRo"/>
+                    <constraint firstAttribute="trailing" secondItem="ckc-YE-j5q" secondAttribute="trailing" id="2LG-5s-Yui"/>
+                    <constraint firstItem="pgV-nP-wwV" firstAttribute="leading" secondItem="i51-Sc-dds" secondAttribute="trailing" constant="16" id="4Ao-s1-kAM"/>
+                    <constraint firstItem="I3j-lM-VtV" firstAttribute="leading" secondItem="i51-Sc-dds" secondAttribute="trailing" constant="16" id="BFD-a2-hUs"/>
+                    <constraint firstItem="9Ff-Wo-dWM" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="Frj-Mc-oGy"/>
+                    <constraint firstItem="URQ-HD-MDc" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="IES-nF-jpE"/>
+                    <constraint firstAttribute="trailing" secondItem="URQ-HD-MDc" secondAttribute="trailing" constant="5" id="Jeh-u4-Tnd"/>
+                    <constraint firstAttribute="trailing" secondItem="I3j-lM-VtV" secondAttribute="trailing" constant="5" id="PJD-Jd-y3N"/>
+                    <constraint firstItem="bOp-mm-qCN" firstAttribute="leading" secondItem="i51-Sc-dds" secondAttribute="trailing" constant="12" id="RCn-dh-ggD"/>
+                    <constraint firstItem="i51-Sc-dds" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="Z9Q-tH-mWi"/>
+                    <constraint firstAttribute="bottom" secondItem="i51-Sc-dds" secondAttribute="bottom" constant="10" id="Zew-6c-hWd"/>
+                    <constraint firstItem="9Ff-Wo-dWM" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="34" id="cM0-LZ-1iA"/>
+                    <constraint firstItem="bOp-mm-qCN" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="iUq-ik-5sX"/>
+                    <constraint firstAttribute="bottom" secondItem="ckc-YE-j5q" secondAttribute="bottom" id="nX2-Nw-uiy"/>
+                    <constraint firstItem="URQ-HD-MDc" firstAttribute="leading" secondItem="bOp-mm-qCN" secondAttribute="trailing" constant="12" id="obm-on-urU"/>
+                    <constraint firstItem="ckc-YE-j5q" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="66" id="t0M-PG-f03"/>
+                    <constraint firstAttribute="bottom" secondItem="pgV-nP-wwV" secondAttribute="bottom" constant="8" id="tXP-Lu-4aH"/>
+                    <constraint firstItem="i51-Sc-dds" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="xep-37-rIl"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="avatarImg" destination="i51-Sc-dds" id="k5V-7P-msX"/>
+                <outlet property="emojiImg" destination="pgV-nP-wwV" id="RRM-lj-KXN"/>
+                <outlet property="messageLabel" destination="I3j-lM-VtV" id="6z4-xX-xTv"/>
+                <outlet property="nameLabel" destination="bOp-mm-qCN" id="iqM-q2-qcC"/>
+                <outlet property="timeLabel" destination="URQ-HD-MDc" id="NbV-D2-ATA"/>
+                <outlet property="unreadNumberLabel" destination="9Ff-Wo-dWM" id="z3x-wN-Bfv"/>
+            </connections>
+            <point key="canvasLocation" x="-65.217391304347828" y="-31.473214285714285"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 65 - 37
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceCheckInController.swift

@@ -19,7 +19,8 @@ class OOAttanceCheckInController: UITableViewController {
     
     var checkinForm:OOAttandanceMobileCheckinForm = OOAttandanceMobileCheckinForm()
     
-    var myButton:UIButton!
+    var myButton:UIButton?
+    var feature : OOAttandanceFeature?
     
     private lazy var headerView:OOAttanceHeaderView = {
        let view = Bundle.main.loadNibNamed("OOAttanceHeaderView", owner: self, options: nil)?.first as! OOAttanceHeaderView
@@ -38,7 +39,7 @@ class OOAttanceCheckInController: UITableViewController {
         headerView.startBMKMapViewService()
         NotificationCenter.default.addObserver(self, selector: #selector(locationReceive(_:)), name: OONotification.location.notificationName, object: nil)
         if myButton != nil {
-            myButton.isHidden = false
+            myButton?.isHidden = false
         }
     }
     
@@ -47,7 +48,7 @@ class OOAttanceCheckInController: UITableViewController {
         headerView.stopBMKMapViewService()
         NotificationCenter.default.removeObserver(self)
         if myButton != nil {
-            myButton.isHidden = true
+            myButton?.isHidden = true
         }
     }
     
@@ -70,30 +71,37 @@ class OOAttanceCheckInController: UITableViewController {
         tableView.register(UINib.init(nibName: "OOAttanceItemCell", bundle: nil), forCellReuseIdentifier: "OOAttanceItemCell")
         
         getCurrentCheckinList()
-        self.perform(#selector(createButton), with: nil, afterDelay: 0)
+        getMyRecords()
+//        self.perform(#selector(createButton), with: nil, afterDelay: 0)
     }
     
     
-    @objc func closeWindow() {
-        self.tabBarController?.navigationController?.dismiss(animated: true, completion: nil)
-    }
+//    @objc func closeWindow() {
+//        self.tabBarController?.navigationController?.dismiss(animated: true, completion: nil)
+//    }
     
-    @objc private func createButton() {
+    //创建打卡按钮
+    @objc private func createButton(feature: OOAttandanceFeature) {
         let window = UIApplication.shared.windows[0]
         myButton = UIButton(type: .custom)
-        myButton.frame = CGRect(x: kScreenW - 90, y: kScreenH - 150, width: 70, height: 70)
-        myButton.setTitle("打卡", for: .normal)
-        myButton.setTitle("打卡", for: .disabled)
-        myButton.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 18.0)!
-        myButton.theme_backgroundColor = ThemeColorPicker(keyPath: "Base.base_color")
-        myButton.setBackgroundColor(UIColor.gray, forState: .disabled)
-        myButton.isEnabled = false
-        myButton.layer.cornerRadius = 35
-        myButton.layer.masksToBounds = true
-        myButton.addTarget(self, action: #selector(postCheckinButton(_:)), for: .touchUpInside)
-        window.addSubview(myButton)
-        let pan = UIPanGestureRecognizer(target: self, action: #selector(changePostion(_:)))
-        myButton.addGestureRecognizer(pan)
+        myButton?.frame = CGRect(x: kScreenW - 90, y: kScreenH - 150, width: 70, height: 70)
+        myButton?.setTitle("打卡", for: .normal)
+        myButton?.setTitle("打卡", for: .disabled)
+        myButton?.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 14.0)!
+        myButton?.theme_backgroundColor = ThemeColorPicker(keyPath: "Base.base_color")
+        myButton?.setBackgroundColor(UIColor.gray, forState: .disabled)
+        myButton?.isEnabled = false
+        myButton?.layer.cornerRadius = 35
+        myButton?.layer.masksToBounds = true
+        myButton?.addTarget(self, action: #selector(postCheckinButton(_:)), for: .touchUpInside)
+        window.addSubview(myButton!)
+    }
+    //删除打卡按钮
+    private func removeButton() {
+        if myButton != nil {
+            myButton?.removeFromSuperview()
+            myButton = nil
+        }
     }
     
     @objc private func locationReceive(_ notification:Notification){
@@ -102,27 +110,27 @@ class OOAttanceCheckInController: UITableViewController {
             checkinForm.desc = result.sematicDescription
             checkinForm.longitude = String(result.location.longitude)
             checkinForm.latitude = String(result.location.latitude)
-            
             checkinForm.empNo = O2AuthSDK.shared.myInfo()?.employee
             checkinForm.empName = O2AuthSDK.shared.myInfo()?.name
             let currenDate = Date()
             checkinForm.recordDateString = currenDate.toString("yyyy-MM-dd")
             checkinForm.signTime = currenDate.toString("HH:mm:ss")
-            
-            checkinForm.optMachineType = UIDevice.deviceModel()
+            checkinForm.optMachineType = UIDevice.deviceModelReadable()
             checkinForm.optSystemName = "\(UIDevice.systemName()) \(UIDevice.systemVersion())"
-            // button enable
-            myButton.isEnabled = true
+            // 打卡按钮启用
+            myButton?.isEnabled = true
             headerView.addSubview(promptView)
             DDLogDebug("checkForm set completed")
         }else{
-            myButton.isEnabled = false
-            promptView.removeSubviews()
+            //打卡按钮禁用
+            myButton?.isEnabled = false
+            promptView.removeFromSuperview()
         }
     }
     
     @objc private func postCheckinButton(_ sender:UIButton){
         MBProgressHUD_JChat.showMessage(message: "打卡中...", toView: self.view)
+        checkinForm.checkin_type = self.feature?.checkinType ?? ""
         viewModel.postMyCheckin(checkinForm) { (result) in
             MBProgressHUD_JChat.hide(forView: self.view, animated: true)
             switch result {
@@ -130,6 +138,7 @@ class OOAttanceCheckInController: UITableViewController {
                 DispatchQueue.main.async {
                     MBProgressHUD_JChat.show(text:"打卡成功", view: self.view)
                     self.getCurrentCheckinList()
+                    self.getMyRecords()
                 }
                 break
             case .fail(let errorMessage):
@@ -143,9 +152,9 @@ class OOAttanceCheckInController: UITableViewController {
         }
     }
     
-    @objc private func changePostion(_ pan:UIPanGestureRecognizer){
-        
-    }
+//    @objc private func changePostion(_ pan:UIPanGestureRecognizer){
+//
+//    }
     
     func getWorkPlace() {
         viewModel.getLocationWorkPlace { (myResult) in
@@ -165,6 +174,27 @@ class OOAttanceCheckInController: UITableViewController {
         }
     }
     
+    func getMyRecords() {
+        viewModel.listMyRecords { (result) in
+            switch result {
+            case .ok(let record):
+                let model = record as? OOMyAttandanceRecords
+                if let feature = model?.feature, feature.signSeq ?? -1 > 0 {
+                    self.feature = feature
+                    self.createButton(feature: feature)
+                }else {
+                    self.removeButton()
+                }
+                break
+            case .fail(let err):
+                DDLogError(err)
+                break
+            default:
+                break
+            }
+        }
+    }
+    
     func getCurrentCheckinList() {
         var model = CommonPageModel()
         model.pageSize = 200
@@ -194,9 +224,7 @@ class OOAttanceCheckInController: UITableViewController {
         }
     }
     
-    func postCheckIn() {
-        
-    }
+     
 
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
@@ -252,7 +280,7 @@ class OOAttanceCheckInController: UITableViewController {
     }
     
     
-//    deinit {
-//         headerView.stopBMKMapViewService()
-//    }
+    deinit {
+         DDLogDebug("deinit 这里是checkin controller 。。。。。。。。。")
+    }
 }

+ 70 - 0
o2ios/O2Platform/App/NewAttance-考勤打卡/m/OOAttandanceModels.swift

@@ -46,6 +46,7 @@ class OOAttandanceMobileDetail:NSObject,DataModel {
     @objc var optMachineType:String? // 操作设备类别:手机品牌|PAD|PC|其他
     @objc var optSystemName:String?  // 操作设备类别:Mac|Windows|IOS|Android|其他
     var recordStatus:Int?  //记录状态:0-未分析 1-已分析
+    @objc var checkin_type: String? // 打卡类型 上午上班打卡 下午下班打卡
     
     required override init() {
         
@@ -57,6 +58,73 @@ class OOAttandanceMobileDetail:NSObject,DataModel {
 
 }
 
+// MARK: - 打卡班次对象
+class OOAttandanceScheduleSetting: NSObject, DataModel {
+    /**
+     "id": "7c89ddfe-7e69-40ce-9908-d699081aa660",
+                "topUnitName": "浙江兰德纵横网络技术股份有限公司@1@U",
+                "unitName": "移动开发组@320494093@U",
+                "unitOu": "移动开发组@320494093@U",
+                "onDutyTime": "09:00",
+                "offDutyTime": "17:00",
+                "signProxy": 0,
+                "lateStartTime": "9:05",
+                "createTime": "2020-05-27 09:19:16",
+                "updateTime": "2020-05-27 09:19:16"
+     */
+    @objc var id: String?
+    @objc var topUnitName: String?
+    @objc var unitName: String?
+    @objc var unitOu: String?
+    @objc var onDutyTime: String?
+    @objc var offDutyTime: String?
+    var signProxy: Int?
+    @objc var lateStartTime: String?
+    @objc var createTime: String?
+    @objc var updateTime: String?
+    
+    required override init() {
+        
+    }
+    
+}
+
+// MARK: - 当前用户当天打卡功能
+class OOAttandanceFeature: NSObject, DataModel {
+    /**
+     "signSeq": 1,
+     "signDate": "2020-06-02",
+     "signTime": "09:00",
+     "checkinType": "上午上班打卡"
+     */
+    @objc var signDate: String?
+    @objc var signTime: String?
+    @objc var checkinType: String?
+    var signSeq: Int? //第几次打卡 -1就不能打卡了
+    
+    required override init() {
+        
+    }
+    
+}
+
+// MARK: - istMyRecords 登录者当天的所有移动打卡信息记录 排版情况等
+class OOMyAttandanceRecords: NSObject, DataModel {
+    /**
+     {
+         "records": [],
+         "scheduleSetting": {},
+         "feature": {}
+     },
+     */
+    @objc var records:[OOAttandanceMobileDetail]?
+    @objc var scheduleSetting:OOAttandanceScheduleSetting?
+    @objc var feature: OOAttandanceFeature?
+    
+    required override init() {
+        
+    }
+}
 
 // MARK:- 提交打卡数据FormBean
 class OOAttandanceMobileCheckinForm:NSObject,DataModel {
@@ -83,6 +151,8 @@ class OOAttandanceMobileCheckinForm:NSObject,DataModel {
     
     @objc var optSystemName:String? //操作设备类别:Mac|Windows|IOS|Android|其他, 可以为空
     
+    @objc var checkin_type: String? //上午上班打卡 下午下班打卡 。。。。 对应OOAttandanceFeature里面的checkinType
+    
     required override init() {
         
     }

+ 13 - 1
o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceItemCell.swift

@@ -35,7 +35,19 @@ class OOAttanceItemCell: UITableViewCell,Configurable {
         guard let model = item as? OOAttandanceMobileDetail else {
             return
         }
-        checkTimeLabel.text = "打卡时间:\(model.recordDateString ?? "") \(model.signTime ?? "")"
+        var showTime = ""
+        if let time = model.signTime {
+            if time.length > 5 {
+                showTime = time.subString(from: 0, to: 5)
+            }else {
+                showTime = time
+            }
+        }
+        if let type = model.checkin_type {
+            checkTimeLabel.text = "\(type): \(showTime)"
+        }else {
+            checkTimeLabel.text = "打开时间: \(showTime)"
+        }
         checkLocationLabel.text = "\(model.recordAddress ?? "")"
     }
     

+ 6 - 9
o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceItemCell.xib

@@ -1,12 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
-    <device id="retina4_7" orientation="portrait">
-        <adaptation id="fullscreen"/>
-    </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
-        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -17,7 +14,7 @@
             <rect key="frame" x="0.0" y="0.0" width="320" height="68"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="67.5"/>
+                <rect key="frame" x="0.0" y="0.0" width="320" height="68"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="打卡时间:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RNb-B2-SgD">
@@ -58,7 +55,7 @@
                         </constraints>
                     </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="地点" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5EJ-nc-2M4">
-                        <rect key="frame" x="57" y="32" width="247" height="21"/>
+                        <rect key="frame" x="57" y="32" width="248" height="21"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="21" id="CV2-av-WsC"/>
                         </constraints>
@@ -66,7 +63,7 @@
                         <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pic_normal" translatesAutoresizingMaskIntoConstraints="NO" id="ZwF-rR-gyd">
+                    <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pic_normal" translatesAutoresizingMaskIntoConstraints="NO" id="ZwF-rR-gyd">
                         <rect key="frame" x="254" y="10" width="50" height="18"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="18" id="1J7-7C-1jg"/>

+ 15 - 0
o2ios/O2Platform/App/NewAttance-考勤打卡/vm/OOAttandanceViewModel.swift

@@ -39,6 +39,21 @@ final class OOAttandanceViewModel: NSObject {
 }
 
 extension OOAttandanceViewModel{
+    
+    // MARK: -
+    func listMyRecords(_ completedBlock:@escaping CallbackBlockDefine) {
+        ooAttanceAPI.request(.listMyRecord) { response in
+            let myResult = OOResult<BaseModelClass<OOMyAttandanceRecords>>(response)
+            if myResult.isResultSuccess() {
+                let records = myResult.model?.data
+                completedBlock(.ok(records))
+            }else {
+                let errorMessage = myResult.error?.errorDescription ?? ""
+                completedBlock(.fail(errorMessage))
+            }
+        }
+    }
+    
     // MARK:- 读取配置的打卡位置
     func getLocationWorkPlace(_ completedBlock:@escaping CallbackBlockDefine) {
         ooAttanceAPI.request(.myWorkplace) { (responseResult) in

+ 221 - 63
o2ios/O2Platform/App/O2MainController.swift

@@ -9,11 +9,12 @@
 import UIKit
 import CocoaLumberjack
 import O2OA_Auth_SDK
+import Starscream
 
 class O2MainController: UITabBarController, UITabBarControllerDelegate {
-    
-    static var tabBarVC:O2MainController!
-    
+
+    static var tabBarVC: O2MainController!
+
     static func genernateVC() -> O2MainController {
 //        guard let vc = tabBarVC else {
 //            tabBarVC = O2MainController()
@@ -22,36 +23,49 @@ class O2MainController: UITabBarController, UITabBarControllerDelegate {
 //        return vc
         return O2MainController()
     }
-    
-    private var currentIndex:Int = 0
+
+    private var currentIndex: Int = 0
     // demo服务器弹出公告
     private var demoAlertView = O2DemoAlertView()
-    private let viewModel:OOLoginViewModel = {
+    private let viewModel: OOLoginViewModel = {
         return OOLoginViewModel()
     }()
-    
-    
+    //获取消息数量
+    private lazy var imViewModel: IMViewModel = {
+        return IMViewModel()
+    }()
+
+
     override func viewDidLoad() {
         super.viewDidLoad()
         if UIDevice.deviceModelReadable() != "Simulator" {
             self.checkAppVersion()
         }
-        
+
         self.delegate = self
         _initControllers()
         selectedIndex = 2
         currentIndex = 2
-        _loginIM()
+//        _loginIM()
         if O2IsConnect2Collect == false {
             //处理内部直连的时候推送的设备绑定
             O2JPushManager.shared.o2JPushBind()
         }
+        //连接websocket
+        self._startWebsocket()
+        //读取消息
+        self.getConversationList()
     }
-    
+
+    deinit {
+        //关闭websocket
+        self._stopWebsocket()
+    }
+
     override func viewDidAppear(_ animated: Bool) {
         // 判断是否 第一次安装 是否是连接的demo服务器
         if let unit = O2AuthSDK.shared.bindUnit() {
-            if "demo.o2oa.net" == unit.centerHost || "demo.o2oa.io" == unit.centerHost || "demo.o2server.io" == unit.centerHost {
+            if "demo.o2oa.net" == unit.centerHost || "demo.o2oa.io" == unit.centerHost || "demo.o2server.io" == unit.centerHost || "sample.o2oa.net" == unit.centerHost {
                 let tag = AppConfigSettings.shared.demoAlertTag
                 if !tag {
                     demoAlertView.showFallDown()
@@ -60,38 +74,25 @@ class O2MainController: UITabBarController, UITabBarControllerDelegate {
             }
         }
     }
-    
+
     //MARK: -- delegate
     func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
-//        if currentIndex == 2 && tabBarController.selectedIndex == 2 {
-//            if tabBarController.selectedViewController is ZLNavigationController {
-//                (tabBarController.selectedViewController as! ZLNavigationController).viewControllers.forEach { (vc) in
-//                    if vc is MailViewController {
-//                        DDLogDebug("点击了首页 portal")
-//                        (vc as! MailViewController).loadDetailSubject()
-//                    }
-//                    if vc is MainTaskSecondViewController {
-//                        DDLogDebug("点击了首页index")
-//                    }
-//                }
-//            }
-//        }
         self.currentIndex = tabBarController.selectedIndex
     }
-    
+
     private func _initControllers() {
         //消息
-        let conversationVC = JCConversationListViewController()
-        conversationVC.title  = "消息"
+//        let conversationVC = JCConversationListViewController()
+        let conversationVC = IMConversationListViewController()
+        conversationVC.title = "消息"
         let messages = ZLNavigationController(rootViewController: conversationVC)
-        
-        messages.tabBarItem = UITabBarItem(title: "消息", image:UIImage(named: "icon_news_nor"), selectedImage: O2ThemeManager.image(for: "Icon.icon_news_pre"))
-        
+        messages.tabBarItem = UITabBarItem(title: "消息", image: UIImage(named: "icon_news_nor"), selectedImage: O2ThemeManager.image(for: "Icon.icon_news_pre"))
+
         //通讯录
         let addressVC = OOTabBarHelper.getVC(storyboardName: "contacts", vcName: nil)
         let address = ZLNavigationController(rootViewController: addressVC)
-        address.tabBarItem = UITabBarItem(title: "通讯录", image:UIImage(named: "icon_address_g"), selectedImage: O2ThemeManager.image(for: "Icon.icon_address_list_pro"))
-        
+        address.tabBarItem = UITabBarItem(title: "通讯录", image: UIImage(named: "icon_address_g"), selectedImage: O2ThemeManager.image(for: "Icon.icon_address_list_pro"))
+
         // main
         let mainVC = mainController()
         mainVC.tabBarItem = UITabBarItem(title: nil, image: UIImage(named: "icon_zhuye_nor"), selectedImage: O2ThemeManager.image(for: "Icon.icon_zhuye_pre"))
@@ -106,17 +107,17 @@ class O2MainController: UITabBarController, UITabBarControllerDelegate {
         //应用
         let appsVC = OOTabBarHelper.getVC(storyboardName: "apps", vcName: nil)
         let apps = ZLNavigationController(rootViewController: appsVC)
-        apps.tabBarItem = UITabBarItem(title: "应用", image:UIImage(named: "icon_yingyong"), selectedImage: O2ThemeManager.image(for: "Icon.icon_yingyong_pro"))
-        
+        apps.tabBarItem = UITabBarItem(title: "应用", image: UIImage(named: "icon_yingyong"), selectedImage: O2ThemeManager.image(for: "Icon.icon_yingyong_pro"))
+
         //设置
         let settingsVC = OOTabBarHelper.getVC(storyboardName: "setting", vcName: nil)
-        let settings =   ZLNavigationController(rootViewController: settingsVC)
-        settings.tabBarItem = UITabBarItem(title: "设置", image:UIImage(named: "setting_normal"), selectedImage: O2ThemeManager.image(for: "Icon.setting_selected"))
-        
+        let settings = ZLNavigationController(rootViewController: settingsVC)
+        settings.tabBarItem = UITabBarItem(title: "设置", image: UIImage(named: "setting_normal"), selectedImage: O2ThemeManager.image(for: "Icon.setting_selected"))
+
         self.viewControllers = [messages, address, mainVC, apps, settings]
-        
+
     }
-    
+
     private func mainController() -> UIViewController {
         let appid = O2AuthSDK.shared.customStyle()?.indexPortal
         let indexType = O2AuthSDK.shared.customStyle()?.indexType ?? "default"
@@ -128,39 +129,93 @@ class O2MainController: UITabBarController, UITabBarControllerDelegate {
                 mail.isIndexShow = true
                 let nav = ZLNavigationController(rootViewController: mail)
                 return nav
-            }else {
+            } else {
                 let nav = ZLNavigationController(rootViewController: destVC)
                 return nav
             }
-        }else{
+        } else {
             let destVC = OOTabBarHelper.getVC(storyboardName: "task", vcName: nil)
             let nav = ZLNavigationController(rootViewController: destVC)
             return nav
         }
     }
+
     
-    private func _loginIM() {
-        viewModel.registerIM().then { (result) in
-            self.viewModel.loginIM().then({ (result) in
-                Log.debug(message: "IM登陆完成")
-            })
-            }.catch { (imError) in
-                let error = imError as! OOLoginError
-                switch error {
-                case .imRegisterFail(let myErr):
-                    Log.debug(message: myErr.errorDescription!)
-                    self.viewModel.loginIM().then({ (result) in
-                        Log.debug(message: "IM登陆完成")
-                    }).catch({ (loginError) in
-                        Log.error(message: "im Login Error \(loginError)")
-                    })
-                    break
-                default:
-                    break
+    // MARK: - IM message
+    func getConversationList() {
+        imViewModel.myConversationList().then { (list) in
+            var n = 0
+            if !list.isEmpty {
+                for item in list {
+                    if let number = item.unreadNumber {
+                        n += number
+                    }
+                }
+            }
+            DispatchQueue.main.async {
+                DDLogDebug("消息数量: \(n)")
+                if n > 0 && n < 100 {
+                    self.showRedPoint(number: "\(n)")
+                } else if n >= 100 {
+                    self.showRedPoint(number: "99..")
                 }
+            }
         }
     }
+
+    private func showRedPoint(number: String) {
+        self.viewControllers?.forEach({ (vc) in
+            if let zl = vc as? ZLNavigationController, zl.tabBarItem?.title == "消息" {
+                zl.tabBarItem.badgeValue = number
+            }
+        })
+    }
+    //消息模块未读消息数量加1
+    private func addUnreadNumber() {
+        self.viewControllers?.forEach({ (vc) in
+            if let zl = vc as? ZLNavigationController, zl.tabBarItem?.title == "消息" {
+                if let badge = zl.tabBarItem.badgeValue {
+                    if badge != "99.." {
+                        if let n = Int(string: badge) {
+                            let number = n + 1
+                            if number > 0 && number < 100 {
+                                self.showRedPoint(number: "\(number)")
+                            } else if number >= 100 {
+                                self.showRedPoint(number: "99..")
+                            }
+                        }
+                    }
+                }else {
+                    self.showRedPoint(number: "1")
+                }
+            }
+        })
+    }
+
+//    private func _loginIM() {
+//        viewModel.registerIM().then { (result) in
+//            self.viewModel.loginIM().then({ (result) in
+//                Log.debug(message: "IM登陆完成")
+//            })
+//        }.catch { (imError) in
+//            let error = imError as! OOLoginError
+//            switch error {
+//            case .imRegisterFail(let myErr):
+//                Log.debug(message: myErr.errorDescription!)
+//                self.viewModel.loginIM().then({ (result) in
+//                    Log.debug(message: "IM登陆完成")
+//                }).catch({ (loginError) in
+//                    Log.error(message: "im Login Error \(loginError)")
+//                })
+//                break
+//            default:
+//                break
+//            }
+//        }
+//    }
+
     
+    // MARK: - app update 
     private func checkAppVersion() {
         O2VersionManager.shared.checkAppUpdate { (info, error) in
             if let iosInfo = info {
@@ -175,10 +230,113 @@ class O2MainController: UITabBarController, UITabBarControllerDelegate {
                 alertController.addAction(cancelAction)
                 alertController.addAction(okAction)
                 UIApplication.shared.keyWindow?.rootViewController?.present(alertController, animated: true, completion: nil)
-            }else {
+            } else {
                 DDLogInfo("没有版本更新:\(error ?? "")")
             }
         }
     }
-    
+
+
+
+    // MARK: - websocket
+    private var timer: Timer?
+    private var isWsOpen = false
+
+    private func _startWebsocket() {
+        DDLogDebug("启动websocket连接。。。。。。")
+        let url = AppDelegate.o2Collect.generateWebsocketURL()
+        DDLogDebug("这个是wsurl :\(url)")
+        O2WebsocketManager.instance.startConnect(wsUrl: url, delegate: self)
+    }
+
+    private func _stopWebsocket() {
+        DDLogDebug("关闭websocket连接。。。。。。")
+        self.stopTiming()
+        O2WebsocketManager.instance.closeConnect()
+    }
+
+    private func startTiming() {
+        DDLogDebug("开启定时器 。。。。。。")
+        if timer != nil {
+            timer?.invalidate()
+            timer = nil
+        }
+        timer = Timer.scheduledTimer(timeInterval: 30, target: self, selector: #selector(sendHeartbeatMsg), userInfo: nil, repeats: true)
+        timer?.fire()
+    }
+    private func stopTiming() {
+        DDLogDebug("关闭定时器 。。。。。。")
+        if timer != nil {
+            timer?.invalidate()
+            timer = nil
+        }
+    }
+    //发送心跳
+    @objc private func sendHeartbeatMsg() {
+        if isWsOpen {
+            O2WebsocketManager.instance.send(msg: o2_im_ws_heartbeat)
+        } else { //重新启动
+            _startWebsocket()
+        }
+    }
+
 }
+
+extension O2MainController: WebSocketDelegate {
+
+
+    func didReceive(event: WebSocketEvent, client: WebSocket) {
+        switch event {
+        case .text(let text):
+            if text != o2_im_ws_heartbeat { //忽略心跳消息
+                DDLogDebug("接收的ws消息:\(text)")
+                //判断type im消息就发送通知
+                do {
+                    if let dicArr = try JSONSerialization.jsonObject(with: String(text).data(using: .utf8)!, options: .allowFragments) as? [String: AnyObject] {
+                        if let type = dicArr["type"] as? String, type == "im_create" {
+                            if let messageInfo = WsMessage.deserialize(from: text) {
+                                DDLogDebug("接收到im消息 发送通知。。")
+                                NotificationCenter.post(customeNotification: OONotification.websocket, object: messageInfo.body)
+                            }
+                            self.addUnreadNumber()
+                        }
+                    }
+                } catch { }
+            }
+            break
+        case .connected(let headers):
+            DDLogDebug("websocket is connected: \(headers)")
+            isWsOpen = true
+            self.startTiming()
+            break
+        case .disconnected(let reason, let code):
+            DDLogDebug("websocket is disconnected: \(reason) with code: \(code)")
+            isWsOpen = false
+            break
+        case .binary(let data):
+            DDLogDebug("Received binary data: \(data.count)")
+            break
+        case .ping(_):
+            break
+        case .pong(_):
+            break
+        case .viablityChanged(_):
+            DDLogDebug("websocket viablityChanged")
+            break
+        case .reconnectSuggested(_):
+            DDLogDebug("websocket reconnectSuggested")
+            break
+        case .cancelled:
+            DDLogDebug("websocket is canceled")
+            isWsOpen = false
+            break
+        case .error(let error):
+            DDLogError("websocket is error, \(String(describing: error?.localizedDescription))")
+            isWsOpen = false
+            break
+        }
+    }
+
+
+}
+

+ 18 - 16
o2ios/O2Platform/App/contacts/c/ContactPersonInfoV2ViewController.swift

@@ -67,6 +67,10 @@ class ContactPersonInfoV2ViewController: UITableViewController {
             isLoadPerson = false
         }
     }
+    //im 聊天
+    private lazy var viewModel: IMViewModel = {
+        return IMViewModel()
+    }()
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -94,28 +98,26 @@ class ContactPersonInfoV2ViewController: UITableViewController {
     }
     
     @objc private func _startChat() {
-        MBProgressHUD_JChat.showMessage(message: "创建中...", toView: view)
         var username = ""
-        if self.person != nil {
-            username = self.person?.id ?? ""
-        }else if self.identity != nil {
-            username = self.identity?.person ?? ""
+        if self.contact != nil {
+            username = self.contact?.distinguishedName ?? ""
+        }else if self.person != nil {
+            username = self.person?.distinguishedName ?? ""
         }
         if username == "" {
+            self.showError(title: "无法创建聊天!")
             return
         }
-        JMSGConversation.createSingleConversation(withUsername: username) { (result, error) in
-            MBProgressHUD_JChat.hide(forView: self.view, animated: true)
-            if error == nil {
-                let conv = result as! JMSGConversation
-                let vc = JCChatViewController(conversation: conv)
-                NotificationCenter.default.post(name: NSNotification.Name(rawValue: kUpdateConversation), object: nil, userInfo: nil)
-                self.navigationController?.pushViewController(vc, animated: true)
-            }else{
-                DDLogError(error.debugDescription)
-                MBProgressHUD_JChat.show(text: "创建会话失败,请重试", view: self.view)
-            }
+        
+        self.viewModel.createConversation(type: o2_im_conversation_type_single, users: [username]).then { (conv) in
+            let chatView = IMChatViewController()
+            chatView.conversation = conv
+            self.navigationController?.pushViewController(chatView, animated: true)
+        }.catch { (err) in
+            self.showError(title: "创建单聊失败, \(err.localizedDescription)")
         }
+        
+        
     }
 
     override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

+ 29 - 31
o2ios/O2Platform/App/contacts/contacts.storyboard

@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="iDJ-yD-7GA">
-    <device id="retina4_7" orientation="portrait">
-        <adaptation id="fullscreen"/>
-    </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="iDJ-yD-7GA">
+    <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -22,7 +20,7 @@
                                 <rect key="frame" x="0.0" y="55.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EyC-x7-vmj" id="9oF-MQ-3Ei">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ptf-Ml-OFP">
@@ -56,7 +54,7 @@
                                 <rect key="frame" x="0.0" y="105.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="b8p-Kf-TPW" id="9SB-Vc-9hf">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cZm-m3-L0j">
@@ -110,7 +108,7 @@
             <objects>
                 <tableViewController storyboardIdentifier="ContactPersonInfoV2" title="个人详细信息" useStoryboardIdentifierAsRestorationIdentifier="YES" id="3YZ-RH-20k" customClass="ContactPersonInfoV2ViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="vqn-wS-u18">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <view key="tableHeaderView" contentMode="scaleToFill" id="iVq-2P-h4E">
@@ -228,7 +226,7 @@
                             </constraints>
                         </view>
                         <view key="tableFooterView" contentMode="scaleToFill" id="Btm-sH-ehp">
-                            <rect key="frame" x="0.0" y="402" width="375" height="44"/>
+                            <rect key="frame" x="0.0" y="430" width="375" height="44"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                             <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         </view>
@@ -237,7 +235,7 @@
                                 <rect key="frame" x="0.0" y="358" width="375" height="44"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uPu-jr-Eup" id="7cS-du-cCp">
-                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ay2-QP-fxz">
@@ -298,7 +296,7 @@
             <objects>
                 <tableViewController storyboardIdentifier="companyDept" title="公司部门" useStoryboardIdentifierAsRestorationIdentifier="YES" id="AmI-yp-X5H" customClass="ContactCompanyDeptController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="50" sectionHeaderHeight="18" sectionFooterHeight="18" id="RsD-Jy-sNh">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                         <prototypes>
@@ -306,11 +304,11 @@
                                 <rect key="frame" x="0.0" y="55.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7bY-dM-eEp" id="mz8-vc-d4J">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Prg-Tx-oEu">
-                                            <rect key="frame" x="16" y="12" width="30" height="25.5"/>
+                                            <rect key="frame" x="16" y="12" width="30" height="26"/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="30" id="spI-VN-QSv"/>
                                             </constraints>
@@ -357,7 +355,7 @@
             <objects>
                 <tableViewController id="P8m-JR-nYf" customClass="ContactSearchViewController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="50" sectionHeaderHeight="18" sectionFooterHeight="18" id="U3c-0i-9CP">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                         <prototypes>
@@ -365,7 +363,7 @@
                                 <rect key="frame" x="0.0" y="55.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="j4U-nO-WUz" id="xGE-eP-qH3">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="spM-02-Z2O">
@@ -415,7 +413,7 @@
             <objects>
                 <tableViewController title="我的群组" id="LsC-tt-HCK" customClass="ContactGroupPersonController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="QdT-78-ZZu">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                         <prototypes>
@@ -423,11 +421,11 @@
                                 <rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VH3-gE-Egt" id="r7U-bZ-8Ro">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="44"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="2Yy-Gs-zHR">
-                                            <rect key="frame" x="16" y="10" width="30" height="23.5"/>
+                                            <rect key="frame" x="16" y="10" width="30" height="24"/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="30" id="TbG-w1-qGK"/>
                                             </constraints>
@@ -477,7 +475,7 @@
                         <viewControllerLayoutGuide type="bottom" id="MLL-Af-ftg"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="miS-ZM-vE9">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
@@ -491,7 +489,7 @@
             <objects>
                 <tableViewController storyboardIdentifier="DeptPerson" title="部门个人" useStoryboardIdentifierAsRestorationIdentifier="YES" id="rtm-Ih-lnV" customClass="ContactDeptPersonController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="50" sectionHeaderHeight="18" sectionFooterHeight="18" id="JaW-sK-m2q">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                         <view key="tableFooterView" contentMode="scaleToFill" id="885-HT-Hf5">
@@ -504,11 +502,11 @@
                                 <rect key="frame" x="0.0" y="55.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="eVD-9I-9Fp" id="KbZ-H9-Myg">
-                                    <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UbD-xq-ZqX">
-                                            <rect key="frame" x="10" y="0.0" width="355" height="49.5"/>
+                                            <rect key="frame" x="10" y="0.0" width="355" height="50"/>
                                         </scrollView>
                                     </subviews>
                                     <constraints>
@@ -526,7 +524,7 @@
                                 <rect key="frame" x="0.0" y="105.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Tw8-69-DnB" id="gPk-m5-2mE">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Nq8-LU-vKm">
@@ -560,7 +558,7 @@
                                 <rect key="frame" x="0.0" y="155.5" width="375" height="50"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vd8-tW-njc" id="Zue-nP-fAf">
-                                    <rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="50"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
                                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zkg-Zp-guU">
@@ -611,7 +609,7 @@
                 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="cvC-Xd-NbA" customClass="ZLNavigationController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="Ih6-yy-4wj">
-                        <rect key="frame" x="0.0" y="20" width="375" height="44"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="56"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -624,6 +622,12 @@
             <point key="canvasLocation" x="-767" y="1340"/>
         </scene>
     </scenes>
+    <inferredMetricsTieBreakers>
+        <segue reference="ou3-1r-djP"/>
+        <segue reference="JCQ-fv-wZ7"/>
+        <segue reference="5hh-6u-Olo"/>
+        <segue reference="EGH-4l-bNL"/>
+    </inferredMetricsTieBreakers>
     <resources>
         <image name="Shapes" width="25" height="25"/>
         <image name="icon_boy_1" width="50" height="50"/>
@@ -633,10 +637,4 @@
         <image name="personDefaultIcon" width="24" height="24"/>
         <image name="pic_beijing1" width="375" height="230"/>
     </resources>
-    <inferredMetricsTieBreakers>
-        <segue reference="Sy2-Dk-jgV"/>
-        <segue reference="aMD-xA-Tv2"/>
-        <segue reference="maa-Lm-CVS"/>
-        <segue reference="EGH-4l-bNL"/>
-    </inferredMetricsTieBreakers>
 </document>

+ 22 - 0
o2ios/O2Platform/Assets.xcassets/all/chat_emoji.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "chat_emoji@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "chat_emoji@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
o2ios/O2Platform/Assets.xcassets/all/chat_emoji.imageset/chat_emoji@2x.png


BIN
o2ios/O2Platform/Assets.xcassets/all/chat_emoji.imageset/chat_emoji@3x.png


+ 22 - 0
o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_incomming.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "chat_bubble_incomming@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "chat_bubble_incomming@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_incomming.imageset/chat_bubble_incomming@2x.png


BIN
o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_incomming.imageset/chat_bubble_incomming@3x.png


+ 22 - 0
o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_outgoing.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "chat_bubble_outgoing@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "chat_bubble_outgoing@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_outgoing.imageset/chat_bubble_outgoing@2x.png


BIN
o2ios/O2Platform/Assets.xcassets/首页/chat_bubble_outgoing.imageset/chat_bubble_outgoing@3x.png


+ 21 - 0
o2ios/O2Platform/Assets.xcassets/首页/group_default.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "group_default@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
o2ios/O2Platform/Assets.xcassets/首页/group_default.imageset/group_default@2x.png


+ 16 - 0
o2ios/O2Platform/Extension/ArrayExtensions.swift

@@ -201,6 +201,22 @@ extension Array where Element: Equatable {
     public func unique() -> Array {
         return reduce([]) { $0.contains($1) ? $0 : $0 + [$1] }
     }
+    
+    // MARK:- 获取帐号中的中文名称
+     func getChinaName() ->[String]{
+         let result = self
+         var arrTemp = [String]()
+         for userName  in result{
+              if let strUserName = userName as? String {
+                 if !strUserName.isBlank{
+                  let userNameSplit =  strUserName.split("@");
+                     arrTemp.append(userNameSplit[0])
+                 }
+             }
+         }
+         return arrTemp;
+    }
+
 }
 
 extension Array where Element: Hashable {

+ 17 - 8
o2ios/O2Platform/Extension/Bundle+Extension.swift

@@ -15,33 +15,42 @@ import Foundation
 //private  let _bundle:UnsafePointer<Void> =  unsafeBitCast(0,to: UnsafePointer<Void>.self)
 
 class BundleEx: Bundle {
-    
+
     override func localizedString(forKey key: String, value: String?, table tableName: String?) -> String {
         if let bundle = languageBundle() {
             return bundle.localizedString(forKey: key, value: value, table: tableName)
-        }else{
+        } else {
             return super.localizedString(forKey: key, value: value, table: tableName)
         }
     }
-    
-    
+
+
 }
 
-extension Bundle{
+extension Bundle {
 //    private struct Static {
 //        static let onceToken: Static = { Static() }()
 //    }
 //
-    func onLanguage(){
+    func onLanguage() {
         //替换NSBundle.mainBundle()为自定义的BundleEx
         DispatchQueue.once(token: "language") {
             object_setClass(Bundle.main, BundleEx.self)
         }
     }
-    
+
     //当前语言的bundle
-    func languageBundle() -> Bundle?{
+    func languageBundle() -> Bundle? {
         return Languager.standardLanguager().currentLanguageBundle
     }
+
+    //o2 表情包读取
+    func o2EmojiBundle(anyClass: AnyClass) -> Bundle {
+        var bundle: Bundle = Bundle.main
+        if let resource = Bundle(for: anyClass.self).path(forResource: "O2Emoji", ofType: "bundle") {
+            bundle = Bundle(path: resource) ?? Bundle.main
+        }
+        return bundle
+    }
 }
 

+ 35 - 21
o2ios/O2Platform/Extension/Date+Extension.swift

@@ -211,6 +211,13 @@ extension Date {
         return self.year == date.year
     }
     
+    /**间隔天数
+     */
+    func betweenDays(_ date: Date) -> Int {
+        let components = Calendar.current.dateComponents([.day], from: self, to: date)
+        return abs(components.day ?? 0)
+    }
+    
     func haveSameYearAndMonth(_ date: Date) -> Bool {
         return self.haveSameYear(date) && self.month == date.month
     }
@@ -269,29 +276,36 @@ extension Date {
     func friendlyTime() -> String {
         var returnTimeString = ""
         let now = Date()
-        if now.haveSameYearMonthDayAndHour(self) {
-            let gap = now.minute - self.minute
-            returnTimeString = "\(gap)分钟前"
-        }else if now.haveSameYearMonthAndDay(self) {
-            let gap = now.hour - self.hour
-            returnTimeString = "\(gap)小时前"
-        }else if now.haveSameYearAndMonth(self) {
-            let gap = now.day - self.day
-            if gap == 1 {
-                returnTimeString = "昨天"
-            }else if gap == 2 {
-                returnTimeString = "前天"
-            }else {
-                returnTimeString = "\(gap)天前"
-            }
-        }else if now.haveSameYear(self) {
-            let gap = now.month - self.month
-            if gap < 4 {
-                returnTimeString = "\(gap)个月前"
+        let millisecond = CLongLong(round(self.timeIntervalSince1970*1000))
+        let nowMillisecond = CLongLong(round(now.timeIntervalSince1970*1000))
+        let lt = millisecond / 86400000
+        let ct = nowMillisecond / 86400000
+        let days = Int(ct - lt);
+        if (days == 0) {
+            let hour = Int((nowMillisecond - millisecond) / 3600000)
+            if (hour == 0) {
+                let minuts = Int((nowMillisecond - millisecond) / 60000)
+                if minuts > 1 {
+                    returnTimeString = "\(minuts)分钟前"
+                }else {
+                    returnTimeString = "刚刚"
+                }
             }else {
-                returnTimeString = self.formatterDate(formatter: "yyyy-MM-dd")
+                returnTimeString = "\(hour)小时前"
             }
-        }else {
+        }else if (days == 1) {
+            returnTimeString = "昨天";
+        } else if (days == 2) {
+            returnTimeString = "前天 ";
+        } else if (days > 2 && days < 31) {
+            returnTimeString = "\(days)天前";
+        } else if (days >= 31 && days <= 2 * 31) {
+            returnTimeString = "一个月前";
+        } else if (days > 2 * 31 && days <= 3 * 31) {
+            returnTimeString = "2个月前";
+        } else if (days > 3 * 31 && days <= 4 * 31) {
+            returnTimeString = "3个月前";
+        } else {
             returnTimeString = self.formatterDate(formatter: "yyyy-MM-dd")
         }
         return returnTimeString

+ 2 - 0
o2ios/O2Platform/Extension/Notification+Extension.swift

@@ -22,6 +22,8 @@ enum OONotification:String {
     //重载门户webview
     case reloadPortal
     
+    case websocket
+    
     
     
     var stringValue:String {

+ 17 - 0
o2ios/O2Platform/Extension/String+Extenstion.swift

@@ -128,5 +128,22 @@ extension String {
         return s
     }
 
+    // MARK:- 获取帐号中的中文名称
+    func getChinaName() -> String{
+        let userName = self
+        var strTemp = ""
+        if !userName.isBlank{
+              let userNameSplit =  userName.split("@");
+              if strTemp == "" {
+                 strTemp = userNameSplit[0]
+              }else{
+                  strTemp = strTemp + "," + userNameSplit[0]
+              }
+              print(strTemp)
+         }
+        return strTemp
+        
+    }
+
     
 }

+ 7 - 0
o2ios/O2Platform/Extension/UIDeviceExtensions.swift

@@ -29,6 +29,13 @@ private let DeviceList = [
     /* iPhone 8 */        "iPhone10,1": "iPhone 8", "iPhone10,4": "iPhone 8",
     /* iPhone 8 Plus */   "iPhone10,2": "iPhone 8 Plus", "iPhone10,5": "iPhone 8 Plus",
     /* iPhone X */        "iPhone10,3": "iPhone X", "iPhone10,6": "iPhone X",
+    /* iPhone XS */       "iPhone11,2": "iPhone XS",
+    /* iPhone XS Max */   "iPhone11,4": "iPhone XS Max", "iPhone11,6": "iPhone XS Max",
+    /* iPhone XR */       "iPhone11,8": "iPhone XR",
+    /* iPhone 11 */       "iPhone12,1": "iPhone 11",
+    /* iPhone 11 Pro*/    "iPhone12,3": "iPhone 11 Pro",
+    /* iPhone 11 Pro Max*/"iPhone12,5": "iPhone 11 Pro Max",
+    /* iPhone SE 2*/      "iPhone12,8": "iPhone SE 2",
 
     /* iPad 2 */          "iPad2,1": "iPad 2", "iPad2,2": "iPad 2", "iPad2,3": "iPad 2", "iPad2,4": "iPad 2",
     /* iPad 3 */          "iPad3,1": "iPad 3", "iPad3,2": "iPad 3", "iPad3,3": "iPad 3",

+ 33 - 0
o2ios/O2Platform/Extension/UIView+Extension.swift

@@ -171,6 +171,39 @@ extension UIView {
         self.layer.cornerRadius = radius
         self.layer.masksToBounds = true
     }
+    
+    //画线
+    private func drawBorder(rect:CGRect,color:UIColor){
+        let line = UIBezierPath(rect: rect)
+        let lineShape = CAShapeLayer()
+        lineShape.path = line.cgPath
+        lineShape.fillColor = color.cgColor
+        self.layer.addSublayer(lineShape)
+    }
+    
+    //设置右边框
+    public func rightBorder(width:CGFloat,borderColor:UIColor){
+        let rect = CGRect(x: 0, y: self.frame.size.width - width, width: width, height: self.frame.size.height)
+        drawBorder(rect: rect, color: borderColor)
+    }
+    //设置左边框
+    public func leftBorder(width:CGFloat,borderColor:UIColor){
+        let rect = CGRect(x: 0, y: 0, width: width, height: self.frame.size.height)
+        drawBorder(rect: rect, color: borderColor)
+    }
+    //设置上边框
+    public func topBorder(width:CGFloat,borderColor:UIColor){
+        let rect = CGRect(x: 0, y: 0, width: self.frame.size.width, height: width)
+        drawBorder(rect: rect, color: borderColor)
+    }
+    //设置底边框
+    public func buttomBorder(width:CGFloat,borderColor:UIColor){
+        let rect = CGRect(x: 0, y: self.frame.size.height-width, width: self.frame.size.width, height: width)
+        drawBorder(rect: rect, color: borderColor)
+    }
+
+
+
 
 }
 

+ 7 - 0
o2ios/O2Platform/Framework/O2API/AttendanceAPI/OOAttendanceAPI.swift

@@ -22,6 +22,7 @@ enum OOAttendanceAPI {
     case checkinCycle(String,String) //考勤周期
     case checkinTotalForMonth(OOAttandanceTotalBean) //考勤统计
     case checkinAnalyze(OOAttandanceTotalBean) //考勤分析
+    case listMyRecord //当前用户当前的打卡情况和班次
 }
 
 // MARK:- 上下文实现
@@ -66,6 +67,8 @@ extension OOAttendanceAPI:TargetType {
             return "/jaxrs/attendancedetail/filter/list"
         case .checkinAnalyze(let bean):
             return "/jaxrs/statisticshow/person/\(bean.q_empName!)/\(bean.q_year!)/\(bean.q_month!)"
+        case .listMyRecord:
+            return "/jaxrs/attendancedetail/mobile/my"
         
         }
     }
@@ -90,6 +93,8 @@ extension OOAttendanceAPI:TargetType {
             return .put
         case .checkinAnalyze(_):
             return .get
+        case .listMyRecord:
+            return .get
         }
     }
     
@@ -117,6 +122,8 @@ extension OOAttendanceAPI:TargetType {
             return .requestParameters(parameters: bean.toJSON() ?? [:], encoding: JSONEncoding.default)
         case .checkinAnalyze(_):
             return .requestPlain
+        case .listMyRecord:
+            return .requestPlain
         }
     }
     

+ 97 - 0
o2ios/O2Platform/Framework/O2API/Communicate/CommunicateAPI.swift

@@ -0,0 +1,97 @@
+//
+//  CommunicateAPI.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/4.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import Moya
+import O2OA_Auth_SDK
+
+// MARK: - 消息模块
+
+enum CommunicateAPI {
+    case myConversationList
+    case msgListByPaging(Int, Int, String)
+    case sendMsg(IMMessageInfo)
+    case readConversation(String)
+    case instantMessageList(Int)
+    case createConversation(IMConversationInfo)
+    
+    
+}
+
+extension CommunicateAPI: OOAPIContextCapable {
+    var apiContextKey: String {
+           return "x_message_assemble_communicate"
+       }
+}
+
+// 是否需要xtoken
+extension CommunicateAPI: OOAccessTokenAuthorizable {
+    var shouldAuthorize: Bool {
+        return true
+    }
+}
+
+extension CommunicateAPI: TargetType {
+    var baseURL: URL {
+        let model  = O2AuthSDK.shared.centerServerInfo()?.assembles?["x_message_assemble_communicate"]
+        let baseURLString = "\(model?.httpProtocol ?? "http")://\(model?.host ?? ""):\(model?.port ?? 0)\(model?.context ?? "")"
+        return URL(string: baseURLString)!
+    }
+    
+    
+    var path: String {
+        switch self {
+        case .myConversationList:
+            return "/jaxrs/im/conversation/list/my"
+        case .msgListByPaging(let page, let size, _):
+            return "/jaxrs/im/msg/list/\(page)/size/\(size)"
+        case .sendMsg(_):
+            return "/jaxrs/im/msg"
+        case .readConversation(let conversationId):
+            return "/jaxrs/im/conversation/\(conversationId)/read"
+        case .instantMessageList(let count):
+            return "/jaxrs/instant/list/currentperson/noim/count/\(count)/desc"
+        case .createConversation(_):
+            return "/jaxrs/im/conversation"
+        }
+    }
+    
+    var method: Moya.Method {
+        switch self {
+        case .myConversationList, .instantMessageList(_):
+            return .get
+        case .msgListByPaging(_, _, _), .sendMsg(_), .createConversation(_):
+            return .post
+        case .readConversation(_):
+            return .put
+        }
+    }
+    
+    var sampleData: Data {
+        return "".data(using: String.Encoding.utf8)!
+    }
+    
+    var task: Task {
+        switch self {
+        case .myConversationList, .instantMessageList(_), .readConversation(_):
+            return .requestPlain
+        case .msgListByPaging(_, _, let conversationId):
+            let form = IMMessageRequestForm()
+            form.conversationId = conversationId
+            return .requestParameters(parameters: form.toJSON()!, encoding: JSONEncoding.default)
+        case .sendMsg(let msg):
+            return .requestParameters(parameters: msg.toJSON()!, encoding: JSONEncoding.default)
+        case .createConversation(let conv):
+            return .requestParameters(parameters: conv.toJSON()!, encoding: JSONEncoding.default)
+        }
+    }
+    
+    var headers: [String : String]? {
+        return nil
+    }
+   
+}

+ 2 - 2
o2ios/O2Platform/Info.plist

@@ -163,7 +163,7 @@
 		<key>centerContext</key>
 		<string>/x_program_center</string>
 		<key>centerHost</key>
-		<string>qywx.o2oa.net</string>
+		<string>dd.o2oa.net</string>
 		<key>centerPort</key>
 		<integer>20030</integer>
 		<key>httpProtocol</key>
@@ -171,7 +171,7 @@
 		<key>id</key>
 		<string>o2CenterServer</string>
 		<key>name</key>
-		<string>dev</string>
+		<string>dd</string>
 	</dict>
 </dict>
 </plist>

+ 56 - 0
o2ios/O2Platform/Manager/O2WebsocketManager.swift

@@ -0,0 +1,56 @@
+//
+//  O2WebsocketManager.swift
+//  O2Platform
+//
+//  Created by FancyLou on 2020/6/1.
+//  Copyright © 2020 zoneland. All rights reserved.
+//
+
+import Foundation
+import Starscream
+import CocoaLumberjack
+
+
+class O2WebsocketManager {
+
+    static let instance: O2WebsocketManager = {
+        return O2WebsocketManager()
+    }()
+
+    private init() { }
+
+    private var socket: WebSocket?
+
+
+    // wsUrl: ws://xxx.o2oa.net:20020/x_message_assemble_communicate/ws/collaboration?x-token=xxxxxxx
+    //开启连接
+    func startConnect(wsUrl: String, delegate: WebSocketDelegate) {
+        let request = URLRequest(url: URL(string: wsUrl)!)
+        socket = WebSocket(request: request)
+        socket?.delegate = delegate
+        socket?.connect()
+    }
+
+    //发送消息
+    func send(msg: String) {
+        guard let s = socket else {
+            DDLogError("socket 为空 还未启动 无法发送消息")
+            return
+        }
+        s.write(string: msg)
+    }
+
+    //关闭连接
+    func closeConnect() {
+        guard let s = socket else {
+            DDLogError("socket 为空 无需关闭")
+            return
+        }
+        s.disconnect(closeCode: CloseCode.goingAway.rawValue)
+        socket = nil
+    }
+
+}
+
+
+

+ 0 - 1
o2ios/O2Platform/O2Platform-Bridging-Header.h

@@ -44,4 +44,3 @@
 // flutter
 #import "GeneratedPluginRegistrant.h"
 
-

BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/Info.plist


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_01.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_02.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_03.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_04.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_05.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_06.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_07.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_08.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_09.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_10.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_11.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_12.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_13.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_14.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_15.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_16.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_17.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_18.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_19.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_20.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_21.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_22.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_23.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_24.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_25.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_26.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_27.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_28.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_29.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_30.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_31.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_32.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_33.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_34.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_35.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_36.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_37.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_38.png


BIN
o2ios/O2Platform/Resources/O2Emoji.bundle/im_emotion_39.png


Некоторые файлы не были показаны из-за большого количества измененных файлов