matrialcalendar.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <style>
  2. .dayparts {
  3. width: 750px;
  4. }
  5. .dayparts table {
  6. width: 100%;
  7. }
  8. .dayparts td {
  9. cursor: pointer;
  10. width: 26px;
  11. height: 26px;
  12. border: 1px solid #ccc;
  13. }
  14. .dayparts th {
  15. font-weight: normal;
  16. }
  17. .dayparts td,
  18. .dayparts th {
  19. -webkit-touch-callout: none;
  20. -webkit-user-select: none;
  21. -khtml-user-select: none;
  22. -moz-user-select: none;
  23. -ms-user-select: none;
  24. user-select: none;
  25. padding: 0;
  26. }
  27. .dayparts tr:first-child th {
  28. text-align: left;
  29. text-indent: -4px;
  30. }
  31. .dayparts tr:not(:first-child) th {
  32. text-align: right;
  33. padding-right: 5px;
  34. }
  35. .dayparts .selected {
  36. background: #1e4163;
  37. color: white;
  38. }
  39. .dayparts button {
  40. margin-top: 10px;
  41. float: right;
  42. cursor: pointer;
  43. margin-right: 25px;
  44. }
  45. .dayparts a {
  46. cursor: pointer;
  47. }
  48. .dayparts a:hover {
  49. color: #333333;
  50. }
  51. .flex-size {
  52. -webkit-flex: 1;
  53. flex: 1;
  54. }
  55. .calendar-md {
  56. display: -webkit-flex;
  57. display: flex;
  58. flex-direction: column;
  59. margin: 0;
  60. width: 100%;
  61. min-height: 100%;
  62. height: 100%;
  63. }
  64. .calendar-md .subheader {
  65. background: rgba(0, 0, 0, 0.02);
  66. border: 1px solid rgba(0, 0, 0, 0.12);
  67. margin-right: 0;
  68. min-height: 36px;
  69. /* border-top-left-radius: 8px; */
  70. /* border-top-right-radius: 8px; */
  71. }
  72. .layout-row {
  73. display: inherit;
  74. flex-direction: row;
  75. }
  76. .layout-row.entity {
  77. border-radius: 8px;
  78. }
  79. .layout-padding {
  80. padding: 8px;
  81. flex: 1;
  82. }
  83. .layout-height {
  84. /* display: inherit; */
  85. display: inline-block;
  86. vertical-align: middle;
  87. flex: 1;
  88. align-content: center;
  89. }
  90. .subheader-day {
  91. min-width: 48px;
  92. }
  93. .weekday {
  94. border: 1px solid rgba(0, 0, 0, 0.12);
  95. cursor: pointer;
  96. }
  97. .flex {
  98. -webkit-flex: 1;
  99. flex: 1;
  100. box-sizing: border-box;
  101. }
  102. angular-dayparts .calendar-md .layout-row.entity .weekday:hover {
  103. background: #f5f5f5;
  104. }
  105. angular-dayparts .calendar-md .layout-row.entity *:disabled {
  106. color: rgba(0, 0, 0, 0.3);
  107. pointer-events: none;
  108. cursor: auto;
  109. }
  110. angular-dayparts .calendar-md .layout-row.entity .weekday.active {
  111. box-shadow: 5px 5px 3px 0px rgba(0, 0, 0, 0.75);
  112. background: rgba(17, 110, 191, 0.75);
  113. }
  114. </style>
  115. <!-- <script>
  116. angular.module('app', ['angular-dayparts']).controller('main', function($scope){
  117. $scope.options = {
  118. reset: true,
  119. onChange: function(selected) {
  120. console.log('selected', selected);
  121. },
  122. selected: []
  123. };
  124. });
  125. </script> -->
  126. <section id="page-title">
  127. <div class="row">
  128. <!-- <i class="iconfont icon-bianji pull-left"></i> -->
  129. <div class="col-sm-8">
  130. <h1 class="mainTitle">工作日管理<i tooltip='可搭配下面两种工作日设置方式进行工作日设置。' tooltip-placement="right" class="fa ti-help-alt margin-left-10 fontcolor-five pointfont"></i></h1>
  131. </div>
  132. </div>
  133. </section>
  134. <md-content id="calendar-demo" ng-controller="calendarCtrl" layout="column" layout-fill>
  135. <!-- <div class="input-group" style="padding: 10px;">
  136. <label class="btn btn-primary" ng-model="calendarView" btn-radio="'month'">
  137. 额外排班调整
  138. </label>
  139. <label class="btn btn-primary" ng-model="calendarView" btn-radio="'week'">
  140. 排班设置
  141. </label>
  142. </div> -->
  143. <div class="list-controls clearfix">
  144. <div class="btn-group">
  145. <!-- <button class="btn btn-statebutton statebutton keepleftbottom" ng-click="onChange('all')" ng-class="{'statecolor':searchstate=='all'}">全部</button> -->
  146. <label class="btn btn-pributtom" ng-model="calendarView" btn-radio="'month'">
  147. 额外排班调整
  148. </label>
  149. <label class="btn btn-pributtom" ng-model="calendarView" btn-radio="'week'">
  150. 周工作日设置
  151. </label>
  152. </div>
  153. </div>
  154. <div ng-if="calendarView=='week'" ng-model="options.selected" class="margin-top-20">
  155. <angular-dayparts options="options"></angular-dayparts>
  156. <p class="fontcolor-one">操作提示:此处为周排班设置,即在此处可以根据学校人员出勤情况勾选一个星期需出勤的星期数,点击即为出勤天,未做操作即为休息日,如有其它非常规休息日,你可到额外排班调整中将其点击取消出勤日。</p>
  157. </div>
  158. <div ng-if="calendarView=='month'">
  159. <calendar-md flex layout layout-fill calendar-direction="direction" on-prev-month="prevMonth" on-next-month="nextMonth" on-day-click="dayClick" title-format="'MMMM y'" ng-model='selectedDate' day-format="'d'" day-label-format="'EEE'" day-label-tooltip-format="'EEEE'"
  160. day-tooltip-format="'fullDate'" week-starts-on="firstDayOfWeek" day-content="setDayContent"></calendar-md>
  161. </div>
  162. <div ng-if="calendarView=='week'&&bianji" class="text-center margin-top-30px">
  163. <a ng-click="saveweek(options.selected);" class="btn btn-addbutton addbutton">保存</a>
  164. </div>
  165. <div ng-if="calendarView=='month'&&bianji" class="text-center margin-top-30px">
  166. <a ng-click="saveMonth();" class="btn btn-addbutton addbutton">保存</a>
  167. </div>
  168. </div>