You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

196 lines
3.6 KiB

  1. <template>
  2. <view class="page">
  3. <view class="studSeeSec1">
  4. <view class="studSeeSec1Box">
  5. <l-select :range="semeArr" :placeholder="placeholder" @change="bindDateChange" valueField="value" textField="text" />
  6. </view>
  7. </view>
  8. <view class="studSeeSec2">
  9. <view class="tips" v-show="flag">暂无数据!</view>
  10. <view class="studSeeSec2List" v-show="!flag">
  11. <view class="studSeeSec2Li" v-for="(n, ind) in data" :key="n.Id">
  12. <view>
  13. <text>{{ n.PunishName }}</text>
  14. <text v-if="n.WithdrawDate != null">【已撤销】</text>
  15. </view>
  16. <view>{{ n.PunishReason }}</view>
  17. <view class="dateRow">处分日期:{{ n.PunishDate }}</view>
  18. <view class="dateRow" v-if="n.WithdrawDate != null">撤销日期:{{ n.WithdrawDate }}</view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default{
  26. data() {
  27. return {
  28. semeArr:[],
  29. placeholder: '请选择学期',
  30. flag: true,
  31. data: []
  32. }
  33. },
  34. methods:{
  35. init() {
  36. let _this = this;
  37. _this.LOADING('加载数据中…')
  38. //获取学年学期列表
  39. _this.HTTP_GET(
  40. 'StuPunishment/academicAndSemesterList',
  41. {},
  42. '加载数据时出错'
  43. ).then( res => {
  44. this.HIDE_LOADING()
  45. //console.log(res)
  46. _this.semeArr = res;
  47. _this.placeholder = res[0].text;
  48. _this.getListAjax(res[0].value)
  49. })
  50. },
  51. bindDateChange: function(e) {
  52. //console.log(e);
  53. this.LOADING('加载数据中…')
  54. this.getListAjax(e)
  55. },
  56. getListAjax(id) {
  57. var param = { value: id };
  58. let _this = this;
  59. //获取处分数据
  60. _this.HTTP_GET(
  61. 'StuPunishment/punishmentList',
  62. param,
  63. '加载数据时出错'
  64. ).then( res => {
  65. this.HIDE_LOADING()
  66. // console.log(res)
  67. if (res == null || res.length <= 0) {
  68. _this.flag = true
  69. return;
  70. }
  71. _this.flag = false;
  72. _this.data = res;
  73. })
  74. }
  75. },
  76. created() {
  77. this.init()
  78. }
  79. }
  80. </script>
  81. <style lang="less" scoped>
  82. /deep/ .picker {
  83. text-align: center;
  84. }
  85. /deep/ .cu-form-group {
  86. min-height: 28px;
  87. background: #fff;
  88. height: 28px;
  89. border-radius: 14px;
  90. line-height: 28px;
  91. text-align: center;
  92. font-size: 15px;
  93. color: #1a1a1a;
  94. position: relative;
  95. margin: 0 auto;
  96. min-height: 28px;
  97. }
  98. .studSeeSec2Li .dateRow {
  99. text-align: right;
  100. }
  101. .studSeeSec2 .tips {
  102. text-align: center;
  103. }
  104. .studSeeSec1 {
  105. background: #0c86d8;
  106. height: 100px;
  107. padding-top: 10px;
  108. }
  109. .studSeeSec1Box {
  110. width: 84%;
  111. background: #fff;
  112. height: 28px;
  113. border-radius: 14px;
  114. line-height: 28px;
  115. text-align: center;
  116. font-size: 15px;
  117. color: #1a1a1a;
  118. position: relative;
  119. margin: 0 auto;
  120. }
  121. .studSeeSec1Box .icon {
  122. position: absolute;
  123. top: 0;
  124. right: 15px;
  125. line-height: 28px;
  126. color: #818181;
  127. }
  128. .studSeeSec2Top {
  129. padding: 0 12px;
  130. margin-top: -52px;
  131. }
  132. .studSeeSec2TopBox {
  133. background: #fff;
  134. padding: 20px 0;
  135. text-align: center;
  136. font-size: 0;
  137. border-radius: 4px;
  138. }
  139. .studSeeSec2TopBox > * {
  140. display: inline-block;
  141. vertical-align: middle;
  142. }
  143. .studSeeSec2Line {
  144. height: 25px;
  145. width: 1px;
  146. background: #d6dfe2;
  147. margin: 0 40px;
  148. }
  149. .studSeeSec2Txt {
  150. color: #8a8a8a;
  151. }
  152. .studSeeSec2Txt view:first-child {
  153. font-size: 12px;
  154. }
  155. .studSeeSec2Txt view:first-child text {
  156. font-size: 20px;
  157. color: #0089fe;
  158. margin-right: 5px;
  159. }
  160. .studSeeSec2Txt view:last-child {
  161. font-size: 15px;
  162. }
  163. .studSeeSec2List {
  164. margin-top: 10px;
  165. background: #fff;
  166. }
  167. .studSeeSec2Li{
  168. padding: 0 12px 0 30px;
  169. border-bottom: 1px solid #d6dfe2;
  170. line-height: 39px;
  171. font-size: 13px;
  172. color: #7a7a7a;
  173. position: relative;
  174. line-height: 24px;
  175. }
  176. .studSeeSec2List text {
  177. float: right;
  178. }
  179. .studSeeSec2List image {
  180. width: 12px;
  181. margin-right: 5px;
  182. position: relative;
  183. top: 2px;
  184. }
  185. .studSeeSec2Li text{
  186. font-weight: bold;
  187. }
  188. </style>