notice-details.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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 ng-if="isAdmin" class="button button-icon ion-ios-more" ng-click="popover.show($event)"></button>
  7. </ion-nav-buttons>
  8. <ion-content>
  9. <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher>
  10. <div ng-if="loading" class="center init-load action-sheet-backdrop">
  11. <ion-spinner icon="android"></ion-spinner>
  12. </div>
  13. <div class="item border-style item-text-wrap" ng-if="!loading" style="margin:-1px 0;">
  14. <h1>{{details.title}}</h1>
  15. <p>{{details.user__username}}
  16. <span ng-if="details.update_dd != details.create_dd">&nbsp;修改于</span> &nbsp;{{details.update_dd == null ? details.create_dd : details.update_dd | date:'MM月dd日 HH:mm'}}
  17. <a class="float-right" ng-click="isScopeShow = !isScopeShow">{{isScopeShow ? '隐藏详情' : '显示详情'}}</a>
  18. </p>
  19. <p ng-show="isScopeShow">范围:
  20. <span ng-if="details.allid == 1">全体成员</span>
  21. <span ng-if="details.groupid != null"></span>
  22. <span ng-if="details.readusrs.length != 0">
  23. <span ng-repeat="item in details.readusrs">{{item.user__username}}{{$last ? '' : '、'}}</span>
  24. </span>
  25. </p>
  26. <br/>
  27. <span ng-bind-html="details.content | SwitchHtmlContent"></span>
  28. <br/>
  29. <image-popover all-images="details.noticefiles"></image-popover>
  30. <br/>
  31. <!--投票-->
  32. <div ng-if="details.vote_title != null">
  33. <p>需要投票来完成</p>
  34. <div class="item item-body">
  35. <span>{{details.vote_title}}{{details.vote_selecttype == 1 ? '(单选)' : '(多选)'}}</span>
  36. <!--未过期单选-->
  37. <ion-list ng-if="details.vote_selecttype == 0 && details.vote_enddd >= datetime">
  38. <br/>
  39. <!--未选-->
  40. <ion-checkbox ng-if="record.vote_selectindex == null && record.vote_giveup == null" ng-repeat="selectitem in selectData track by $index" class="notice-details-voteitem" ng-click="changeIndex($index)" ng-model="selectIndexArr" ng-value="selectitem">
  41. {{selectitem}}
  42. </ion-checkbox>
  43. <!--已选-->
  44. <div ng-if="record.vote_selectindex != null || record.vote_giveup != null" ng-click="result()" class="item item-icon-left item-icon-right notice-details-voteitem">
  45. <i ng-if="record.vote_selectindex != null || record.vote_giveup == 1" class="icon ion-checkmark-circled energized"></i>
  46. <span ng-if="record.vote_selectindex != null">投票成功</span>
  47. <span ng-if="record.vote_giveup == 1">放弃投票</span>
  48. <div ng-repeat="item in usr_select_index">
  49. <p>{{selectData[item]}}</p>
  50. </div>
  51. <i class="icon ion-chevron-right icon-accessory"></i>
  52. </div>
  53. <br/>
  54. </ion-list>
  55. <!--未过期多选-->
  56. <ion-list ng-if="details.vote_selecttype == 1 && details.vote_enddd >= datetime">
  57. <br/>
  58. <!--未选-->
  59. <ion-radio ng-if="record.vote_selectindex == null && record.vote_giveup == null" ng-repeat="selectitem in selectData track by $index" class="notice-details-voteitem" ng-click="changeIndex($index)" ng-model="selectIndex" ng-value="selectitem">
  60. {{selectitem}}
  61. </ion-radio>
  62. <!--已选-->
  63. <div ng-if="record.vote_selectindex != null || record.vote_giveup != null" ng-click="result()" class="item item-icon-left item-icon-right notice-details-voteitem">
  64. <i ng-if="record.vote_selectindex != null || record.vote_giveup == 1" class="icon ion-checkmark-circled energized"></i>
  65. <span ng-if="record.vote_selectindex != null">投票成功</span>
  66. <span ng-if="record.vote_giveup == 1">放弃投票</span>
  67. <div ng-repeat="item in usr_select_index">
  68. <p>{{selectData[item]}}</p>
  69. </div>
  70. <i class="icon ion-chevron-right icon-accessory"></i>
  71. </div>
  72. <br/>
  73. </ion-list>
  74. <!--已过期-->
  75. <ion-list ng-if="details.vote_enddd < datetime">
  76. <br/>
  77. <div class="item item-icon-left item-icon-right notice-details-voteitem" ng-click="result()">
  78. <!--未选-->
  79. <i ng-if="record.vote_selectindex == null && record.vote_giveup == null" class="icon ion-close-circled assertive"></i>
  80. <span ng-if="record.vote_selectindex == null && record.vote_giveup == null">已过期</span>
  81. <!--已选-->
  82. <i ng-if="record.vote_selectindex != null || record.vote_giveup == 1" class="icon ion-checkmark-circled energized"></i>
  83. <span ng-if="record.vote_selectindex != null">投票成功</span>
  84. <span ng-if="record.vote_giveup == 1">放弃投票</span>
  85. <div ng-repeat="item in usr_select_index">
  86. <p>{{selectData[item]}}</p>
  87. </div>
  88. <i class="icon ion-chevron-right icon-accessory"></i>
  89. </div>
  90. <br/>
  91. </ion-list>
  92. <button ng-show="record.vote_selectindex == null && record.vote_giveup == null && details.vote_enddd >= datetime" class="button button-outline button-energized notice-details-button" ng-click="postVote()">确定投票</button>
  93. <button ng-show="record.vote_selectindex == null && record.vote_giveup == null && details.vote_enddd >= datetime" class="button button-clear button-light float-right notice-details-giveupbutton" ng-click="giveUp(0)">放弃投票?</button>
  94. </div>
  95. </div>
  96. <br/>
  97. <!--反馈-->
  98. <div ng-if="details.back_title != null">
  99. <p>需要反馈来完成</p>
  100. <div class="item item-body">
  101. <span>{{details.back_title}}</span>
  102. <ion-list>
  103. <!--未过期未填-->
  104. <hr ng-if="details.back_enddd >= datetime && record.back_content == null && record.back_giveup == null" class="notice-details-hr"/>
  105. <!--未过期已填-->
  106. <br ng-if="details.back_enddd >= datetime && (record.back_content != null || record.back_giveup == 1)"/>
  107. <div ng-if="details.back_enddd >= datetime && (record.back_content != null || record.back_giveup == 1)" class="item item-icon-left notice-details-voteitem">
  108. <i ng-if="record.back_content != null || record.back_giveup == 1" class="icon ion-checkmark-circled energized"></i>
  109. <span ng-if="record.back_content != null">反馈成功</span>
  110. <span ng-if="record.back_giveup == 1">放弃反馈</span>
  111. <p ng-if="record.back_content != null">反馈内容:&nbsp;{{record.back_content}}</p>
  112. </div>
  113. <br ng-if="details.back_enddd >= datetime && (record.back_content != null || record.back_giveup == 1)"/>
  114. <!--已过期-->
  115. <br ng-if="details.back_enddd < datetime"/>
  116. <div ng-if="details.back_enddd < datetime" class="item item-icon-left notice-details-voteitem">
  117. <!--未填-->
  118. <i ng-if="record.back_content == null && record.back_giveup == null" class="icon ion-close-circled assertive"></i>
  119. <span ng-if="record.back_content == null && record.back_giveup == null">已过期</span>
  120. <!--已填-->
  121. <i ng-if="record.back_content != null || record.back_giveup == 1" class="icon ion-checkmark-circled energized"></i>
  122. <span ng-if="record.back_content != null">反馈成功</span>
  123. <span ng-if="record.back_giveup == 1">放弃反馈</span>
  124. <p ng-if="record.back_content != null">反馈内容:&nbsp;{{record.back_content}}</p>
  125. </div>
  126. <br ng-if="details.back_enddd < datetime"/>
  127. <!--未过期未填-->
  128. <button ng-show="record.back_content == null && record.back_giveup == null && details.back_enddd >= datetime" class="button button-outline button-energized notice-details-button" ng-click="showbackpopup()">反馈</button>
  129. <button ng-show="record.back_content == null && record.back_giveup == null && details.back_enddd >= datetime" class="button button-clear button-light float-right notice-details-giveupbutton" ng-click="giveUp(1)">放弃反馈?</button>
  130. </ion-list>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="task-button-div" id="nav-comment" ng-if="!loading">
  135. <div class="comment-div" ng-click="change(0)" ng-class="{'colorgray':!(activeIndex == 0)}">评论&nbsp;{{commentData.length == 0 ? '0' : commentData.length}}
  136. <label>|</label>
  137. <hr ng-show="activeIndex==0">
  138. </div>
  139. <div class="comment-div" ng-click="change(1)" ng-class="{'colorgray':!(activeIndex == 1)}">看过&nbsp;{{readData.length == 0 ? '0' : readData.length}}
  140. <label>|</label>
  141. <hr ng-show="activeIndex==1">
  142. </div>
  143. <div ng-click="change(2)" ng-class="{'colorgray':!(activeIndex == 2)}">未看&nbsp;{{unreadData.length == 0 ? '0' : unreadData.length}}
  144. <hr ng-show="activeIndex==2">
  145. </div>
  146. </div>
  147. <ion-slide-box class="slide-task" show-pager="false" ng-init="lockSlide()" active-slide="activeIndex" ng-if="!loading">
  148. <ion-slide>
  149. <ion-list class="daily">
  150. <div class="item center notice-details-voteitem" ng-if="commentData.length == 0">还没有人进行评论哦</div>
  151. <a class="item item-avatar item-text-wrap" ng-repeat="comment in commentData" ng-click="popupMessageOpthins(comment.id,comment.user_id)">
  152. <img ng-src="../../../img/panda.png" ng-click="showcardinfo(comment.user_id)">
  153. <div>
  154. <span>{{comment.user__username}}</span>
  155. <p>{{comment.content}}</p>
  156. <p class="time">{{comment.create_dd | getDateDiff}}</p>
  157. </div>
  158. </a>
  159. </ion-list>
  160. <div class='obligate-item' ng-if="!loading"></div>
  161. </ion-slide>
  162. <ion-slide>
  163. <ion-list>
  164. <div class="item item-avatar" ng-repeat="read in readData">
  165. <img ng-src="../../../img/panda.png" ng-click="showcardinfo({{read.user_id}})">
  166. <div>
  167. <span>{{read.user__username}}</span>
  168. <p>{{read.user__usr__degree}}</p>
  169. </div>
  170. </div>
  171. </ion-list>
  172. <div class='obligate-item' ng-if="!loading"></div>
  173. </ion-slide>
  174. <ion-slide>
  175. <!--<button ng-if="unreadData.lenght != 0" class="button button-outline button-energized notice-details-warn">提醒未看成员</button>-->
  176. <ion-list>
  177. <div class="item item-avatar" ng-repeat="unread in unreadData">
  178. <img ng-src="../../../img/panda.png" ng-click="showcardinfo({{unread.user_id}})">
  179. <div>
  180. <span>{{unread.user__username}}</span>
  181. <p>{{unread.user__usr__degree}}</p>
  182. </div>
  183. </div>
  184. </ion-list>
  185. <div class='obligate-item' ng-if="!loading"></div>
  186. </ion-slide>
  187. </ion-slide-box>
  188. </ion-content>
  189. <ion-footer-bar keyboard-attach class="bar-stable" ng-if="!loading">
  190. <div class="bar bar-footer item-input-inset">
  191. <!--<button ng-click="addhappy()" class="button button-clear">
  192. <i class="icon ion-android-happy clear"></i>
  193. </button>-->
  194. <label class="item-input-wrapper radius-30">
  195. <input type="text" ng-model="data.content" placeholder="添加评论">
  196. </label>
  197. <button class="button button-positive" ng-disabled="data.content == '' || data.content == null" ng-click="sendComment()">发送</button>
  198. </div>
  199. </ion-footer-bar>
  200. <script id="templates/detiilsmenu.html" type="text/ng-template">
  201. <ion-popover-view class="details-popup">
  202. <ion-content>
  203. <ion-list>
  204. <ion-item class="item item-button" type="item-text-wrap" ng-click="result()">统计结果</ion-item>
  205. <ion-item class="item item-button" type="item-text-wrap" ng-click="edit()">编辑</ion-item>
  206. <ion-item class="item item-button" type="item-text-wrap" ng-click="deleteNotice()">删除</ion-item>
  207. </ion-list>
  208. </ion-content>
  209. </ion-popover-view>
  210. </script>
  211. </ion-view>