Bläddra i källkod

修改已办日志列表展现形式,修复日历loading的bug

fancy 5 år sedan
förälder
incheckning
e8ab6e9857

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

@@ -465,11 +465,11 @@ class OOCalendarEventViewController: UITableViewController {
             event.recurrenceRule = rruleEncode()
             event.valarmTime_config = remindValue == "NONE" ? "" : remindValue
             event.comment = remark
-            viewModel.saveCalendarEvent(event: event).then { (result)  in
+            viewModel.saveCalendarEvent(event: event).always{
+                self.hideLoading()
+            }.then { (result)  in
                 DDLogInfo("保存结果:\(result)")
                 self.closeWindow()
-                }.always{
-                    self.hideLoading()
                 }.catch { (error) in
                     DDLogError(error.localizedDescription)
                     self.showError(title: "保存日程错误!")
@@ -526,33 +526,33 @@ class OOCalendarEventViewController: UITableViewController {
     }
     
     private func updateSingle() {
-        viewModel.updateCalendarEventSingle(id: (eventInfo?.id!)!, event: eventInfo!).then { (result)  in
+        viewModel.updateCalendarEventSingle(id: (eventInfo?.id!)!, event: eventInfo!).always {
+            self.hideLoading()
+        }.then { (result)  in
             DDLogInfo("保存结果:\(result)")
             self.closeWindow()
-            }.always{
-                self.hideLoading()
             }.catch { (error) in
                 DDLogError(error.localizedDescription)
                 self.showError(title: "更新单个日程错误!")
         }
     }
     private func updateAfter() {
-        viewModel.updateCalendarEventAfter(id: (eventInfo?.id!)!, event: eventInfo!).then { (result)  in
+        viewModel.updateCalendarEventAfter(id: (eventInfo?.id!)!, event: eventInfo!).always {
+            self.hideLoading()
+        }.then { (result)  in
             DDLogInfo("保存结果:\(result)")
             self.closeWindow()
-            }.always{
-                self.hideLoading()
             }.catch { (error) in
                 DDLogError(error.localizedDescription)
                 self.showError(title: "更新after日程错误!")
         }
     }
     private func updateAll() {
-        viewModel.updateCalendarEventAll(id: (eventInfo?.id!)!, event: eventInfo!).then { (result)  in
+        viewModel.updateCalendarEventAll(id: (eventInfo?.id!)!, event: eventInfo!).always {
+            self.hideLoading()
+        }.then { (result)  in
             DDLogInfo("保存结果:\(result)")
             self.closeWindow()
-            }.always{
-                self.hideLoading()
             }.catch { (error) in
                 DDLogError(error.localizedDescription)
                 self.showError(title: "更新all日程错误!")
@@ -581,31 +581,31 @@ class OOCalendarEventViewController: UITableViewController {
         self.showLoading()
         switch type {
         case 0:
-            viewModel.deleteCalendarEventSingle(id: (eventInfo?.id!)!).then { (result)  in
+            viewModel.deleteCalendarEventSingle(id: (eventInfo?.id!)!).always{
+                self.hideLoading()
+            }.then { (result)  in
                 DDLogInfo("删除结果:\(result)")
                 self.closeWindow()
-                }.always{
-                    self.hideLoading()
                 }.catch { (error) in
                     DDLogError(error.localizedDescription)
                     self.showError(title: "删除Single日程错误!")
             }
         case 1:
-            viewModel.deleteCalendarEventAfter(id: (eventInfo?.id!)!).then { (result)  in
+            viewModel.deleteCalendarEventAfter(id: (eventInfo?.id!)!).always{
+                self.hideLoading()
+            }.then { (result)  in
                 DDLogInfo("删除结果:\(result)")
                 self.closeWindow()
-                }.always{
-                    self.hideLoading()
                 }.catch { (error) in
                     DDLogError(error.localizedDescription)
                     self.showError(title: "删除After日程错误!")
             }
         case 2:
-            viewModel.deleteCalendarEventAll(id: (eventInfo?.id!)!).then { (result)  in
+            viewModel.deleteCalendarEventAll(id: (eventInfo?.id!)!).always {
+                self.hideLoading()
+            }.then { (result)  in
                 DDLogInfo("删除结果:\(result)")
                 self.closeWindow()
-                }.always{
-                    self.hideLoading()
                 }.catch { (error) in
                     DDLogError(error.localizedDescription)
                     self.showError(title: "删除All日程错误!")

+ 21 - 25
o2ios/O2Platform/App/Calendar-日程管理/Controller/OOCalendarViewController.swift

@@ -42,7 +42,6 @@ class OOCalendarViewController: UITableViewController {
     @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!
@@ -55,19 +54,11 @@ class OOCalendarViewController: UITableViewController {
 
     @IBOutlet weak var calendarIsOpenBtn: UIButton!
 
-    @IBAction func editRemarkBtn(_ sender: Any) {
-        self.performSegue(withIdentifier: "ShowEditRemark", sender: nil)
-    }
-
-
+//    @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)
@@ -100,22 +91,18 @@ class OOCalendarViewController: UITableViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
         if calendarInfo != nil && calendarInfo?.id != nil {
-            self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "修改", style: .plain, target: self, action: #selector(tapSave))
+            self.navigationItem.rightBarButtonItems = [
+                UIBarButtonItem(title: "修改保存", style: .plain, target: self, action: #selector(tapSave)),
+                UIBarButtonItem(title: "删除", style: .plain, target: self, action: #selector(tapDelete))
+            ]
             self.navigationItem.title = "修改日历"
+            loadCalendarInfoFromNet()
         } else {
             self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "保存", style: .plain, target: self, action: #selector(tapSave))
             self.navigationItem.title = "新增日历"
-        }
-        self.tableView.tableFooterView = UIView(frame: CGRect.zero)
-
-        if calendarInfo != nil && calendarInfo?.id != nil {
-            loadCalendarInfoFromNet()
-            calendarDeleteBtn.isHidden = false
-        } else {
             self.calendarInfo = OOCalendarInfo.init()
-            calendarDeleteBtn.isHidden = true
         }
-
+        self.tableView.tableFooterView = UIView(frame: CGRect.zero)
 
         //隐藏输入法
         calendarNameField.delegate = self
@@ -145,6 +132,11 @@ class OOCalendarViewController: UITableViewController {
         self.view.endEditing(true)
     }
 
+    @objc func tapDelete() {
+        showDefaultConfirm(title: "删除日历", message: "确定要删除当前日历吗,会同时删除该日历下的日程事件?") { (action) in
+            self.deleteCalendar()
+        }
+    }
     @objc func tapSave() {
         hideKeyboard()
         let name = calendarNameField.text
@@ -198,11 +190,13 @@ class OOCalendarViewController: UITableViewController {
     }
     private func deleteCalendar() {
         self.showLoading()
-        viewModel.deleteCalendar(id: (calendarInfo?.id!)!).then { (result) in
+        viewModel.deleteCalendar(id: (calendarInfo?.id!)!)
+        .always {
+            self.hideLoading()
+        }
+        .then { (result) in
             DDLogInfo("删除结果:\(result)")
             self.closeWindow()
-        }.always {
-            self.hideLoading()
         }.catch { (error) in
             DDLogError(error.localizedDescription)
             self.showError(title: "删除日历错误!")
@@ -427,6 +421,7 @@ class OOCalendarViewController: UITableViewController {
 
 
     private func loadCalendarInfoFromNet() {
+        DDLogDebug("loadCalendarInfoFromNet............")
         viewModel.getCalendar(id: (calendarInfo?.id)!)
             .then { (calendar) in
                 self.updateStuffValue(calendar: calendar)
@@ -436,6 +431,7 @@ class OOCalendarViewController: UITableViewController {
     }
 
     private func updateStuffValue(calendar: OOCalendarInfo) {
+        DDLogDebug("updateStuffValue............\(calendar.color)")
         calendarNameField.text = calendar.name
 
         if calendar.type == "UNIT" {

+ 21 - 61
o2ios/O2Platform/App/Calendar-日程管理/calendar.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="tKt-3P-uQz">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" 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"/>
@@ -922,16 +922,15 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请选择类型" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6Nq-Qx-KK4">
-                                                    <rect key="frame" x="16" y="6" width="291" height="32"/>
+                                                    <rect key="frame" x="16" y="6" width="287" height="32"/>
                                                     <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                     <textInputTraits key="textInputTraits"/>
                                                 </textField>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GjW-u2-fg5">
-                                                    <rect key="frame" x="319" y="6" width="32" height="32"/>
+                                                    <rect key="frame" x="315" y="6" width="44" height="32"/>
                                                     <constraints>
-                                                        <constraint firstAttribute="height" constant="32" id="W9a-KM-Bba"/>
-                                                        <constraint firstAttribute="width" constant="32" id="rno-Bo-Yb6"/>
+                                                        <constraint firstAttribute="width" constant="44" id="rno-Bo-Yb6"/>
                                                     </constraints>
                                                     <state key="normal" title="选择"/>
                                                     <connections>
@@ -942,7 +941,7 @@
                                             <constraints>
                                                 <constraint firstAttribute="bottom" secondItem="6Nq-Qx-KK4" secondAttribute="bottom" constant="6" id="AIZ-wd-7mK"/>
                                                 <constraint firstItem="GjW-u2-fg5" firstAttribute="top" secondItem="EZA-d2-7f1" secondAttribute="top" constant="6" id="MIe-qp-SqM"/>
-                                                <constraint firstAttribute="trailing" secondItem="GjW-u2-fg5" secondAttribute="trailing" constant="24" id="YZn-fx-RPo"/>
+                                                <constraint firstAttribute="trailing" secondItem="GjW-u2-fg5" secondAttribute="trailing" constant="16" id="YZn-fx-RPo"/>
                                                 <constraint firstItem="GjW-u2-fg5" firstAttribute="leading" secondItem="6Nq-Qx-KK4" secondAttribute="trailing" constant="12" id="aCh-YM-UYH"/>
                                                 <constraint firstItem="6Nq-Qx-KK4" firstAttribute="top" secondItem="EZA-d2-7f1" secondAttribute="top" constant="6" id="aY8-2v-BEC"/>
                                                 <constraint firstAttribute="bottom" secondItem="GjW-u2-fg5" secondAttribute="bottom" constant="6" id="dTF-AD-Pg2"/>
@@ -1229,16 +1228,15 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择所属组织" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="vpF-O7-lvf">
-                                                    <rect key="frame" x="16" y="6" width="291" height="32"/>
+                                                    <rect key="frame" x="16" y="6" width="287" height="32"/>
                                                     <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                     <textInputTraits key="textInputTraits"/>
                                                 </textField>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kae-RP-FyB">
-                                                    <rect key="frame" x="319" y="6" width="32" height="32"/>
+                                                    <rect key="frame" x="315" y="6" width="44" height="32"/>
                                                     <constraints>
-                                                        <constraint firstAttribute="width" constant="32" id="Hwl-ng-8iq"/>
-                                                        <constraint firstAttribute="height" constant="32" id="ZuX-YZ-s8I"/>
+                                                        <constraint firstAttribute="width" constant="44" id="Hwl-ng-8iq"/>
                                                     </constraints>
                                                     <state key="normal" title="选择"/>
                                                     <connections>
@@ -1250,7 +1248,7 @@
                                                 <constraint firstItem="vpF-O7-lvf" firstAttribute="top" secondItem="SSH-zn-oXh" secondAttribute="top" constant="6" id="J2T-eN-he2"/>
                                                 <constraint firstItem="kae-RP-FyB" firstAttribute="top" secondItem="SSH-zn-oXh" secondAttribute="top" constant="6" id="Q0R-ZW-QPM"/>
                                                 <constraint firstAttribute="bottom" secondItem="kae-RP-FyB" secondAttribute="bottom" constant="6" id="Q2f-Im-2VI"/>
-                                                <constraint firstAttribute="trailing" secondItem="kae-RP-FyB" secondAttribute="trailing" constant="24" id="S3M-PM-Qan"/>
+                                                <constraint firstAttribute="trailing" secondItem="kae-RP-FyB" secondAttribute="trailing" constant="16" id="S3M-PM-Qan"/>
                                                 <constraint firstItem="kae-RP-FyB" firstAttribute="leading" secondItem="vpF-O7-lvf" secondAttribute="trailing" constant="12" id="ZdW-3y-eX1"/>
                                                 <constraint firstAttribute="bottom" secondItem="vpF-O7-lvf" secondAttribute="bottom" constant="6" id="gkU-as-WY8"/>
                                                 <constraint firstItem="vpF-O7-lvf" firstAttribute="leading" secondItem="SSH-zn-oXh" secondAttribute="leading" constant="16" id="iuw-nj-CGt"/>
@@ -1265,16 +1263,15 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择管理者" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bIB-vr-JmD">
-                                                    <rect key="frame" x="16" y="6" width="291" height="32"/>
+                                                    <rect key="frame" x="16" y="6" width="287" height="32"/>
                                                     <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                     <textInputTraits key="textInputTraits"/>
                                                 </textField>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m4R-gF-vOd">
-                                                    <rect key="frame" x="319" y="6" width="32" height="32"/>
+                                                    <rect key="frame" x="315" y="6" width="44" height="32"/>
                                                     <constraints>
-                                                        <constraint firstAttribute="width" constant="32" id="L1T-hn-46f"/>
-                                                        <constraint firstAttribute="height" constant="32" id="TkP-zZ-3HE"/>
+                                                        <constraint firstAttribute="width" constant="44" id="L1T-hn-46f"/>
                                                     </constraints>
                                                     <state key="normal" title="选择"/>
                                                     <connections>
@@ -1285,7 +1282,7 @@
                                             <constraints>
                                                 <constraint firstItem="bIB-vr-JmD" firstAttribute="leading" secondItem="iOf-91-Mpo" secondAttribute="leading" constant="16" id="4ou-CN-BP7"/>
                                                 <constraint firstAttribute="bottom" secondItem="m4R-gF-vOd" secondAttribute="bottom" constant="6" id="LoN-Hb-nig"/>
-                                                <constraint firstAttribute="trailing" secondItem="m4R-gF-vOd" secondAttribute="trailing" constant="24" id="UfC-cM-iMM"/>
+                                                <constraint firstAttribute="trailing" secondItem="m4R-gF-vOd" secondAttribute="trailing" constant="16" id="UfC-cM-iMM"/>
                                                 <constraint firstItem="m4R-gF-vOd" firstAttribute="top" secondItem="iOf-91-Mpo" secondAttribute="top" constant="6" id="XNp-6R-SxO"/>
                                                 <constraint firstItem="m4R-gF-vOd" firstAttribute="leading" secondItem="bIB-vr-JmD" secondAttribute="trailing" constant="12" id="cd8-WC-7bV"/>
                                                 <constraint firstItem="bIB-vr-JmD" firstAttribute="top" secondItem="iOf-91-Mpo" secondAttribute="top" constant="6" id="yY4-uT-gAH"/>
@@ -1301,16 +1298,15 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择可见范围" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="5RB-dp-23j">
-                                                    <rect key="frame" x="16" y="6" width="291" height="32"/>
+                                                    <rect key="frame" x="16" y="6" width="287" height="32"/>
                                                     <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                     <textInputTraits key="textInputTraits"/>
                                                 </textField>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Yrc-Ws-oZH">
-                                                    <rect key="frame" x="319" y="6" width="32" height="32"/>
+                                                    <rect key="frame" x="315" y="6" width="44" height="32"/>
                                                     <constraints>
-                                                        <constraint firstAttribute="height" constant="32" id="Xvt-5E-w3M"/>
-                                                        <constraint firstAttribute="width" constant="32" id="qzS-jN-n7Y"/>
+                                                        <constraint firstAttribute="width" constant="44" id="qzS-jN-n7Y"/>
                                                     </constraints>
                                                     <state key="normal" title="选择"/>
                                                     <connections>
@@ -1325,7 +1321,7 @@
                                                 <constraint firstAttribute="bottom" secondItem="5RB-dp-23j" secondAttribute="bottom" constant="6" id="ggd-Id-8Ql"/>
                                                 <constraint firstAttribute="bottom" secondItem="Yrc-Ws-oZH" secondAttribute="bottom" constant="6" id="nG1-Sd-yel"/>
                                                 <constraint firstItem="Yrc-Ws-oZH" firstAttribute="top" secondItem="08M-eV-Wtw" secondAttribute="top" constant="6" id="olv-zV-pqA"/>
-                                                <constraint firstAttribute="trailing" secondItem="Yrc-Ws-oZH" secondAttribute="trailing" constant="24" id="zUH-nC-fcT"/>
+                                                <constraint firstAttribute="trailing" secondItem="Yrc-Ws-oZH" secondAttribute="trailing" constant="16" id="zUH-nC-fcT"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                     </tableViewCell>
@@ -1337,16 +1333,15 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="选择可新建范围" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="HYK-cG-NOj">
-                                                    <rect key="frame" x="16" y="6" width="291" height="32"/>
+                                                    <rect key="frame" x="16" y="6" width="287" height="32"/>
                                                     <accessibility key="accessibilityConfiguration" identifier="calendarType"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                     <textInputTraits key="textInputTraits"/>
                                                 </textField>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ueU-we-edj">
-                                                    <rect key="frame" x="319" y="6" width="32" height="32"/>
+                                                    <rect key="frame" x="315" y="6" width="44" height="32"/>
                                                     <constraints>
-                                                        <constraint firstAttribute="width" constant="32" id="LGG-fL-DaH"/>
-                                                        <constraint firstAttribute="height" constant="32" id="WoG-4j-BlE"/>
+                                                        <constraint firstAttribute="width" constant="44" id="LGG-fL-DaH"/>
                                                     </constraints>
                                                     <state key="normal" title="选择"/>
                                                     <connections>
@@ -1358,7 +1353,7 @@
                                                 <constraint firstItem="ueU-we-edj" firstAttribute="top" secondItem="uYh-KG-FIU" secondAttribute="top" constant="6" id="0QB-av-9Fw"/>
                                                 <constraint firstAttribute="bottom" secondItem="ueU-we-edj" secondAttribute="bottom" constant="6" id="1Ed-sZ-eSS"/>
                                                 <constraint firstItem="HYK-cG-NOj" firstAttribute="leading" secondItem="uYh-KG-FIU" secondAttribute="leading" constant="16" id="H6R-aE-WPo"/>
-                                                <constraint firstAttribute="trailing" secondItem="ueU-we-edj" secondAttribute="trailing" constant="24" id="JgJ-Gq-FTQ"/>
+                                                <constraint firstAttribute="trailing" secondItem="ueU-we-edj" secondAttribute="trailing" constant="16" id="JgJ-Gq-FTQ"/>
                                                 <constraint firstItem="HYK-cG-NOj" firstAttribute="top" secondItem="uYh-KG-FIU" secondAttribute="top" constant="6" id="XlS-j1-UkW"/>
                                                 <constraint firstItem="ueU-we-edj" firstAttribute="leading" secondItem="HYK-cG-NOj" secondAttribute="trailing" constant="12" id="i3z-wh-vsK"/>
                                                 <constraint firstAttribute="bottom" secondItem="HYK-cG-NOj" secondAttribute="bottom" constant="6" id="wJ6-a2-pUy"/>
@@ -1399,40 +1394,6 @@
                                             </constraints>
                                         </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>
@@ -1443,7 +1404,6 @@
                     </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"/>

+ 2 - 4
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceTotalController.swift

@@ -58,6 +58,8 @@ class OOAttanceTotalController: UITableViewController {
         viewModel.getCheckinCycle(self.year, self.month).then { (cycleDetail) -> Promise<(OOAttandanceAnalyze,[OOAttandanceCheckinTotal])> in
                 self.headerView.requestBean = cycleDetail
                return all(self.viewModel.getCheckinAnalyze(cycleDetail), self.viewModel.getCheckinTotal(cycleDetail))
+            }.always {
+                self.hideLoading()
             }.then { (result) in
                 self.headerView.config(withItem: result.0)
                 let list = result.1
@@ -72,14 +74,10 @@ class OOAttanceTotalController: UITableViewController {
                     }
                     self.models.append(contentsOf: newList)
                 }
-                
-            }.always {
-                self.hideLoading()
                 self.tableView.reloadData()
                 if self.tableView.mj_header.isRefreshing() {
                     self.tableView.mj_header.endRefreshing()
                 }
-                
             }.catch { (myError) in
                 let customError = myError as? OOAppError
                 self.showError(title: (customError?.failureReason)!)

+ 1 - 1
o2ios/O2Platform/App/Work-工作/c/TodoTaskViewController.swift

@@ -324,7 +324,7 @@ class TodoTaskViewController: UITableViewController {
     
     //加载下一页数据
     func loadDataNextByURL() {
-        DDLogDebug("下一页数据   loadDataNextByURL")
+        
         let tv = self.tableView as! ZLBaseTableView
         tv.emptyTitle = self.emptyTexts[AppConfigSettings.shared.taskIndex]
         let todoTask = self.models.last?.sourceObj!

+ 9 - 6
o2ios/O2Platform/App/Work-工作/c/TodoedTaskViewController.swift

@@ -33,7 +33,11 @@ class TodoedTaskViewController: UITableViewController {
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = self.todoTask?.title
+        var t = self.todoTask?.title
+        if t == nil || t?.isEmpty == true {
+            t = self.todoTask?.processName ?? ""
+        }
+        title = t
         self.loadTodoedData()
     }
     
@@ -68,14 +72,14 @@ class TodoedTaskViewController: UITableViewController {
         if actionArray != nil {
         for action  in actionArray! {
             if completed {
-                let title = "\(action["title"].stringValue)于\(action["completedTime"].stringValue) 已完成"
+                let title = "[\(action["title"].stringValue)]完成于\(action["completedTime"].stringValue)"
                 let id = action["id"].stringValue
                 let workType = "workCompletedList"
                 let actionModel = TodoedActionModel(destText: title, workType: workType, workId: id)
                 self.todoedActions.append(actionModel)
             }else{
 //                %@于%@ 停留在%@",item[@"title"],item[@"updateTime"],item[@"activityName"]
-                let title = "\(action["title"].stringValue)于\(action["updateTime"].stringValue) 停留在\(action["activityName"].stringValue)"
+                let title = "[\(action["title"].stringValue)]当前在\(action["activityName"].stringValue)"
                 let id = action["id"].stringValue
                 let workType = "workList"
                 let actionModel = TodoedActionModel(destText: title, workType: workType, workId: id)
@@ -92,7 +96,7 @@ class TodoedTaskViewController: UITableViewController {
             if task.fromActivityType == "begin" {
                 continue
             }
-            let activity = task.arrivedActivityName == nil ? task.fromActivityName:task.arrivedActivityName
+            let activity = task.arrivedActivityName == nil ? task.fromActivityName : "\(task.fromActivityName ?? "") -> \(task.arrivedActivityName ?? "")"
             var identity = ""
             if (task.taskCompletedList ==  nil || task.taskCompletedList!.count == 0) {
                 if (task.taskList!.count > 0 ) {
@@ -103,8 +107,7 @@ class TodoedTaskViewController: UITableViewController {
             }else{
                 identity = (task.taskCompletedList![0] as! NSDictionary)["identity"]! as! String;
             }
-            let status = task.routeName == nil ? "当前节点":task.routeName
-//            text22 = task.arrivedTime == nil ? task.fromTime : task.arrivedTime;
+            let status = task.routeName == nil ? "正在处理":"【\(task.routeName ?? "")】"
             let time = task.arrivedTime == nil ? task.fromTime : task.arrivedTime
             identity = identity.components(separatedBy: "@").first ?? ""
             let statusModel = TodoedStatusModel(activity: activity, identity: identity, status: status, statusTime: time)

+ 9 - 9
o2ios/O2Platform/App/Work-工作/task.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Yna-g7-LKp">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Yna-g7-LKp">
     <device id="retina5_5" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
@@ -336,10 +336,10 @@
                                                 <constraint firstAttribute="width" constant="16" id="0v3-hp-qId"/>
                                             </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="ZKr-jv-hUf">
-                                            <rect key="frame" x="59" y="25.000000000000004" width="107" height="15.666666666666668"/>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="申请人 -&gt; 核稿" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZKr-jv-hUf">
+                                            <rect key="frame" x="59" y="25.000000000000004" width="196" height="15.666666666666668"/>
                                             <constraints>
-                                                <constraint firstAttribute="width" constant="107" id="0av-YQ-zfd"/>
+                                                <constraint firstAttribute="width" constant="196" id="0av-YQ-zfd"/>
                                             </constraints>
                                             <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
                                             <color key="textColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -352,13 +352,13 @@
                                             <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="1sJ-rz-ZFy">
-                                            <rect key="frame" x="174" y="26.000000000000004" width="220" height="15.666666666666668"/>
+                                            <rect key="frame" x="263" y="26.000000000000004" width="131" height="15.666666666666668"/>
                                             <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
                                             <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
                                             <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="zrc-o6-jGO">
-                                            <rect key="frame" x="99" y="51" width="161" height="21"/>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="【送核稿】" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zrc-o6-jGO">
+                                            <rect key="frame" x="59" y="51" width="161" height="21"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="21" id="ddj-1s-uER"/>
                                                 <constraint firstAttribute="width" constant="161" id="iCD-8x-Mpe"/>
@@ -369,7 +369,6 @@
                                         </label>
                                     </subviews>
                                     <constraints>
-                                        <constraint firstItem="1sJ-rz-ZFy" firstAttribute="leading" secondItem="zrc-o6-jGO" secondAttribute="leading" constant="75" id="0Vm-Ud-9rI"/>
                                         <constraint firstItem="1sJ-rz-ZFy" firstAttribute="trailing" secondItem="FMH-Ke-HJw" secondAttribute="trailingMargin" id="1GM-sD-cLK"/>
                                         <constraint firstItem="3Ey-5T-s87" firstAttribute="top" secondItem="FMH-Ke-HJw" secondAttribute="topMargin" constant="14" id="AK1-r8-HqO"/>
                                         <constraint firstAttribute="bottomMargin" secondItem="zrc-o6-jGO" secondAttribute="bottom" constant="17" id="AwQ-o8-1Zc"/>
@@ -387,6 +386,7 @@
                                         <constraint firstItem="cyz-8F-h4h" firstAttribute="leading" secondItem="zrc-o6-jGO" secondAttribute="trailing" constant="32" id="jff-ld-CUs"/>
                                         <constraint firstAttribute="bottomMargin" secondItem="ZKr-jv-hUf" secondAttribute="bottom" constant="48.5" id="mkv-jE-3PC"/>
                                         <constraint firstItem="3Ey-5T-s87" firstAttribute="top" secondItem="ZKr-jv-hUf" secondAttribute="top" id="n7P-R7-wjy"/>
+                                        <constraint firstItem="zrc-o6-jGO" firstAttribute="leading" secondItem="ZKr-jv-hUf" secondAttribute="leading" id="tao-3Q-I1s"/>
                                         <constraint firstItem="0rT-J1-BMA" firstAttribute="top" secondItem="FMH-Ke-HJw" secondAttribute="top" id="u6Z-ov-7cF"/>
                                         <constraint firstItem="3Ey-5T-s87" firstAttribute="leading" secondItem="FMH-Ke-HJw" secondAttribute="leadingMargin" constant="9" id="z0H-ba-Zj0"/>
                                     </constraints>
@@ -661,7 +661,7 @@
         </scene>
     </scenes>
     <inferredMetricsTieBreakers>
-        <segue reference="QJV-sf-Oi5"/>
+        <segue reference="9TQ-Eb-h06"/>
     </inferredMetricsTieBreakers>
     <resources>
         <image name="icon_daiban" width="38" height="38"/>

+ 17 - 13
o2ios/O2Platform/App/meeting-会议/Controller/OOMeetingInforController.swift

@@ -78,19 +78,21 @@ class OOMeetingInforController: UIViewController {
 
     func loadData() {
         self.showLoading()
-        all(viewModel.getMeetingsByYearAndMonth(Date()), viewModel.getMeetingByTheDay(Date())).then { (result) in
+        all(viewModel.getMeetingsByYearAndMonth(Date()), viewModel.getMeetingByTheDay(Date()))
+            .always {
+                self.hideLoading()
+                if self.tableView.mj_header.isRefreshing() {
+                    self.tableView.mj_header.endRefreshing()
+                }
+                //self.tableView.reloadData()
+            }
+        .then { (result) in
             DispatchQueue.main.async {
                 self.headerView.eventsByDate = result.0 as? [String: [OOMeetingInfo]]
                 self.viewModel.theMeetingsByDay.removeAll()
                 self.viewModel.theMeetingsByDay.append(contentsOf: result.1)
                 self.tableView.reloadData()
             }
-        }.always {
-            self.hideLoading()
-            if self.tableView.mj_header.isRefreshing() {
-                self.tableView.mj_header.endRefreshing()
-            }
-            //self.tableView.reloadData()
         }.catch { (myerror) in
             let customError = myerror as! OOAppError
             self.showError(title: customError.failureReason ?? "")
@@ -100,10 +102,12 @@ class OOMeetingInforController: UIViewController {
 
     func loadCurrentMonthCalendar(_ theDate: Date?) {
         self.showLoading()
-        viewModel.getMeetingsByYearAndMonth(theDate ?? Date()).then { (resultDict) in
+        viewModel.getMeetingsByYearAndMonth(theDate ?? Date())
+            .always {
+                self.hideLoading()
+            }
+        .then { (resultDict) in
             self.headerView.eventsByDate = resultDict as? [String: [OOMeetingInfo]]
-        }.always {
-            self.hideLoading()
         }.catch { (myerror) in
             let customError = myerror as! OOAppError
             self.showError(title:  customError.failureReason ?? "")
@@ -112,12 +116,12 @@ class OOMeetingInforController: UIViewController {
 
     func loadtheDayMeetingInfo(_ theDate: Date?) {
         self.showLoading()
-        viewModel.getMeetingByTheDay(theDate ?? Date()).then { (infos) in
+        viewModel.getMeetingByTheDay(theDate ?? Date()).always {
+            self.hideLoading()
+        }.then { (infos) in
             self.viewModel.theMeetingsByDay.removeAll()
             self.viewModel.theMeetingsByDay.append(contentsOf: infos)
             self.tableView.reloadData()
-        }.always {
-            self.hideLoading()
         }.catch { (myerror) in
             let customError = myerror as! OOAppError
             self.showError(title:  customError.failureReason ?? "")