notice-details.html 14 KB

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