message_edit.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <style>
  2. body{
  3. font-family: "Microsoft Yahei", "微软雅黑";
  4. box-sizing: border-box;
  5. }
  6. .clearfix {
  7. clear: both;
  8. }
  9. .content-header{
  10. padding-left: 22px;
  11. }
  12. .content .box-show{
  13. position: relative;
  14. margin-top: 4px;
  15. padding-left: 22px;
  16. border-radius: 3px;
  17. background: #ffffff;
  18. margin-bottom: 20px;
  19. width: 100%;
  20. height: 700px;
  21. border: 1px solid #dcdcdc;
  22. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  23. }
  24. .content-setting{
  25. margin-top: 24px;
  26. }
  27. .content-setting .form-group{
  28. margin-bottom: 14px;
  29. height: 30px;
  30. line-height: 30px;
  31. }
  32. .content-setting .form-group label{
  33. margin: 0 22px 0 14px;
  34. font-family: 'SimHei'!important;
  35. width: 60px;
  36. font-size: 14px;
  37. font-weight: normal;
  38. color: #8da8b8;
  39. }
  40. .content-setting .form-group input[type=text]{
  41. margin-right: 15px;
  42. width: 780px;
  43. height: 30px;
  44. font-size: 14px;
  45. color: #323232;
  46. border-radius: 0;
  47. }
  48. .content-setting .form-group input[type=checkbox]{
  49. margin:0 5px 0 15px;
  50. font-size: 14px;
  51. color: #323232;
  52. }
  53. .content-setting .edit {
  54. position: relative;
  55. width: 780px;
  56. height: 30px;
  57. }
  58. .content-setting .edit div.choose{
  59. position: absolute;
  60. top: 4px;
  61. left: 10px;
  62. width: 110px;
  63. height: 22px;
  64. line-height: 22px;
  65. text-align: center;
  66. background: #3c8dbc;
  67. border-radius: 30px;
  68. cursor: pointer;
  69. }
  70. .content-setting .edit div.choose span{
  71. margin-right: 10px;
  72. font-family: 'SimHei'!important;
  73. font-size: 12px;
  74. color: #fff;
  75. }
  76. .content-setting .edit div.choose i{
  77. font-size: 16px;
  78. color: #fff;
  79. }
  80. .introduce {
  81. width: 780px;
  82. height: 380px;
  83. }
  84. .introduce .intro-header {
  85. /*position: relative;*/
  86. width: 100%;
  87. height: 54px;
  88. line-height: 54px;
  89. background: -webkit-linear-gradient(top, #fff 0%,#dadada 100%);
  90. background: -o-linear-gradient(top, #fff 0%,#dadada 100%);
  91. background: -ms-linear-gradient(top, #fff 0%,#dadada 100%);
  92. background: linear-gradient(to bottom, #fff 0%,#dadada 100%);
  93. border: 1px solid #ccc;
  94. border-bottom: none;
  95. }
  96. .introduce .intro-header span{
  97. font-size: 16px;
  98. color: #323232;
  99. }
  100. .introduce .intro-header span img{
  101. margin-left: 30px;
  102. }
  103. .introduce .intro-header span em{
  104. margin-left: 8px;
  105. font-size: 16px;
  106. color: #323232;
  107. font-style: normal;
  108. }
  109. .introduce .intro-header span input{
  110. position: absolute;
  111. top: 119px;
  112. left: 338px;
  113. width: 65px;
  114. outline: none;
  115. opacity: 0;
  116. }
  117. .introduce textarea{
  118. width: 780px;
  119. height: 325px;
  120. border-radius: 0;
  121. }
  122. .introduce .button{
  123. margin-top: 30px;
  124. }
  125. .introduce .button a{
  126. display: inline-block ;
  127. width: 140px;
  128. height: 34px;
  129. line-height: 34px;
  130. text-align: center;
  131. font-size: 16px;
  132. font-family: 'SimHei'!important;
  133. border-radius: 3px;
  134. }
  135. .introduce .button a:first-child {
  136. margin-right: 26px;
  137. color: #fff;
  138. background: #3c8dbc;
  139. }
  140. .introduce .button a:last-child {
  141. color: #787878;
  142. background: #fff;
  143. border: 1px solid #dcdcdc;
  144. }
  145. /*定时发送弹出框*/
  146. .modal-open .modal {
  147. width: 100%;
  148. height: 100%;
  149. }
  150. .modal-open .modal .modal-dialog.timing{
  151. width: 450px;
  152. height: 180px;
  153. }
  154. .setting{
  155. margin: 0 auto;
  156. width: 450px;
  157. height: 180px;
  158. text-align: center;
  159. }
  160. .setting .header{
  161. padding: 0 20px;
  162. width: 100%;
  163. height: 44px;
  164. line-height: 44px;
  165. background: #eeeeee;
  166. }
  167. .setting .header p{
  168. font-size: 16px;
  169. color: #323232;
  170. }
  171. .setting .header .close{
  172. font-size: 38px;
  173. }
  174. .setting .body{
  175. width: 100%;
  176. height: 80px;
  177. padding: 0 20px;
  178. text-align: left;
  179. }
  180. .setting .body .form-group{
  181. padding-top: 20px;
  182. height: 30px;
  183. line-height: 30px;
  184. }
  185. .setting .body .form-group label{
  186. margin-right: 22px;
  187. font-family: 'SimHei'!important;
  188. font-size: 14px;
  189. font-weight: normal;
  190. color: #8da8b8;
  191. }
  192. .setting .body .form-group input{
  193. width: 200px;
  194. height: 30px;
  195. border-radius: 0;
  196. }
  197. .setting .footer{
  198. padding-top: 10px;
  199. width: 100%;
  200. height: 50px;
  201. background: #f4f4f4;
  202. }
  203. .setting .footer a{
  204. display: inline-block;
  205. height: 30px;
  206. line-height: 30px;
  207. font-size: 16px;
  208. text-align: center;
  209. border-radius: 3px;
  210. letter-spacing: 10px;
  211. }
  212. .setting .footer a:first-child{
  213. margin-right: 10px;
  214. width: 120px;
  215. color: #fff;
  216. background: #3c8dbc;
  217. }
  218. .setting .footer a:last-child{
  219. width: 80px;
  220. color: #959595;
  221. background: #fff;
  222. border: 1px solid #dcdcdc;
  223. }
  224. /* 富文本编辑器input大小控制 */
  225. div.fl.introduce input{
  226. width: 80%;
  227. }
  228. /* 已选择展示样式 */
  229. span.selected-item {
  230. display: inline-block;
  231. margin-right: 18px;
  232. margin-bottom: 5px;
  233. padding: 0 14px;
  234. height: 30px;
  235. line-height: 30px;
  236. font-size: 14px;
  237. color: #323232;
  238. background: #ebf1f4;
  239. border-radius: 3px;
  240. }
  241. </style>
  242. <div class="wrapper">
  243. <!--主体内容-->
  244. <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
  245. <section class="content-header clearfix">
  246. <h1>编辑消息</h1>
  247. </section>
  248. <!-- Main content -->
  249. <section class="content">
  250. <form name="messageForm">
  251. <div class="box-show">
  252. <div class="content-setting">
  253. <div class="form-group clearfix">
  254. <label class="control-label fl">接收对象</label>
  255. <div class="edit fl">
  256. <select class="form-control input-sm jp-width120" ng-model="message.type">
  257. <option value="角色类型">角色类型</option>
  258. <option value="机构对象">机构对象</option>
  259. <option value="指定用户">指定用户</option>
  260. <option value="所有用户">所有用户</option>
  261. </select>
  262. </div>
  263. <!--<div class="edit fl">-->
  264. <!--<input style="cursor: pointer;" type="text" class="form-control" id="chooseReceiver" ng-click="selectReceiver()" placeholder="点击选择接受对象" readonly/>-->
  265. <!--<div ng-if="message.receiver" class="choose"><span ng-click="selectReceiver()" ng-bind="message.receiver" title="重新选择"></span><i class="fa fa-close" ng-click="deleteReceiver()" title="删除"></i></div>-->
  266. <!--</div>-->
  267. </div>
  268. <!-- 按角色类型时 -->
  269. <div ng-if="message.type == '角色类型'" class="form-group clearfix">
  270. <label class="control-label fl">请选择</label>
  271. <span ng-repeat="temp in types track by $index">
  272. <input type="checkbox" ng-checked="temp.checked" ng-click="checkType(temp)"><span ng-bind="temp.type"></span>
  273. </span>
  274. <span class="error" ng-show="submited && noChoose">*请选择发送对象</span>
  275. </div>
  276. <!-- 非所有用户及按类型时 -->
  277. <div ng-if="message.type != '角色类型' && message.type != '所有用户'" class="form-group clearfix">
  278. <label class="control-label fl">&nbsp;</label>
  279. <span style="cursor: pointer; color: #5078cb;" ng-click="selectReceiver(message.type)"><i class="fa fa-plus-square"></i>选择接收对象</span>
  280. </div>
  281. <!-- 机构对象已选择 -->
  282. <div ng-if="message.type == '机构对象' && orgs.length > 0" class="form-group clearfix" style="height:auto!important;">
  283. <label class="control-label fl">已选择</label>
  284. <span ng-repeat="org in orgs | limitTo: 20" class="selected-item">
  285. <span ng-bind="org.name"></span>
  286. </span>
  287. <span ng-if="orgs.length > 20">...</span>
  288. </div>
  289. <!-- 指定用户已选择 -->
  290. <div ng-if="message.type == '指定用户' && users.length > 0" class="form-group clearfix" style="height:auto!important;">
  291. <label class="control-label fl">已选择</label>
  292. <span ng-repeat="user in users | limitTo: 20" class="selected-item">
  293. <span ng-bind="user.name"></span>
  294. </span>
  295. <span ng-if="orgs.length > 20">...</span>
  296. </div>
  297. <div class="form-group clearfix">
  298. <label class="control-label fl">主题</label>
  299. <input type="text" ng-model="message.title" maxlength="100" class="form-control fl" placeholder="请填写消息主题" required
  300. ng-class="{'showEmpty' : submited && !message.title}"/>
  301. <span class="error" ng-show="submited && !message.title">*请填写消息主题</span>
  302. </div>
  303. <div class="form-group clearfix">
  304. <label class="control-label fl">消息内容</label>
  305. <div class="fl introduce">
  306. <div class="fl introduce">
  307. <!--<summernote lang="zh-CN" ng-model="message.context" height="300px" maxlength="3500" config="editorConfig">-->
  308. <!--</summernote>-->
  309. <textarea ng-model="message.context" style="width: 100%;" title="消息内容" class="form-control f1" placeholder="请填写消息内容,最大长度为500"
  310. maxlength="500" ng-class="{'showEmpty' : submited && !message.context}"></textarea>
  311. <span class="error" ng-show="submited && !message.context">*请填写消息内容</span>
  312. </div>
  313. <div class="button"><a ng-click="publishMessage(messageForm.$invalid)">发布</a><a data-toggle="modal" data-target="#setting">定时发送</a></div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. </form>
  319. </section>
  320. </div>
  321. </div>
  322. <!--定时发送弹出框-->
  323. <div class="modal setting" role="dialog" id="setting" data-backdrop="static" data-keyboard="false">
  324. <div class="modal-dialog timing">
  325. <div class="modal-content">
  326. <div class="modal-header header">
  327. <p class="fl">设置发送时间</p>
  328. <div class="close fr" data-dismiss="modal" ng-click="clearPublishDate()">&times;</div>
  329. </div>
  330. <div class="modal-body body">
  331. <div class="form-group clearfix">
  332. <label class="control-label fl">发布时间</label>
  333. <input type="text" ng-model="message.publishDate" readonly style="float:left"
  334. class="date-choose f1 form-control" placeholder="发布时间"
  335. datepicker-popup="yyyy-MM-dd" is-open="message.$publishTimeOpened"
  336. current-text="今天" clear-text="清除" close-text="关闭"
  337. datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
  338. ng-click="openDatePicker($event, message, '$publishTimeOpened')"
  339. ng-class="{'showEmpty' : submited && !message.publishDate}">
  340. <span class="error" ng-show="submited && !message.publishDate">*请选择发布时间</span>
  341. </div>
  342. </div>
  343. <div class="modal-footer footer text-right">
  344. <a ng-click="publishMessage(messageForm.$invalid && !message.publishDate)">确认</a><a data-dismiss="modal" ng-click="clearPublishDate()">取消</a>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <script>
  350. $('#chooseReceiver').on('click', function () {
  351. $('.chooseUser').toggle();
  352. });
  353. </script>