task-details.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <ion-view view-title="任务详情" hide-back-button="true">
  2. <ion-nav-buttons side="left">
  3. <button class="button ion-chevron-left button-clear button-dark" ng-click="goBack()">&nbsp;返回</button>
  4. </ion-nav-buttons>
  5. <ion-nav-buttons side="right">
  6. <button class="button button-clear" ng-click="setTask()" ng-if="!task.is_completed">
  7. <i class="icon" ng-class="{true:'ion-ios-gear-outline',false:'ion-person-add'}[Isheader]"></i>
  8. </button>
  9. </ion-nav-buttons>
  10. <ion-content ng-init="init()" set-class-when-at-top="fix-to-top">
  11. <div class="top-mark" ng-if="task.is_completed">
  12. <div class="title">
  13. <label><i class="ion-ios-checkmark-outline"></i></label>
  14. <label>已完成</label>
  15. </div>
  16. </div>
  17. <div ng-if="loading" class="center init-load action-sheet-backdrop">
  18. <ion-spinner icon="android"></ion-spinner>
  19. </div>
  20. <div ng-if="!loading">
  21. <ion-item class="task-header item-avatar item-icon-right ">
  22. <img ng-src="../../../img/panda.png">
  23. <h2>{{task.create_user.username}}</h2>
  24. <p>{{task.create_user.dept}} {{task.create_user.degree}}</p>
  25. <label class="datetime">{{task.create_date | date:"y-MM-dd HH:mm" }}</label>
  26. </ion-item>
  27. <ion-item class="task-details item-icon-right item-text-wrap">
  28. <h2 ng-bind-html="task.content | SwitchHtmlContent"></h2>
  29. <p ng-if="task.task_members.length>0">负责人:
  30. <label>{{task.leader.username}}</label>
  31. </p>
  32. <p ng-if="task.task_members.length-1>0">任务成员:
  33. <label>{{task.membernames}}</label>
  34. </p>
  35. <p ng-if="task.end_dd!=null">截止日期:
  36. <label ng-class="{true:'colorred',false:''}[task.pastdate]">{{task.end_dd | date:"y-MM-dd"}}</label>
  37. </p>
  38. <div>
  39. <image-popover all-images="task.task_files"></image-popover>
  40. </div>
  41. </ion-item>
  42. <ul class="list">
  43. <li class="item item-checkbox" ng-repeat="childtask in childtasks">
  44. <label class="checkbox taskcontent-checkbox">
  45. <input ng-change="changecheck(childtask);" ng-model="childtask.is_completed" type="checkbox" class="ng-pristine ng-untouched ng-valid ng-not-empty">
  46. </label>
  47. <label ng-click="toeditchildtask(childtask.id)">
  48. <span class="item-text-wrap">{{childtask.content | SwitchHtmlContent}}
  49. <label ng-if="childtask.leader!=null||childtask.end_dd!=null">{{childtask.leader.username}}
  50. <label ng-if="childtask.end_dd!=null" ng-class="{true:'colorred',false:''}[childtask.pastdate]">
  51. {{childtask.end_dd | date:"y年MM月dd日"}}
  52. </label>
  53. </label>
  54. </span>
  55. </label>
  56. </li>
  57. </ul>
  58. <div class="task-button-div" id="nav-comment">
  59. <div class="comment-div" ng-click="change(0)" ng-class="{true:'',false:'colorgray'}[activeIndex==0]">评论({{taskcomments.length}})
  60. <label>|</label>
  61. <hr ng-if="activeIndex==0">
  62. </div>
  63. <div class="history-div" ng-click="change(1)" ng-class="{true:'',false:'colorgray'}[activeIndex==1]">历史动态
  64. <hr ng-if="activeIndex==1">
  65. </div>
  66. </div>
  67. <div>
  68. <ion-slide-box class="slide-task" show-pager="false" ng-init="lockSlide()" active-slide="activeIndex">
  69. <ion-slide>
  70. <ion-list class="daily">
  71. <div class="center comment-empty" ng-if="taskcomments.length==0">还没有人进行评论哦!</div>
  72. <div ng-repeat="comment in taskcomments">
  73. <a class="item item-avatar item-text-wrap" ng-click="deletecomment(comment,$index)">
  74. <img ng-src="../../../img/panda.png" ng-click="showcardinfo(conmmentitem.create_user.id)">
  75. <div>
  76. <span>{{comment.create_user.username}}</span>
  77. <p class="comment-content" ng-bind-html="comment.content | SwitchHtmlContent">
  78. </p>
  79. <p class="time">{{comment.create_date | getDateDiff}}</p>
  80. </div>
  81. <div class="comment-imgs">
  82. <image-popover all-images="comment.task_comment_files"></image-popover>
  83. </div>
  84. </a>
  85. </div>
  86. <ion-infinite-scroll spinner="android" ng-if="nexturl.comment!=null" on-infinite="loadMore('comment')" distance="1%" immediate-check="false">
  87. </ion-infinite-scroll>
  88. <h4 class="stable center" ng-show="taskcomments.length>=10&&nexturl.comment== null">没有更多了</h4>
  89. <div class='obligate-item'></div>
  90. </ion-list>
  91. </ion-slide>
  92. <ion-slide>
  93. <ion-list class="daily">
  94. <div ng-repeat="history in taskhistory">
  95. <div class="item item-avatar item-text-wrap">
  96. <img ng-src="../../../img/panda.png" ng-click="showcardinfo(conmmentitem.create_user.id)">
  97. <!--<div>-->
  98. <span>{{history.create_user.username}}</span>
  99. <p ng-bind-html="history.content | SwitchHtmlContent"></p>
  100. <p class="time">{{history.create_date | date:"y-MM-dd HH:mm" }}</p>
  101. <!--</div>-->
  102. </div>
  103. </div>
  104. <ion-infinite-scroll spinner="android" ng-if="nexturl.history!=null" on-infinite="loadMore('history')" distance="1%" immediate-check="false">
  105. </ion-infinite-scroll>
  106. <h4 class="stable center" ng-show="taskhistory.length>=10&&nexturl.history== null">没有更多了</h4>
  107. <div class='obligate-item'></div>
  108. </ion-list>
  109. </ion-slide>
  110. </ion-slide-box>
  111. </div>
  112. </div>
  113. </ion-content>
  114. <div class="tabs tabs-icon-left footer-task" ng-if="!loading">
  115. <a class="tab-item" ng-click="tocomment()">
  116. <i class="icon ion-ios-chatbubble" style="font-size:25px;"></i> 评论
  117. </a>
  118. <a class="tab-item" ng-click="toaddchildtask()" ng-if="!task.is_completed">
  119. <i class="icon ion-plus"></i> 添加子任务
  120. </a>
  121. <a class="tab-item" ng-click="marktask(1);" ng-disabled="is_disabledmark" ng-if="!task.is_completed">
  122. <i class="icon ion-checkmark" style="font-size:30px;"></i> 完成任务
  123. </a>
  124. <a class="tab-item" ng-click="marktask(0);" ng-disabled="is_disabledmark" ng-if="task.is_completed">
  125. <i class="icon ion-reply" style="font-size:30px;"></i> 改为未完成
  126. </a>
  127. </div>
  128. <div ng-show="commons.bigImage" class="popover-backdrop1">
  129. <img class="fullscreen-image" ng-click="hideBigImage()" ng-src="{{Url}}" ng-pinch-zoom/>
  130. </div>
  131. </ion-view>